SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Multiple values in some columns single value in another


Multiple values in some columns single value in another

Author
Message
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)

Group: General Forum Members
Points: 91997 Visits: 38954
eamonn.byrne (9/17/2012)
Jeff Moden (9/16/2012)
eamonn.byrne (9/14/2012)
Yep that definately works. It took you 5 seconds to fix what had me scratching my head for a couple of hours. Ermm

Cheers!


Before you use it, Joe is right.

1. What is the key here? Is it just EmgID or is it EmgID and Reference together.

2. Regardless of what the answer to 1 is, is there anything special you want done for an EmgID with multiple Reference values?


Thanks for the further replies gus and apologies if I wasn't clear. Yes the key is the combined EMGID and Reference fields. Lynn was on the money though and I was able to work out the rest of what I needed from what she provided.

Cheers


Glad I could help. One small thing, I am not a she, I am a he.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
eamonn.byrne
eamonn.byrne
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 45
Oops. Sorry! Blush
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search