LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default XLODBC #N/A Sum Queries do not connect


I have set up a number of queries, with start and end date references t
cells on the spreadsheet. Only half of the queries work. The other hal
(which all include SUM) return #N/A to the cell. Below are one of each
working and not working. Any advise greatly appreciated...

Works fine

=SQL.REQUEST("DSN=dtabase;SERVER=PRO002;UID=test1; PWD=test2",,,"SELEC
Count(Distinct b.ClientID) FROM tblbets b left join tblEvents e o
e.eventid = b.eventid WHERE (e.settleddate='"&B1&"' An
e.settleddate<'"&B2&"') AND (b.Internet=0)")

Doesn't work

=SQL.REQUEST("DSN=dtabase;SERVER=PRO002;UID=test1; PWD=test2",,,"selec
sum(amounttowin)+ sum(amounttoplace)-sum(payoutwin)- sum(payoutplace
from v_allbets b inner join v_allevents e on b.eventid = e.eventi
where internet=0 and (settleddate='"&B1&"' and settleddate <'"&B2&"'
and (bettype 0 and bettype <100) and valid = 1"

--
fiona
-----------------------------------------------------------------------
fionac's Profile: http://www.excelforum.com/member.php...fo&userid=1585
View this thread: http://www.excelforum.com/showthread.php?threadid=27348

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to allocate the XLODBC.XLA software? downloading XLODBC.XLA Excel Discussion (Misc queries) 0 June 1st 05 01:25 AM
xlodbc returning no rows & no errors Boultonsj Excel Programming 3 October 7th 04 10:57 AM
Need xlodbc.xla in Excel 2003 troubled Excel Programming 1 September 24th 04 07:44 AM
xlodbc Tom Ogilvy Excel Programming 1 August 27th 04 09:37 PM
XLODBC Newman Excel Programming 0 November 3rd 03 01:56 AM


All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"