sql server 2008 - How to ArrayJoin multiple strings into single SQL query? -


i have many (over few thousands) sql strings ie this:

update tw__tow set tw_seau = '0' tw_symbol = '0110'; update tw__tow set tw_seau = '5' tw_symbol = '0125'; update tw__tow set tw_seau = '1' tw_symbol = '253'; 

instead of sending each statement sql database separately need join of them 1 single query using arrayjoin don't how this.

my friend advised me arrayjoin strings, i'd glad solution.

thank in advance martin

try case

 update tw__tow          set tw_seau = case             when tw_symbol = '0110' 0             when tw_symbol ='0125' 5             when tw_symbol ='253' 1         end   tw_symbol in ('0110','0110','253') 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -