Click here to Skip to main content
15,913,027 members
Home / Discussions / Database
   

Database

 
Questioncorrelated subselect Pin
Smithers-Jones4-Nov-08 0:30
Smithers-Jones4-Nov-08 0:30 
AnswerRe: correlated subselect [modified] Pin
Wendelius4-Nov-08 4:58
mentorWendelius4-Nov-08 4:58 
GeneralRe: correlated subselect Pin
Smithers-Jones4-Nov-08 8:07
Smithers-Jones4-Nov-08 8:07 
GeneralRe: correlated subselect Pin
Wendelius4-Nov-08 8:23
mentorWendelius4-Nov-08 8:23 
AnswerRe: correlated subselect Pin
Blue_Boy4-Nov-08 6:10
Blue_Boy4-Nov-08 6:10 
GeneralRe: correlated subselect Pin
Smithers-Jones4-Nov-08 9:24
Smithers-Jones4-Nov-08 9:24 
AnswerRe: correlated subselect Pin
SomeGuyThatIsMe4-Nov-08 7:28
SomeGuyThatIsMe4-Nov-08 7:28 
GeneralRe: correlated subselect Pin
Smithers-Jones4-Nov-08 8:25
Smithers-Jones4-Nov-08 8:25 
No, sorry, that didn't work. As I said, the table in my example is simplified: There are a few more columns, the important one called "LocationID". For every NameID I need the LocationID of the latest date, to join the result with further tables (NameID and LocationID being foreign keys from other tables, as you might have already guessed). So if I use the query proposed by you, I get a table with a row for every nameID, showing the latest date (as desired), but not the LocationID relevant to that date but the first LocationID of each NameID's group.
Uhm, I hope that was comprehensible?Unsure | :~
But thanks for you answer.



GeneralRe: correlated subselect Pin
SomeGuyThatIsMe4-Nov-08 8:31
SomeGuyThatIsMe4-Nov-08 8:31 
GeneralRe: correlated subselect Pin
Smithers-Jones4-Nov-08 8:52
Smithers-Jones4-Nov-08 8:52 
GeneralRe: correlated subselect Pin
SomeGuyThatIsMe4-Nov-08 9:39
SomeGuyThatIsMe4-Nov-08 9:39 
GeneralRe: correlated subselect Pin
Smithers-Jones5-Nov-08 0:43
Smithers-Jones5-Nov-08 0:43 
JokeRe: correlated subselect Pin
Smithers-Jones5-Nov-08 0:37
Smithers-Jones5-Nov-08 0:37 
GeneralRe: correlated subselect Pin
PIEBALDconsult5-Nov-08 14:39
mvePIEBALDconsult5-Nov-08 14:39 
QuestionOpinion on how to handle a DataSet Pin
stormydaniels4-Nov-08 0:05
stormydaniels4-Nov-08 0:05 
AnswerRe: Opinion on how to handle a DataSet Pin
Wendelius4-Nov-08 4:53
mentorWendelius4-Nov-08 4:53 
QuestionConfigure Auto Database Replication Problem Using Sql Server 2000 Pin
veereshIndia3-Nov-08 18:55
veereshIndia3-Nov-08 18:55 
AnswerRe: Configure Auto Database Replication Problem Using Sql Server 2000 Pin
Wendelius4-Nov-08 5:05
mentorWendelius4-Nov-08 5:05 
QuestionDebugging a stored procedure Pin
dptalt3-Nov-08 10:29
dptalt3-Nov-08 10:29 
AnswerThis doesn't answer your question Pin
Ennis Ray Lynch, Jr.4-Nov-08 4:30
Ennis Ray Lynch, Jr.4-Nov-08 4:30 
AnswerRe: Debugging a stored procedure Pin
Wendelius4-Nov-08 5:18
mentorWendelius4-Nov-08 5:18 
QuestionCTE to Build XML Pin
Michael Vivet3-Nov-08 1:51
Michael Vivet3-Nov-08 1:51 
AnswerRe: CTE to Build XML Pin
Wendelius4-Nov-08 6:58
mentorWendelius4-Nov-08 6:58 
GeneralRe: CTE to Build XML Pin
Michael Vivet5-Nov-08 1:43
Michael Vivet5-Nov-08 1:43 
GeneralRe: CTE to Build XML Pin
Wendelius5-Nov-08 9:57
mentorWendelius5-Nov-08 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.