Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems with scripting SQL query in Qlik

Hello,

Originally I had written the below basic query in an Access db and was connecting through ODBC.

However, since this is now set up to automatically generate daily on a trigger, I need to get the script into Qlik.

Could someone please offer advice on what I may be doing incorrectly as I keep getting syntax errors.

Thank you!

Karen

<ODBC Connect to...>

LogEventData:

Load *;

SELECT pat."CASE_CONFIRMATION_NUM"

, cnc."PATIENT_ID"

, cnc."CNC_TYPE"

, cnc."CHOICE_TEXT"

FROM SISI."CNC_COMMENT" cnc

INNER JOIN

SISI."MFV_PAT_SCHEDULING" pat

ON (cnc."PATIENT_ID" = pat."PATIENT_ID")

WHERE cnc."CNC_TYPE" = 'Flip Room Case'

cnc."CHOICE_TEXT"='Yes';

1 Solution

Accepted Solutions
t_chetirbok
Creator III
Creator III

if the issue is not resolved, then post logfile, please

View solution in original post

6 Replies
simospa
Partner - Specialist
Partner - Specialist

Hi,

remove the quotes.

SELECT pat.CASE_CONFIRMATION_NUM

, cnc.PATIENT_ID

, cnc.CNC_TYPE

, cnc.CHOICE_TEXT

FROM SISI.CNC_COMMENT cnc

INNER JOIN

SISI.MFV_PAT_SCHEDULING pat

ON (cnc.PATIENT_ID = pat.PATIENT_ID)

WHERE cnc.CNC_TYPE = 'Flip Room Case'

cnc.CHOICE_TEXT='Yes';

S.

t_chetirbok
Creator III
Creator III

Hi!

Maybe if you'll add "sql" on the front "select ..", it will be ok.

Not applicable
Author

Sorry for a late reply...Simone and Tatsiana, I tried both your suggestions and unfortunately, neither made a difference (still getting an error).

Thank you

simospa
Partner - Specialist
Partner - Specialist

Enable log (Settings --> Document Properties --> General --> Generate Logfile

and - after reloading - paste here the trace with error so we could understand better.

S.

t_chetirbok
Creator III
Creator III

if the issue is not resolved, then post logfile, please

Not applicable
Author

There was a securities issue with the ODBC that the admin was able to resolve; thank you all for your help!