Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Into Select...
Message
From
21/12/1998 16:39:12
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00169430
Message ID:
00169466
Views:
15
I quoted directly out of Using Microsoft SQL Server 6.5, Special Edition so :-)...didn't want to take any chances of a "whoops"


>>OK Nigel ---
>>
>>As I understand it, let's say Table A has columns A,B,C,D and A is an identity. Table B had E,F,G,H. Since A is an identity, it should auto-increment when records are added and, therefore, shouldn't be mirrored in the select portion (this only works if B=F,C=G,D=H in structure). Then...
>>
>>insert into table_a (b,c,d) values (select f,g,h from table_b)
>>
>>This should work.
>>
>>
>
>Thanks, I'll try that (when my SQL PC has finished its deleting) although I didn't think you could do it like that - the documentation says INSERT INTO tablename SELECT ... which is why I posted this thread.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform