Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Stuff code in sql
create table #temp (cid int, val1 int, val2 int, val3 int, val4 int) insert #temp values (1001,10,11,15,19), (1002,15,Null,16,18), (1003,14,18,15,NULL) SELECT distinct t2.cid, STUFF(( SELECT '' + REPLACE(t1.val1,'.','') + REPLACE(t1.val2,'.','') + REPLACE(t1.val3,'.','') + REPLACE(t1.val4,'.','') FROM #temp t1 WHERE t1.cid = t2.cid FOR XML PATH ('') ), 1, 1,'') as 'output' FROM #temp t2
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
№2
SQL_Joins_Intersect_Except_Union
Delete double entries from a table without primary key
Task1
Admno
EXP 8
sql6
performance on update using subquery versus correlated update
Practice
table variables (temporary tables)
Please log in to post a comment.