Skip to Content
0
Former Member
Apr 12, 2013 at 06:21 PM

INSERT based on values from another table

35 Views

Hi there

I am attempting to insert data into one table based on data in another but having problems with the syntax.

Any ideas?

Thanks

INSERT INTO A_Nominal(Debit, Type, Ref, Details, Nominal_Code, Item_Date) (SELECT Credit FROM A_Control WHERE C_Description = 'Excess moved to payments on account'), 'JD', 'Transfer', 'Excess moved to payments on account', 1103, '2013-04-12')

WHERE EXISTS

(SELECT Credit FROM A_Control WHERE C_Description = 'Excess moved to payments on account')