Click here to Skip to main content
   

Database

 
AnswerRe: Older generation SQL syntax - Oracle PinmemberShameel15-Feb-13 5:17 
QuestionHaving a bad SQL day PinmemberTheComputerMan13-Feb-13 0:40 
AnswerRe: Having a bad SQL day PinmemberJörgen Andersson13-Feb-13 1:20 
GeneralRe: Having a bad SQL day PinmemberTheComputerMan13-Feb-13 1:32 
Ah yes. My bad
 
SELECT quakeid, latitude, longitude, (6371 * acos(cos(radians(37)) * cos(radians(latitude)) * cos(radians(longitude) - radians(-122)) + sin(radians(37)) * sin(radians(latitude)))) 
FROM tblUSGSData 
GROUP BY quakeid, latitude, longitude
HAVING (6371 * acos(cos(radians(37)) * cos(radians(latitude)) * cos(radians(longitude) - radians(-122)) + sin(radians(37)) * sin(radians(latitude)))) <= 50
 
works - at least does not produce an error. Not sure about the working bit but that is another story.
 
Many thanks.
GeneralRe: Having a bad SQL day [modified] PinmemberJörgen Andersson13-Feb-13 1:40 
GeneralRe: Having a bad SQL day PinmemberBernhard Hiller13-Feb-13 4:24 
GeneralRe: Having a bad SQL day PinmemberTheComputerMan13-Feb-13 4:33 
AnswerRe: Having a bad SQL day PinmemberShameel13-Feb-13 1:53 
GeneralRe: Having a bad SQL day PinmemberJörgen Andersson13-Feb-13 1:56 
GeneralRe: Having a bad SQL day PinmemberPIEBALDconsult13-Feb-13 5:01 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid