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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data from view (error)

Normally I accede to the tables of a bbdd to take the necessary information. In this case are trying the access to a view but it gives me mistake.

In the previous view of the assistant when I select a table I see the columns with the corresponding records, but in the case of the view I only see the columns that compose the view as if it was not reading the records. The script appears well...

When I execute the script, a mistake appears to me:
SQL Error: |o|p|´| sqlerrm(view_name)
SQL Scripline:
SQL State: 42000
VIEW:
SQL SELECT * FROM view_name


I have asked if the views have special permissions and have said to me that if I can accede to the tables must be able to accede to the views.

Also I have tried with other views and to load a table before the view (in this case I recibed other error). The document is new and it hasnt macros or variables.

Qlikview 8.5 without server


Thanks

7 Replies
Not applicable
Author

Googling SQL State: 42000 gives "Syntax error or access violation". Looks like there is some problems with your access rights. Have you tried accessing the view with a dbms?

/Michael

Miguel_Angel_Baeyens

Can you please post some load code so we can check it?

Something like

LOAD *; SQL SELECT * FROM VIEW_NAME;
should work.

Try with the assistant as well (Script Editor -> Connect -> OLE DB -> following instructions), as it provides you with a previous load and view of those fields contained in the view, so you acn load only relevant fields.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


IMQQLIK wrote:I have asked if the views have special permissions and have said to me that if I can accede to the tables must be able to accede to the views.


Not necessarlity true. What DBMS are you using?

-Rob

Not applicable
Author

I dont use any DBMS. They give me a user and password to accede across Qlikview, the tables to which I must accede, the fields that I must load...

They had said to me that it was not a topic of permissions, but I am insisting in order that they should verify it...

Script:
ODBC CONNECT TO ZZZZZZZZ (XUserId is xxxxx, XPassword is yyyyyy);

TABLE:
SQL SELECT * FROM bbdd.view_name;



Thanks!!!

Miguel_Angel_Baeyens


IMQQLIK wrote:
TABLE:
SQL SELECT * FROM bbdd.view_name;


This should be preceded by a LOAD clause, in the same way I posted before. "Table:" is the name you will use to reference the table in QlikView, LOAD followed by the fields separated by comma, or LOAD *; (see the semicolon) to get all fields and then the SQL SELECT statement as you wrote.

Not applicable
Author

It should work, but as Rob asked, what is the DBMS, the database used ?

It can be a right access on the wiew, or the tables...

But I already did it in Sybase ASE, Oracle, SQL, it is working fine...

Rgds,

Sébastien

Not applicable
Author

Hi,

Solved!!

Everything has been for the user indicated in the ODBC, he didnt have permissions to accede to the views...).

THANK YOU VERY MUCH.