Query from field in table with formatting

New Contributor

Hi,

I have values in one of the field as below.

 

(10000,'a'),(20000,'b'),(30000,'t'),(40000,'r'),(50000,'U'),(60000,'W')

 

These are 2 values in one single set.

I want to get it as 2 sets of values.

 

Like (10000,20000,30000,40000,50000,60000)

and another set as ('a','b','t','r','U','W').

 

How can we achieve this in SQL/T-SQL?

 

Regards,

Mahesh

0 Replies