February 29, 2008 at 8:25 pm
I have a table that looks like this:
RowID int
LeadFieldName varchar(200)
LeadFieldValue Varchar(200)
I have the following rows in this table:
RowID = 1
LeadFieldName = "FirstName"
LeadFieldValue = "Steve"
RowID = 1
LeadFieldName = "LastName"
LeadFieldValue = "smith"
RowID = 1
LeadFieldName = "Address"
LeadFieldValue = "123 some street"
RowID = 1
LeadFieldName = "City"
LeadFieldValue = "Dallas"
RowID = 1
LeadFieldName = "State"
LeadFieldValue = "TX"
RowID = 1
LeadFieldName = "phone"
LeadFieldValue = "555-1212"
My question is this,I want to arrange this data Horizonally like this:
FirstName|LastName|address |City |state |Phone
--------------------------------------------------------------
Steve |Smith |123 some street|Dallas |TX |555-1212
February 29, 2008 at 8:39 pm
Check out this forum: http://www.sqlservercentral.com/Forums/Topic460230-8-1.aspx#bm460247
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 1, 2008 at 9:21 am
Thanks! I Like your last Name. I'm a Corbett too..LOL
I was thinking of doing it in VB.net but I wanted to see if there was easier way to do it in SQL.
Thanks for the info.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply