Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Into Select...
Message
From
21/12/1998 16:27:12
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00169430
Message ID:
00169458
Views:
20
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.


>>Nigel ---
>>
>>I'm confused: An identity datatype column in SQL Server maintains itself; you don't attempt to update it from the client end at all....so..??
>>
>>
>
>Sorry, worded wrong. The receiving table has an identity column. If I do insert into select, the documentation says that the column list should match the receiving table structure -- what if the receiving table has an identity column? What if this identity column is column one of the receiving table? The select column list would not contain this.
------------------------------------------------
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