Log in  ::  Register  ::  Not logged in

 Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Multiples address lines on a single row. Pivot? Rate Topic Display Mode Topic Options
Author
 Message
 Posted Wednesday, February 05, 2014 11:03 PM
 SSC Rookie Group: General Forum Members Last Login: Monday, February 10, 2014 5:35 PM Points: 46, Visits: 74
Post #1538475
 Posted Wednesday, February 05, 2014 11:40 PM
 Grasshopper Group: General Forum Members Last Login: Wednesday, March 26, 2014 4:01 AM Points: 19, Visits: 63
 I would use a combination of Row_number() over(ID) and then pivot the data set on the Row_number and the users ID.I hope this helps
Post #1538484
 Posted Thursday, February 06, 2014 1:41 AM
 SSCertifiable Group: General Forum Members Last Login: Today @ 1:38 AM Points: 6,745, Visits: 12,835
 Edit: completely misunderstood the question. Where's the coffee? “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail ShawFor fast, accurate and documented assistance in answering your questions, please read this article.Understanding and using APPLY, (I) and (II) Paul White Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff ModenExploring Recursive CTEs by Example Dwain Camps
Post #1538511
 Posted Thursday, February 06, 2014 2:17 AM
 SSC-Addicted Group: General Forum Members Last Login: 2 days ago @ 7:48 AM Points: 464, Visits: 455
Post #1538522
 Posted Thursday, February 06, 2014 2:30 AM
 SSCertifiable Group: General Forum Members Last Login: Today @ 1:38 AM Points: 6,745, Visits: 12,835
Post #1538526
 Posted Thursday, February 06, 2014 5:29 AM
 SSCrazy Group: General Forum Members Last Login: Thursday, April 03, 2014 10:10 AM Points: 2,792, Visits: 4,874
Post #1538588
 Posted Thursday, February 06, 2014 3:11 PM
 SSC Rookie Group: General Forum Members Last Login: Monday, February 10, 2014 5:35 PM Points: 46, Visits: 74
 Cheers all for those answers. I'll give them a go later today. For Chris, max no of rows is unlimited but in actual reality, I guess there wouldn't be more than 20 delivery addresses for each ID.
Post #1538923
 Posted Thursday, February 06, 2014 11:27 PM
 Grasshopper Group: General Forum Members Last Login: Wednesday, March 26, 2014 4:01 AM Points: 19, Visits: 63
 Do you mean that you could potentially have 20 rows of 3 address columns for one individual?
Post #1539013
 Posted Saturday, February 08, 2014 6:40 PM
 SSC Rookie Group: General Forum Members Last Login: Monday, February 10, 2014 5:35 PM Points: 46, Visits: 74
 Close. 20 rows with 5 address columns.
Post #1539543
 Posted Monday, February 10, 2014 5:00 PM
 SSC Rookie Group: General Forum Members Last Login: Monday, February 10, 2014 5:35 PM Points: 46, Visits: 74