Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SQL.REQUEST query omitting rows in MSSQL DB

I am using Excel 2000 and MSSQL 2000 and getting inconsistent results
when pulling rows that are between a specific date range.

Here is the statement:

SQL.REQUEST("DSN=TheDB",,1,"SELECT Count(QuoteID) AS CountEvents FROM
[tblQuotes] WHERE DateOrdered BETWEEN " &B3 &" AND " &B4 )

When I run the query from Enterprise Manager in MSSQL2000 I get the
expected results. When I let the result come from the SQL.REQUEST
function in Excel, it omits rows and they are rows in the middle of
the range, not at the boundries. In other words, it's not the usual
problem where I'm not taking into consideration that SQL looks at
2/15/04 as 2/15/04 at 12:00:00AM. Widening the range doesn't seem to
fix the results. B3 and B4 are formatted as date cells and DateOrdered
is a datetime field in the SQL db.

Any help would be greatly appreciated.
Reply
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
Excel 2002, MS Query and MSSQL View with periods John T in MD Excel Discussion (Misc queries) 0 March 14th 07 02:06 PM
DELETE ROWS BY USING A IF/THEN QUERY CHARI Excel Worksheet Functions 2 June 1st 06 06:46 PM
need a formula using nos 1-443 omitting (116-124 & 153-167) tyrone Excel Discussion (Misc queries) 4 April 10th 06 07:37 AM
Enhancement request for showing the selection of rows in MS Excel Purushottam Abuj Excel Worksheet Functions 0 February 10th 06 12:20 PM
omitting column letters and numbers of rows linnie Excel Discussion (Misc queries) 1 September 16th 05 01:46 AM


All times are GMT +1. The time now is 11:21 AM.

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

About Us

"It's about Microsoft Excel"