MySQL update with two subqueries -


itemprop = "text">

Where do I delete a column from the MySQL table with the subquery that returns a date for the block, and another subquery I'm trying to

is:

  UPDATE wtk_recur_subs_temp SET wtk_recur_date = (Choose final form from final, bb, wtk_recur_subs WHERE final_bb.msisdn = wtk_recur_subs.wtk_recur_msisdn) WHERE wtk_recur_subs_temp.wtk_recur_msisdn IN (final_bb To choose final_bb.msisdn)  

The response from the MySQL engine is "Subquery returns more than 1 line".

use:

UPDATE wtk_recur_subs_temp, last_bb, wtk_recur_subs SET wtk_recur_subs_temp Wtk_recur_date = final_bb.date WHERE final_bb.msisdn = wtk_recur_subs.wtk_recur_msisdn and wtk_recur_msubs_temp wtk_recur_msisdn = final_bb.msisdn

error is because:

  set wtk_recur_date = ( Select final_bb.date from final_bb, wtk_recur_subs where final_bb.msisdn = wtk_recur_subs.wtk_recur_msisdn)  

... final_bb.date value all date values ​​where final_bb and wtk_recur_subs msisdn match the column value.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -