Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 396877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:35:43+00:00 2026-05-12T16:35:43+00:00

I have the following table (the number of the references is variable): Id |

  • 0

I have the following table (the number of the references is variable):

Id | FK_ID| Reference |
-----------------------
1    2100   GI2, GI32
2    2344   GI56  

And I need the following result:

Id | FK_ID| Reference |
-----------------------
1    2100   GI2 
2    2100   GI32
3    2344   GI56  

Is there any short way to transform the data like this using MS SQL Server 2005?

Thank you

EDIT: Direct link to the solution:
http://www.sommarskog.se/arrays-in-sql-2005.html#iter-list-of-strings

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:35:43+00:00Added an answer on May 12, 2026 at 4:35 pm

    Which SQL Server version are you using?

    Prior 2005

    Use utility Numbers table as explained here.
    I’ve used it many times before with great success.

    2005 and after

    Read fellow developer Mitch Wheat’s answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following database table: CREATE TABLE pontaje ( coda NUMBER(4) REFERENCES angajati(
I have a following table using MVC that shows number of items the user
I have the following table, how would I go about returning the number of
Suppose that we have following tables create table Employee( 2 EMPNO NUMBER(3), 3 ENAME
Greeting! I have the following problem. I have a table with huge number of
I have table with following structure and test records: +--------+--------+---------+ | vid | number
I have a new table that has foreign key references to a number of
I have a table with the following data: id | numbers | date ----------------------------------
I have following Table with records for ActivityLog: ID, UserId, Category, Created 1 11
I have following table Id | Status | date ------------------- 1 | Onsite |2007

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.