Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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
Specialist
Specialist

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

View solution in original post

6 Replies
simospa
Partner
Partner

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
Specialist
Specialist

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
Partner

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
Specialist
Specialist

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

View solution in original post

Not applicable
Author

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