×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Need help splitting out columns for each row into new table

Need help splitting out columns for each row into new table

Need help splitting out columns for each row into new table

(OP)
Let's say I do a select statement and the results are

Acct #     Zip          Phone                 Addr
11223     23232      333-444-5555      6556 Duns Rd.
12345     34343      222-444-3333      1000 Aspire Blvd.

I need to create a record using the Acct # and column for each column as well as append some other values like this

11223     23232   othervalue1     othervalue2
11223     333-444-5555  othervalue1    othervalue2
11223     6556 Duns Rd.  othervalue1   othervalue2
12345     34343  othervalue1   othervalue2
12345     222-444-3333  othervalue1 othervalue2
12345     1000 Aspire Blvd. othervalue1  othervalue 2

How do I do this for each row in my result set?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources