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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert

Status
Not open for further replies.

goransaler

IS-IT--Management
Mar 6, 2003
56
SE
hello
I like to an insert from a table to another
like this

INSERT INTO Artist ( Artistnamn )
SELECT DISTINCT mp3id3v1artist
FROM Mp3Cdimport

the problem is that if the artistname
exist in the artist table i don't like it to be inserted

hope for help

 
INSERT INTO Artist (Artistnamn)
SELECT DISTINCT mp3id3v1artist
FROM Mp3Cdimport
WHERE mp3id3v1artist NOT IN
(SELECT Artistnamn FROM Artist);


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top