Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Between Statement
Message
De
13/10/2003 11:43:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00838116
Message ID:
00838141
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform