Skip to content

Instantly share code, notes, and snippets.

@davidray
Created May 13, 2009 20:51
Show Gist options
  • Save davidray/111290 to your computer and use it in GitHub Desktop.
Save davidray/111290 to your computer and use it in GitHub Desktop.
2009-05-13 16:51:09 EDT ERROR: syntax error at or near "ORDER" at character 846
2009-05-13 16:51:09 EDT STATEMENT: SELECT DISTINCT
MorbidityEvents.investigating_jurisdiction AS COL0
,MorbidityEvents.investigator AS COL1
,MorbidityDiseases.disease_name AS COL2
,MorbidityPatients.last_name AS COL3
,MorbidityPatients.first_name AS COL4
,MorbidityPatients.birth_date AS COL5
FROM trisano.dw_morbidity_diseases_view MorbidityDiseases RIGHT OUTER JOIN
(
trisano.dw_morbidity_events_view MorbidityEvents JOIN trisano.dw_morbidity_patients_view MorbidityPatients
ON ( MorbidityEvents.dw_patients_id = MorbidityPatients.id AND ( MorbidityEvents.date_updated >= date '2009-04-01' ) )
)
ON ( MorbidityEvents.disease_id = MorbidityDiseases.id )
WHERE
(
MorbidityEvents.investigating_jurisdiction = MorbidityEvents.investigating_jurisdiction
) AND
ORDER BY
COL0
,COL1
,COL2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment