1

Trying to set up a defintion query from a connected database table in ArcGIS.

I am using this SQL (which runs properly in SQLDeveloper) but i keep on getting the error "The SQL expression has invalid syntax"

Any thoughts??

select distinct 
DYN.%BR_REPORTING.GENERATION_TONS, 
DYN.%BR_REPORTING.REPORT_CYCLE, 
DYN.%BR_REPORTING.HANDLER_NAME, 
DYN.%BR_REPORTING.HANDLER_ID 
from DYN.%BR_REPORTING 
where 1=1 and upper(DYN.%BR_REPORTING.REPORT_CYCLE) = 2017 
order by 
DYN.%BR_REPORTING.GENERATION_TONS, 
DYN.%BR_REPORTING.REPORT_CYCLE, 
DYN.%BR_REPORTING.HANDLER_NAME,
DYN.%BR_REPORTING.HANDLER_ID
  • 1
    A definition query is normally just a Where clause. Are you thinking of MakeQueryLayer? – klewis May 30 at 18:49
  • that absolutely did the trick, thank you! – Fred Mortensen May 30 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.