Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL passthru with a variable in a variable
Message
De
09/03/2003 12:02:32
 
 
À
09/03/2003 11:47:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00763438
Message ID:
00763441
Vues:
14
try Oracle's TO_DATE() function. Something like

SELECT * FROM table WHERE date = TO_DATE('01/01/2002','mm/dd/yyyy')

>I am trying to create a date variable will go into my z variable but do not know the proper way to format it when I am making z. Below is the code:
>
>lv_date=TTOC(DATE() - 90)
>
>STORE SQLCONNECT('VFPOracle', 'large_oracle', 'larg') TO gnconnhandle
>******************************** GS 1
>a= "select * "
>b= " from larger_survey "
>c= " where queue_department = 'General Support'"
>d= " and response_date >= '" &&trunc(sysdate)-30
>e= "' -30 and response_date < " &&trunc(sysdate)
>f= " and metric_name = 'Overall'"
>g= " and metric_score = 5"
>z= a+b+c+d+ lv_date +e+ lv_date +f+g
>
>= SQLSETPROP(gnconnhandle, 'asynchronous', .f.)
>= SQLEXEC(gnconnhandle, z, 'mycursor')
>SELECT mycursor
>
>
>I have tried using lv_date as just date() or as a text date but can not make it work. What am I doing wrong???
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform