I wrote a INSERT SELECT query. Here is it
INSERT INTO Table1(PosID,EventID,IUser)
SELECT 93,eventid,IUser
from Table1
where posid = 92
92,93 will be coldfusion variables in my ACTUAL code. Here is my question, When I insert a new record, Say I insert
PosID EventID IUser
93 4 234
If 93 , 4 already exsist, I dont want to insert it. Is there a way to do a conditional INSERT SELECT. OR after inserting it, is there a way to delete duplicates?
INSERT INTO Table1(PosID,EventID,IUser)
SELECT 93,eventid,IUser
from Table1
where posid = 92
92,93 will be coldfusion variables in my ACTUAL code. Here is my question, When I insert a new record, Say I insert
PosID EventID IUser
93 4 234
If 93 , 4 already exsist, I dont want to insert it. Is there a way to do a conditional INSERT SELECT. OR after inserting it, is there a way to delete duplicates?