Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT from a selection

Status
Not open for further replies.

vins

Programmer
Sep 10, 2001
1
PH
I'm trying to make an insert statement from a selection.

I'm using the following SQL statement:

INSERT link (cat_id, name, url, weight, target, link_tip, made, changed, status)
SELECT 645 AS cat_id, name, url, 5 AS weight, target, link_tip, NOW() AS made, NOW() AS changed, status
FROM link WHERE link_id IN (4636, 4678, 4968);

I use it to duplicate multiple [links] (urls) to a different [category]. Every [category] has an auto-increment id as well as every [link].

when i use this statement it returns an error 1066: not unique table/alias: 'link'

what am i doing wrong??? Can anyone help me with this???

Thanks,

Vincent
 
inse insert into lint(..... Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top