1

I'm using Delimiting Strings, in sql server

I have a function like

select * from fnSplit('1,22,333,444,,5555,666')

Which splits the string into a table. But now I need to take the input from a table. I have 10 Rows which contain the Limited Strings separated by comma like 1,22,333. I need to take every row and use the function fnSplit on it and return all the values in a single table. How can I do this ???

1
  • - show us the code for your function Commented May 24, 2013 at 7:09

2 Answers 2

4

try this

Select 
   distinct y.*
from
   mytable x 
   full outer join dbo.fnSplit(x.mycolumn) y ON 1=1

But I think this is very inefficient - show us the code for your function.

Sign up to request clarification or add additional context in comments.

Comments

2

Try this one -

SELECT * 
FROM dbo.mytable t
OUTER APPLY (
    SELECT * 
    FROM dbo.fnSplit(t.mycolumn) y
) y  

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.