Link to home
Create AccountLog in
Avatar of jmichael18
jmichael18

asked on

MS SQL Columns To Rows

I have a table ItemNotes (ItemID int, Note varchar(255),NoteDate datetime) in a MS SQL Server2005 database.  I need to have all of the note and notedate fields for an itemID combined into the same row.  It is unknown how many Notes a given item has.  I have been attempting a cursor or pivot but I cannot seem to get it working.  Any assistance is appreciated.
Avatar of Tapan Pattanaik
Tapan Pattanaik
Flag of India image

can you share sample format of your table.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of jmichael18
jmichael18

ASKER

Works great.  Thank you so much.
no problem, which one did you use? (with dates?)