Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Need clarification on qlikview drop table statement

Hello,

I got a script like this.

Connect  to database (Oracle)

TEST :

SQL

Select * from dual;

drop table TEST;

My question is how qlikview differentiates the drop table statement is a qlikview one but not a oracle statement .

Thanks in advance for all your replies

1 Solution

Accepted Solutions
MVP
MVP

Re: Need clarification on qlikview drop table statement

You can think of an implicite SQL before your SELECT (SQL in front of SELECT is optional, both versions are valid syntax). So you have two SQL statements, both ended with a semi-colon.

7 Replies
MVP
MVP

Re: Need clarification on qlikview drop table statement

Good question ;-)

The SQL statement string ends with the semi-colon ';'

MVP
MVP

Re: Need clarification on qlikview drop table statement

Hi

Only the contents of the SQL statement get passed to the DB server (ie up to the ; ), so the drop table is executed by QV, not the DB.

Hope that helps

Jonathan

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

Re: Need clarification on qlikview drop table statement

But i tried like this and it gave me the explain plan. So does that mean  qilkview ends the DB script immediately after first occuring SELECT statement ?

Connect  to database (Oracle)

TEST :

SQL

explain  plan for Select * from dual;

select * from table(dbms_xplan.display);

drop table TEST;

MVP
MVP

Re: Need clarification on qlikview drop table statement

Up to the semicolon. You would need two SQL statements to send two queries.

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

Re: Need clarification on qlikview drop table statement

Hello Jonathan,

Thank you. But it gave me with single SQL statement .Thats were i got confused.

MVP
MVP

Re: Need clarification on qlikview drop table statement

You can think of an implicite SQL before your SELECT (SQL in front of SELECT is optional, both versions are valid syntax). So you have two SQL statements, both ended with a semi-colon.

Not applicable

Re: Need clarification on qlikview drop table statement

Thank you swuehl. I never knew that. That answers my question.

Community Browser