Quantcast
Channel: SCN : Popular Discussions - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 1302

INSERT based on values from another table

$
0
0

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')


Viewing all articles
Browse latest Browse all 1302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>