Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Clever_Anjos
Employee
Employee

Try this

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

View solution in original post

7 Replies
Greg_Williams
Former Employee
Former Employee

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
Author

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
Master II
Master II

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
Author

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

Clever_Anjos
Employee
Employee

Try this

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

Not applicable
Author

This worked except I had to remove the EXEC statement.

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

vgutkovsky
Master II
Master II

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