If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > need to select date range in sql...not working..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-11-03, 19:42
blondini3 blondini3 is offline
Registered User
 
Join Date: Feb 2003
Location: new zealand
Posts: 17
need to select date range in sql...not working..

Hi there, since you guys and gals are so great at sql, and i've learnt so much from you lot and the other forums, that I have one more for you......

I am trying to query the msaccess database within a time frame (date range)...the msaccess format is dd/mm/yyyy(short), but this code is not working out....i'm NOT GETTING ANY ERROR MESSAGES at all, but just not getting any resultant data....

SELECT Date_of_Sale, CardRecordID, Sales_Value
FROM sales
WHERE Date_of_Sale BETWEEN #varstartDate# and #varendDate#

this is what i have entered in the variables panel underneath ....

var = varstartDate, default 01/01/2002, runtime Request.Form("varstartDate")
var = varendDate, default 01/01/2002, runtime Request.Form("varendDate")


there are two input textfields in my form called varstartDate and varendDate ...

Where am I going wrong ??i've been on sqlcourse2.com looking for code samples and answers, but haven't had any luck with this exact scenario.

Anyone got one of these to work ???
Thanks again..Angie.
Reply With Quote
  #2 (permalink)  
Old 02-11-03, 20:37
blondini3 blondini3 is offline
Registered User
 
Join Date: Feb 2003
Location: new zealand
Posts: 17
I DID IT...once again, after posting to this forum I try just that little bit harder to suss it out myself, went onto macromedia forums and dreamweaver technotes e.t.c.

solution: use mm/dd/yyyy and use Request.Form not just 'Request'.

cheers you lot.
bye4now
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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