Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there any function available in Qlikview which gives us currently connected Database name?
Attached herewith screenshot for reference. I want to store these values in Variable.
Regards,
Swapnil
When a user interacts with a Qlikview document there is no connection with a database. Only when the document is reloading will there be a connection with a database. If you want you can create variables in the script containing the connection information, but you have to set the values yourself. You could then use the variables in the CONNECT statement too. What some developers do is create files for small script snippets for connection statements and use the include or must_include variables to insert these script files in the script.
Most of my data sources are Oracle databases and I often need to extract the Oracle User Name and include it as a field in the QlikView table. Which I do using this SQL.
SELECT user FROM dual ;
So for that Variable i need to insert connection information manually. I will not get it automatically.
Is it right?
That's correct.
Well, yes, you can get all sorts of metadata from a dbms too. But if you first specify you want to connect to database foo as user bar and you then want this values available as variables as well, why not create them as variables in the first place and then reuse those variables in the connect statement?
Yup - there is more than one way to skin a cat.