Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Between Statement
Message
From
13/10/2003 11:43:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00838116
Message ID:
00838141
Views:
22
>I am trying to create a query whereby the results will be given between 2 dates. My query is below. This does not work! My question would then be Is it possible to use the BETWEEN statement in an SQL?
>
>
>WITH thisform.pageframe1.page3.list3
>	.RowSourcetype = 3
>	.Rowsource = 'SELECT mainkey FROM pdmlog' + ;
>	             ' WHERE pdmlog.type="Change" and'+;
                     ' pdmlog.database="COST2"' + ;
>             ' and BETWEEN(pdmlog.date,{^2003-04-01},{^2003-04-02})'+;
              ' INTO CURSOR result'
>ENDWITH
>
>
>Many Thanks in Advance

Neil,
It's perfectly valid syntax. You might change to :

pdmlog.date BETWEEN {^2003-04-01} and {^2003-04-02}

I think while saying it doesn't work it returns no records.
Check what does :
SELECT distinct Type, Database FROM pdmlog ;
 WHERE pdmlog.date BETWEEN {^2003-04-01} and {^2003-04-02}
return.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform