AnsweredAssumed Answered

What syntax do I use to ExecuteSQL in a FM script against an Oracle ODBC source?

Question asked by markjulie on Sep 17, 2012
Latest reply on Sep 19, 2012 by Greg

My enterprise Oracle ODBC source is already setup as a DSN and properly shows Oracle data in shadow tables that have a 1:1 relationship in my FMDB. I have created a unique FMPA record for each distinct primary key combo of ACCT_NO and FCILTY_ID. Those records are created by importing all records from an Oracle sandbox table.

 

After creating a record, I then need all ICD9 codes associated with that record (anywhere from 1-50 codes). I used this ExecuteSQL query which returns '?' in the calculated field. I have also tried INNER JOIN with similar results.

 

ExecuteSQL (
"SELECT

e::ICD9_DX_CD

FROM CM.ENCNTR_ICD9_DX e
LEFT JOIN StrokeGWTG s
ON s::ACCT_NO = e::ACCT_NO

AND s::FCILTY_ID=e::FCILTY_ID

WHERE e::ICD9_DX_SEQ=1";",";"¶")

 

Can this query work, and how should I modify it?

 

Mark

Outcomes