ingres - I dont understand the error with the syntax in SQL -
insert tbproppayh (id_payment) select s.id_payment session.set_values s exists id_payment;
thu jul 18 10:21:42 2013 executing . . .
e_us09c5 line 1, syntax error on 'id_payment'. correct syntax is: select [all|distinct] target_list table(s) [where search_cond] [group col(s)] [having search_cond] [union subselect] [order col(s)] (thu jul 18 10:21:42 2013)
continue
try:
insert tbproppayh (id_payment) select s.id_payment session.set_values s id_payment not null;
where exists
needs subquery:
where exists (select ... ...)
see this example.
after comment, use distinct
avoid inserting duplicate values:
insert tbproppayh (id_payment) select distinct s.id_payment session.set_values s id_payment not null;
Comments
Post a Comment