Insert into in SQL CE - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Insert into in SQL CE

Hi, I'm trying to execute an insert query on sql ce using some values for the columns from other tables (using an select statement) and some constant values with a values statment. I'd like to know if this is possible and if not, how can I solve the query in other way.
Here I copy the query:

INSERT INTO TB_CUSTOMER_TOTALS (CTO_CUSTOMER,CTO_REJECT,CTO_REJECT_NEW,CTO_DEBT_AMOUNT,CTO_DEBT_AMOUNT_NEW,CTO_DIFFERED,CTO_DIFFERED_NEW,CTO_NOT_ASSIGNED,CTO_NOT_ASSIGNED_NEW,CTO_ACTION,CTO_ENVIAR) VALUES (SELECT CUS_NUMBER FROM TB_CUSTOMER WHERE CUS_NUMBER NOT IN (SELECT CTO_CUSTOMER FROM TB_CUSTOMER_TOTALS),0,0,0,0,0,0,0,0,0,0)

thanks
Sign In or Register to comment.