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 Using datetime fields as parameters in a query...

Hello,

I am trying to set up an excel sheet which
queries data from several mysql tables (via myODBC).
In short, the first query results in two datetime
fields and some other information. Now I want to use
these two datetime fields as parameters in a second
query but this seems not to work. The second qery looks
like

SELECT something FROM tableXYZ WHERE datetimefield
BETWEEN [t_low] AND [t_high]

I edited this query with the MS-Query-editor. In excel
I assinged the correct cells (result from first query) to the
parameters t_low and t_high but I always get an empty result
from this. I have the feeling that the problem lies in the type
conversion between the excel cell and a datetime field for SQL.
If I try to edit the parameters in QUERY I get a box where one
chooses a datatype normally. I cannot change this from varchar
(greyed out, not changeable). I am really stuck here, can anyone
help me, please?

Thanks,

Olaf
 
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
MS Query - 2 Parameters cottage6 Excel Discussion (Misc queries) 2 July 17th 08 09:16 PM
MS Query DateTime String Dean Excel Worksheet Functions 1 January 23rd 06 12:07 PM
Query Parameters Texas_Toast Excel Discussion (Misc queries) 0 January 11th 06 03:14 PM
Query Parameters Jeff Excel Programming 1 November 18th 03 05:47 PM
datetime in query Ling[_2_] Excel Programming 1 August 8th 03 05:08 PM


All times are GMT +1. The time now is 06:15 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"