I'm in very weird situation and i have researched a lot but not able to find anything similar to this scenarios.
Input looks something link this.
Where Each patient has Primary Dx code, Admit Dx code and Additional Dx code.
Note- Additional Dx code sometimes ends with ';' , Each Dx code is seperated by ';'.
There will be only one Primary Dx and Admit Dx column.
My output should be something link this
Best Answer
Use a split string table valued function and
CROSS APPLY
.