Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle and datetime filter
Message
 
 
À
19/07/2004 17:07:34
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00925784
Message ID:
00925953
Vues:
21
Of course. That is what I did in my first reply to him. This example was only to illustrate getting the < < > > delimiters into the TO_DATE function that he had asked for.

>Mark,
>
>Couldn't you just parameterize the datetime variable in the query:
>
>
>lc_custno = [123]
>lt_date   = CTOT([07/01/2004]) &&watch strictdate for this sample or use {^2004-07-01 ::}
>
>TEXT to lc_SQL TEXTMERGE NOSHOW PRETEXT 3  && you may not have pretext option
>   SELECT *
>      FROM MyOracle.Sales Sales
>      WHERE Sales.customer = ?lc_custno
>        AND Sales.OrderDate = ?lt_date
>      ORDER BY Sales.OrderDate
>ENDTEXT
>*!* get rid of line returns [not needed in VFP9 BTW]
>lc_SQL = STRTRAN(lc_SQL, CHR(13) + CHR(10), [ ])
>nresult = SQLEXEC(myhandle, lc_SQL, 'myresults')
>
>All the format casting etc seems to be taken care of when we do this against Oracle or any other backend for that matter.
>
>Regards
>
>j.R
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform