Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting data for a range
Message
From
16/06/2003 16:03:30
 
 
To
16/06/2003 15:58:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00800434
Message ID:
00800498
Views:
29
Thanks Edgar

The table name are in this format payJAN03,PayFEB03....

so when the user select JAN03 & APR03 from combobox my sql should loop thru
JAN03,FEB03,MAR03,APR03 and fetch the data.

Thanks for your time


>startdt and enddt are these two fields in the table or your parameters?
>if last then you can do:
>
>SELECT datefld FROM table WHERE BETWEEN(datefld, startdt, enddt)into CURSOR temp
>
>and if "loop" means to go over all the records returned
>you can
>
>SELECT Temp
>SCAN
>.... DO whatever with each record
>ENDSCAN
>
>is this what you want?
>
>
>>Thanks for the replies, but what i wanted was it has to loop thru the dates selected by the user. say if the user selected startdt JAN03 enddt APR03, it has to fetch all the data from Jan 03 ... APR 03.
>>
>>Thanks
>>
>>
>>>something like :
>>>
>>>lsql="SELECT Fld1,fld2,fld3 FROM mytable WHERE fld2= ?cParam"
>>>lnResult=SQLEXEC(lnHandle,lsql,'tempTbl')
>>>
>>>that will place it in a CURSOR
>>>
>>>>Hello
>>>>
>>>>In a client-server environment , how can retrieve data from tables by SQL
>>>>
>>>>eg i have payfiles like PayJan03,payFeb03,PayMar03 and if the user select Jan 03 .. Apr03 how can select the data by SQL into a temp table ?
>>>>
>>>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform