Click here to Skip to main content
15,911,762 members
Home / Discussions / Database
   

Database

 
QuestionSum for Trend Pin
indian1438-Jul-10 16:51
indian1438-Jul-10 16:51 
AnswerRe: Sum for Trend Pin
Mycroft Holmes8-Jul-10 23:00
professionalMycroft Holmes8-Jul-10 23:00 
Questionauto pagination in sql Pin
Ebube8-Jul-10 2:34
Ebube8-Jul-10 2:34 
AnswerRe: auto pagination in sql Pin
Eddy Vluggen8-Jul-10 3:19
professionalEddy Vluggen8-Jul-10 3:19 
QuestionComplex Query Pin
indian1437-Jul-10 12:29
indian1437-Jul-10 12:29 
AnswerRe: Complex Query Pin
Dr.Walt Fair, PE7-Jul-10 13:03
professionalDr.Walt Fair, PE7-Jul-10 13:03 
GeneralRe: Complex Query Pin
indian1437-Jul-10 14:22
indian1437-Jul-10 14:22 
QuestionSQL Select Question Pin
Aptiva Dave7-Jul-10 8:25
Aptiva Dave7-Jul-10 8:25 
Got myself a head scratcher here. I'm needing to pull employee names and pictures from a database, which I can do with the following select:
SELECT     dbo.vwEmployee.BadgeName, dbo.Image.Photo, dbo.vwEmployee.Updated
FROM         dbo.Image INNER JOIN
                      dbo.vwEmployee ON dbo.Image.OwnerGUID = dbo.vwEmployee.OwnerGUID
WHERE     (dbo.vwEmployee.Department = 'IT')


Problem is that the application that was used to store the employee information and photos also keeps every photo taken of the employee. I want to be able to return only the row with the most recent photo taken (or the first instance of the most recent update since some have multiple records with the same updated date). I know I can do this with the application I am writing to use this query, but I would rather let the SQL Server do most of the heavy lifting and to further narrow down my results.
AnswerRe: SQL Select Question Pin
Corporal Agarn7-Jul-10 8:56
professionalCorporal Agarn7-Jul-10 8:56 
AnswerRe: SQL Select Question Pin
Dr.Walt Fair, PE7-Jul-10 10:22
professionalDr.Walt Fair, PE7-Jul-10 10:22 
AnswerRe: SQL Select Question Pin
Jeremy Hutchinson14-Jul-10 8:01
professionalJeremy Hutchinson14-Jul-10 8:01 
QuestionUniqueIdentifier Foreign Key Pin
tek 20096-Jul-10 23:43
tek 20096-Jul-10 23:43 
AnswerRe: UniqueIdentifier Foreign Key Pin
Ray Cassick7-Jul-10 2:25
Ray Cassick7-Jul-10 2:25 
AnswerRe: UniqueIdentifier Foreign Key Pin
Bernhard Hiller7-Jul-10 3:52
Bernhard Hiller7-Jul-10 3:52 
AnswerRe: UniqueIdentifier Foreign Key Pin
Mycroft Holmes7-Jul-10 13:09
professionalMycroft Holmes7-Jul-10 13:09 
QuestionExcel to Access Pin
KORCARI6-Jul-10 6:04
KORCARI6-Jul-10 6:04 
AnswerRe: Excel to Access Pin
riced6-Jul-10 6:50
riced6-Jul-10 6:50 
QuestionBlatant advertising Pin
Richard MacCutchan5-Jul-10 6:55
mveRichard MacCutchan5-Jul-10 6:55 
AnswerRe: Blatant advertising Pin
J4amieC5-Jul-10 21:56
J4amieC5-Jul-10 21:56 
GeneralRe: Blatant advertising Pin
Richard MacCutchan5-Jul-10 22:02
mveRichard MacCutchan5-Jul-10 22:02 
Questionsql function Pin
Thanusree Duth5-Jul-10 2:28
Thanusree Duth5-Jul-10 2:28 
AnswerRe: sql function Pin
Simon_Whale5-Jul-10 2:52
Simon_Whale5-Jul-10 2:52 
AnswerRe: sql function Pin
J4amieC5-Jul-10 3:24
J4amieC5-Jul-10 3:24 
Questionsql Pin
Thanusree Duth4-Jul-10 23:02
Thanusree Duth4-Jul-10 23:02 
AnswerRe: sql Pin
J4amieC4-Jul-10 23:58
J4amieC4-Jul-10 23:58 

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.