Click here to Skip to main content
15,889,281 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to schedule a job in SQL Server 2005? Pin
Jerry Hammond11-Jun-09 4:26
Jerry Hammond11-Jun-09 4:26 
QuestionScalar / Navigation properties? Pin
pankazmittal10-Jun-09 7:48
pankazmittal10-Jun-09 7:48 
AnswerRe: Scalar / Navigation properties? Pin
saanj10-Jun-09 23:34
saanj10-Jun-09 23:34 
AnswerRe: Scalar / Navigation properties? Pin
Niladri_Biswas17-Jun-09 20:58
Niladri_Biswas17-Jun-09 20:58 
GeneralRe: Scalar / Navigation properties? Pin
pankazmittal18-Jun-09 3:30
pankazmittal18-Jun-09 3:30 
QuestionAutomatic Database Source Control System? Pin
Yuval Naveh10-Jun-09 4:08
Yuval Naveh10-Jun-09 4:08 
AnswerRe: Automatic Database Source Control System? Pin
Colin Angus Mackay10-Jun-09 5:07
Colin Angus Mackay10-Jun-09 5:07 
QuestionJOIN on two tables where with a MAX value [modified] Pin
Gareth H10-Jun-09 2:59
Gareth H10-Jun-09 2:59 
I want to do a JOIN on two tables, and return all the values from that JOIN where the SS.TIME_RECCEIVED is the MAX value. I have got the below SQL so far, but this only returns the two columns, i need them all. I tried doing SS.* but i a get
ORA-00979: not a GROUP BY expression<br />


SELECT SS.SERVICE, MAX(SS.TIME_RECEIVED)
FROM ISS_BSM_SVCSTATES_Table SS
INNER JOIN ISS_BSM_GeoLocation_Table GEO
ON SS.SERVICE = GEO.SERVICE_NAME 
GROUP BY SS.SERVICE
ORDER BY SS.SERVICE ASC


Any ideas?

On a side note, i've tried the below, but keep getting ORA-01722: invalid number, but if a just do a SELECT MAX() on its own, it does not complain about invalid number.

SELECT *
FROM ISS_BSM_SVCSTATES_Table SS
INNER JOIN ISS_BSM_GeoLocation_Table GEO
ON SS.SERVICE = GEO.SERVICE_NAME
WHERE SS.SERVICE = (SELECT MAX(SS.TIME_RECEIVED) FROM ISS_BSM_SVCSTATES_Table WHERE SS.SERVICE = GEO.SERVICE_NAME)


Regards,
Gareth.

(FKA gareth111)

modified on Wednesday, June 10, 2009 9:12 AM

AnswerRe: JOIN on two tables where with a MAX value Pin
Gareth H10-Jun-09 5:55
Gareth H10-Jun-09 5:55 
GeneralRe: JOIN on two tables where with a MAX value Pin
Blue_Boy10-Jun-09 21:22
Blue_Boy10-Jun-09 21:22 
GeneralDatabase Certificate................... Pin
Isaac Gordon10-Jun-09 1:34
Isaac Gordon10-Jun-09 1:34 
Questionexecute procedure Pin
Abdul Rahman Hamidy9-Jun-09 20:59
Abdul Rahman Hamidy9-Jun-09 20:59 
AnswerRe: execute procedure Pin
Vimalsoft(Pty) Ltd9-Jun-09 21:25
professionalVimalsoft(Pty) Ltd9-Jun-09 21:25 
GeneralRe: execute procedure Pin
Abdul Rahman Hamidy9-Jun-09 21:44
Abdul Rahman Hamidy9-Jun-09 21:44 
AnswerRe: execute procedure Pin
Vimalsoft(Pty) Ltd9-Jun-09 22:04
professionalVimalsoft(Pty) Ltd9-Jun-09 22:04 
GeneralRe: execute procedure Pin
Abdul Rahman Hamidy9-Jun-09 22:18
Abdul Rahman Hamidy9-Jun-09 22:18 
AnswerRe: execute procedure Pin
Ashfield10-Jun-09 1:16
Ashfield10-Jun-09 1:16 
GeneralRe: execute procedure Pin
Abdul Rahman Hamidy10-Jun-09 1:33
Abdul Rahman Hamidy10-Jun-09 1:33 
GeneralRe: execute procedure Pin
Ashfield10-Jun-09 2:58
Ashfield10-Jun-09 2:58 
GeneralRe: execute procedure Pin
Abdul Rahman Hamidy10-Jun-09 23:00
Abdul Rahman Hamidy10-Jun-09 23:00 
GeneralRe: execute procedure Pin
Ashfield11-Jun-09 1:29
Ashfield11-Jun-09 1:29 
QuestionSetting password to my own SQL database. Pin
deepseeindeepsy9-Jun-09 20:23
deepseeindeepsy9-Jun-09 20:23 
AnswerRe: Setting password to my own SQL database. Pin
Vimalsoft(Pty) Ltd9-Jun-09 21:07
professionalVimalsoft(Pty) Ltd9-Jun-09 21:07 
GeneralRe: Setting password to my own SQL database. Pin
deepseeindeepsy9-Jun-09 21:47
deepseeindeepsy9-Jun-09 21:47 
GeneralRe: Setting password to my own SQL database. Pin
Vimalsoft(Pty) Ltd9-Jun-09 21:59
professionalVimalsoft(Pty) Ltd9-Jun-09 21:59 

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.