I am currently trying to transform a series of rows into one row so that the data can be displayed onto a report.
My data is being presented in my table CustomData like so:
CustomDataID(PK) CustomDataDefinition ReferenceTablePKValue IntValue DateTimeValue StringValue
1 Number 1638 1230 NULL NULL
2 1stDate 1638 NULL 2014-09-23 NULL
3 2ndDate 1638 NULL 2014-09-25 NULL
4 3rdDate 1638 NULL 2014-09-25 NULL
5 Notes 1638 NULL NULL Test note.
My goal is to have something like this. Essentially I need it to bring it in as one row.
Number 1stDate 2ndDate 3rdDate Notes
1230 2014-09-23 2014-09-25 2014-09-25 Test note.
I have tried various SELECT statements with multiple JOINs, but that has not proven fruitful at all. I'm thinking that potentially a temporary table will work, but I'm really not too familiar with how that would work. Does anyone have any ideas on how I could potentially transform this data appropriately? Please let me know if you need further information.