Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL passthru with a variable in a variable
Message
From
09/03/2003 12:02:32
 
 
To
09/03/2003 11:47:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00763438
Message ID:
00763441
Views:
15
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???
Previous
Reply
Map
View

Click here to load this message in the networking platform