Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tinamiller1
Yak Posting Veteran
78 Posts |
Posted - 2015-03-30 : 17:04:32
|
I have a table and trying to do a complex crosstab or union and the outcome is not working the way I need it to. I had to assign a value to the text field because the crosstab does not like nonvalues from what I see but the value is actually a text field. Here is an example of the data in the database on the server and the output I need.DATA HAVE LastName FirstName Date InfoDOE SARAH 10/15/2014 NADOE SARAH 10/16/2014 ALMOSTDOE SARAH 10/17/2014 ALWAYSDOE SARAH 10/18/2014 COMPLETEDOE SARAH 10/19/2014 NOLANCE BRANDY 10/15/2014 NALANCE BRANDY 10/16/2014 ALMOSTLANCE BRANDY 10/17/2014 ALWAYSLANCE BRANDY 10/18/2014 COMPLETELANCE BRANDY 10/19/2014 NOMIRIAM SUE 10/15/2014 NAMIRIAM SUE 10/16/2014 ALMOSTMIRIAM SUE 10/17/2014 ALWAYSMIRIAM SUE 10/18/2014 COMPLETEMIRIAM SUE 10/19/2014 NODATA NEED 1 row for each total 3 rows and it should be laid outlast/first/date1/info1/date2/info2/date3/info3/date4/info4/date5/info5I would paste a copy of the data have but it does not paste correctly and I see no way to attach anything on the forum tina m miller |
|
|
|
|