General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only