Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to write this SQL Statement?
Message
 
 
To
03/01/2003 05:23:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00737372
Message ID:
00738258
Views:
15
Cetin,

You can use DO WHILE instead of SCAN for outer loop because actual record scan done in inner SCAN loop.
***scan
LOCATE 
DO WHILE NOT EOF()
 oRecord.id = crsTemp.ID
 scan while ID = oRecord.id
  store FieldValue to ('oRecord.'+fieldname)
 endscan
 ***skip -1
 select NewTable && VFP8 : insert into NewTable from name oRecord
* Could also use scatter memvar, insert into .. from memvar
 append blank
 gather name oRecord
 scatter name oRecord blank
 select crsTemp
ENDDO
***endscan
>>unfortunately, you is right, my table have a dozen extra fields, then...:(
>
>Fbilo,
>As I said wouldn't try to do with SQL directly.
>Supposing your fieldname field doesn't contain any value that's illegal for a fieldname and number of distinct fieldnames isn't over 254 (+1 for id - table column limit) :
>
< snip >
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform