Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert SQL Command
Message
 
 
To
05/02/2009 16:15:44
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01379645
Message ID:
01379650
Views:
30
This message has been marked as the solution to the initial question of the thread.
>Hi.
>I have two questions about SQL Insert command when
>used with SELECT:
>
>1. The fields name must be specified one by one in the Insert
>clause of the command and again in the SELECT clause?

1. If the names of the fields in the other table match the names of the fields and the order in the other table you can use

insert into myTable select * from myOtherTable where ...

otherwise

insert into myTable (field1, field2, field3) select field1, field2, field3 from ...


>2. The name of the table could be an alias or must be the dbf name?
>
>Thanks in advance!

Yes, it could be the name of the cursor (not the real table name). You can also use table alias.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform