Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Posted Wednesday, August 28, 2013 5:45 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 28, 2013 5:41 PM
Points: 2, Visits: 4
In database I have a table with 2 columns
name code
mike abc

mike abc

mike abc

mike edf

mike xyz

Gail xyz

George abc

George xyz

flatfile should look like this

xmnty mike abc edf xyz

xmntt mike abc

xmntt mike abc

xmnty Gail xyz

xmnty George abc xyz

For first code I will have static value xmnty,for same name and additional same code go to next row assign static value xmntt,for same name different code go to next column.
Please if you can provide sql query or give me instruction how to do it in SSIS.
Post #1489478
Posted Wednesday, August 28, 2013 10:43 PM



Group: General Forum Members
Last Login: Yesterday @ 5:25 PM
Points: 7,977, Visits: 19,108
Does your desired output data reflect the input data provided?

If so, please provide the rules for handling duplicate rows.

Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

If your posting includes some T-SQL code, please surround the code with IFCode formatting tags. It helps readability a lot.
Post #1489516
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse