Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Comment sign in external sql file

Hello!

For loading data from databse tables I use exteranal sql-script files attaching it like this:

$(Include=rows.sql);

Before start loading I debug query in Database Query Analyser.

The problem is in comments. SQL comment style looks like:

-- My Comment

But signs "--" cause error in QlikView.

QlikView comment style "//" causes error in SQL Query Analyser.

How can I write comments in external sql-script so that still work in Query Analyser?

1 Solution

Accepted Solutions
MVP
MVP

Re: Comment sign in external sql file

Hi

I am not sure how you are using this particular include file, but it is no different than anywhere else in the script. Statements executed by SQL server (ie after a SQL statement up to the closing ; sign) need -- SQL comments, and all other statements need // QV comments.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
5 Replies
MVP
MVP

Re: Comment sign in external sql file

Hi

I am not sure how you are using this particular include file, but it is no different than anywhere else in the script. Statements executed by SQL server (ie after a SQL statement up to the closing ; sign) need -- SQL comments, and all other statements need // QV comments.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bbi_mba_76
Valued Contributor

Re: Comment sign in external sql file

Hi,

maybe you could use the /* */ notations.

Not applicable

Re: Comment sign in external sql file

Hi Pavel,

You can use find and replace functionality and replace all -- with // in your external script.

Thanks & Regards

Suhas Gupta

Not applicable

Re: Comment sign in external sql file

Thank you very much Jonathan!

It realy works!

MVP
MVP

Re: Comment sign in external sql file

Michele Barini wrote:

Hi,

maybe you could use the /* */ notations.

Good suggestion - that would also work.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein