sql like/where exists error with insert statement -


i want :

create temporary table list of id_payments on tbtrigpmmcanc , tbproppay.

from list move them tbproppay tbproppayh.

delete them tbproppay then.

this sql have problem in insert statment. think need sql before moving rows tbproppayh every id_payment in temporary table dont know how write it

the error : e_us0ad8 insert: number of target columns must equal number of target list elements in specified subselect. (thu jul 18 09:31:23 2013)

----clean in:035466  ----description : create temporary table with list of id_payments on tbtrigpmmcanc , tbproppay. ---------------------------------------------------------------------------------------------------------------------------- declare global temporary table session.set_values select a.id_payment tbtrigpmmcanc a, tbproppay b a.id_payment = b.id_payment  on commit preserve rows norecovery;\p\t\g   --view temporary table  select * session.set_values;\p\t\g --------------------------------------------------------------  -- description: move list tbproppay tbproppayh ------------------------------------------------------------- select id_payment session.set_values exists id_payment;\p\t\g  -- insert tbproppayh  ------------------------------------------------------------- insert tbproppayh  select id_payment tbtrigpmmcanc a, tbproppay b a.id_payment = b.id_payment;\p\t\g -------------------------------------------------------------  -- description: delete list tbproppay  ------------------------------------------------------------- delete tbproppay b id_payment in (select a.id_payment tbtrigpmmcanc a,  tbproppay b a.id_payment = b.id_payment);\p\t\g  ------------------------------------------------------------- --select tbproppay & tbtrigpmmcanc ------------------------------------------------------------- select a.id_payment tbtrigpmmcanc a, tbproppay b a.id_payment = b.id_payment;\p\t\g     ------------------------------------------------------------- 

if want temporary table might best use view instead. can details need , take view.

will post code in moment.

the error you're getting self explanatory. you're selecting many columns target.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -