troubleshooting Question

MSSQL - Way to explode field values on queryout?

Avatar of jen_jen_jen
jen_jen_jen asked on
Microsoft SQL ServerMicrosoft SQL Server 2008
22 Comments1 Solution2084 ViewsLast Modified:
I'm assuming this is impossible, but thought I'd ask anyway....

In my table, I'll have records like this:

1 | a,b,c,d,e,f,g
2 | a,b,c
3 | a,d,e,g
4 | f
5 | e,f

I want to export the results to a text file.  Is it possible to explode those values so that I wind up with:

1 | a
1 | b
1 | c
1 | d
1 | e
1 | f
1 | g

etc. ?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 22 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros