Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Create Table statement in QlikView


Is it possible to execute a create table or replace view statement over ODBC in qlikview?

1 Solution

Accepted Solutions
Employee
Employee

Re: Create Table statement in QlikView

Try this

SQL EXEC REPLACE VIEW schema.ViewName AS LOCKING FOR ROW ACCESS

7 Replies
Employee
Employee

Re: Create Table statement in QlikView

QlikView can execute a stored procedure to build a table. One can also use inline tables to build content. Is this what you are referring to?

Not applicable

Re: Create Table statement in QlikView

Not exactly.  I literally need to execute a REPLACE VIEW in our database from QlikView.  I don't want to go the stored procedure route as this will limit my ability to scale this.  We use Teradata and I realize I could write a BTEQ script but again that creates more moving parts.  I was hoping there was a way to send the SQL directly back through QlikView however it appears that out of the box it can only parse a select statement.

vgutkovsky
Honored Contributor II

Re: Create Table statement in QlikView

Well, I haven't tried this myself, but I gather that this is possible by selecting the "Open Databases in Read and Write mode" checkbox in the script editor:

readwrite.png

Regards,

Vlad

Not applicable

Re: Create Table statement in QlikView

I tried that but Im getting an error "Unknown Statement".

Using syntax

REPLACE VIEW schema.ViewName

AS LOCKING FOR ROW ACCESS

Select * from schema.tablename

Employee
Employee

Re: Create Table statement in QlikView

Try this

SQL EXEC REPLACE VIEW schema.ViewName AS LOCKING FOR ROW ACCESS

Not applicable

Re: Create Table statement in QlikView

This worked except I had to remove the EXEC statement.

I guess it just needed to know that I was indeed passing SQL

vgutkovsky
Honored Contributor II

Re: Create Table statement in QlikView

As long as you also check the Read and Write checkbox, right...?

Community Browser