Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to write this SQL Statement?
Message
From
06/01/2003 04:54:41
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:
00738326
Views:
12
Sergey,
And you could do it w/o locate. And I could do it in N more different ways.
Cetin

>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 >
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform