on 04-12-2013 7:21 PM
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')
Resolved it...
INSERT INTO A_Nominal(Credit, Type, Ref, Details, Nominal_Code, Item_Date)
SELECT Credit, 'JC', 'Transfer', 'Excess moved from payments on account', '1100', Document_Date FROM A_Sales_Ledger WHERE S_Description = 'Payment on account - from prepayments'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.