question

sql_ibrahim61 avatar image
sql_ibrahim61 asked

matching string of one table to substring of another table

![please look at the picture, it has two table and output tabe][1] [1]: /storage/temp/3715-sql1.png
sql-server-2008sqljoinssubstringstring-function
sql1.png (7.8 KiB)
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
It's not entirely clear what you have tried so far and how that went... You would want to look at joining Table1 to the result of a call to a SPLIT-function (google for Jeff Moden and Split and you will find some very efficient split-string-functions which you can use), and finally you would want to use XML PATH to get the results in csv format.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.