[AccessD] SQL Question

Martin Reid mwp.reid at qub.ac.uk
Fri May 11 09:20:31 CDT 2007


Running hte following returns three rows. I need it to return asingle row. Is there something missing. This is SQL Server 2005. The WHERE is ismply used for testing to restirct this to a single student.,
 
SELECT
[stdnt_nbr],[pos_crse_cd],[prsn_nbr],date_start_appntmnt, MAX (
[date_start_appntmnt] )
FROM [s335_stdnt_staff]
WHERE [stdnt_nbr] = XXXXXXXXXXXXXXXXXX
GROUP BY [stdnt_nbr],[pos_crse_cd],[prsn_nbr], date_start_appntmnt

 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974465
 
 


More information about the AccessD mailing list