SQLTeam.com | Weblogs | Forums

Coding for scenario of multi values

I have data as follows: We call this table Client_benefits
Client_name, Income_type, Frequency
Joe Smith SSI Month
Joe Smith Work Week

I would like an out put row as follows:

Joe Smith SSI Month Work Week

Rather than currently I am getting duplicates but would like to see one row if possible.

How many income types do you have - ideally you would cross-tab (pivot) the data with a column for each income type and the value for that income type.

If you can provide sample data in the form of a create/declare and insert statements we can provide a tested solution.