tsql - IS IN (Select statement, 'value', 'value') -


i trying run following sql

delete t_ath_poshld t_ath_poshld.a_insid in (select t_ath_poshld.a_insid t_ath_poshld left join t_ath_ins on t_ath_poshld.a_insid = t_ath_ins.a_insid t_ath_ins.a_insclscde1 = 'cash' , t_ath_poshld.a_insid not in (select a_insid t_ath_ccy) , a_accid in (select a_accid t_ath_extacc, '1212oeic', '5667033zs')) 

and in particular, trying check whether accid in set of values, coming table , 2 hardcoded. how achieve this?

in (select a_accid t_ath_extacc, '1212oeic', '5667033zs') 

doesn't work, 'incorrect syntax error'.

thanks

you need use union add 2 hardcoded values resultset passing in clause.

in (select a_accid t_ath_extacc union select '1212oeic' union select '5667033zs') 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -