Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle and datetime filter
Message
 
 
À
19/07/2004 14:01:39
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
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:
00925909
Vues:
20
Not much different.
lc_custno = [123]
lc_date   = '07/01/2004'

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 = TO_DATE('<<lc_date>>', 'MM/DD/YYYY')
      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')
>Mark,
>
>Thanks for the tip, works great. But what would the Select statement look like if I wanted to filter on the datetime field with the below line?
>
>[AND sales.order_date = TO_DATE('] + mydate + [', 'MM/DD/YYYY') ]
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform