Good day. 

 I am trying to insert a record into a file when I get an unmatched condition 
on the merge but I get an error saying it can't find the column for the insert.
 

 Here is the code:
 

 merge into tableA e
   using tableB s
   on (e.field1 = s.field2)
   when not matched then insert 
(ACTION,ITEMID,TITLE,SITEID,CURRENCY,STARTPRICE,BUYITNOWPRICE,QUANTITY,RELATIONSHIP,RELATIONSHIPDETAILS,CUSTOMLABEL,MATCHED,VENDOR)
   values ('End',e.ITEMID, 
e.TITLE,e.SITEID,e.CURRENCY,e.STARTPRICE,e.BUYITNOWPRICE,e.QUANTITY,e.RELATIONSHIP,e.RELATIONSHIPDETAILS,e.CUSTOMLABEL,'N','Sullivans');
 

 What I am trying to accomplish is if there isn't a match I need to insert a 
record into tableA because tableA will be an input table into a subsequent 
process and the data I need is only on tableA.
 

 Using Firebird 2.5
 

 Any help/direction/ would be greatly appreciated!!
 

 Thank you.
 

 Jim

Reply via email to