Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pawwy1415
Contributor II

how to convert pl-sql logic into qlik

Hi,

how to conver pl-sql logic into qlik view script please.

7 Replies
undergrinder
Valued Contributor II

Re: how to convert pl-sql logic into qlik

Hi P Kumar,

The official help site contains many important and helpful content.

Home ‒ Qlik Sense

Maybe you don't have to convert logic, if you are send sql to server directly, or stored procedure get back with data.

Please do not duplicate the threads

how to convert pl-sql logic into qlik logic

It makes harder to follow the discussion.

G.

undergrinder
Valued Contributor II

Re: how to convert pl-sql logic into qlik

Create a stored procedure in server then use the following command in qlik data load editor:


SQL Execute <storedProc>;

SQL ‒ Qlik Sense

G.

pawwy1415
Contributor II

Re: how to convert pl-sql logic into qlik

Hi,

Thanks for reply. 1st thread is not repeated and 2nd it's not possible not convert into Store procedure.. Is there anyway if I can directly load this query into QVD and then use it.. Can you make relevant changes which need to do please.

undergrinder
Valued Contributor II

Re: how to convert pl-sql logic into qlik

Hi Kumar,

Sorry, I didn't noticed the attachments are different.

I skim the Query1 and I noticed there is a @Prompt command in there.

eg.:

@Prompt ('1. Enter Start Date of Range in Fomat DD-MON-YYYY','A',,MONO,FREE),'DD-MON-YYYY')

I think these commands should be replaced e.g. with variables.

G.

undergrinder
Valued Contributor II

Re: how to convert pl-sql logic into qlik

And try elaborate the SQL in Qlik topic, start with an easy select * from Table, then you will be able to

create a beutyful and professional queries

Good luck!

pawwy1415
Contributor II

Re: how to convert pl-sql logic into qlik

Can you please give example how we can replace this with variables?

undergrinder
Valued Contributor II

Re: how to convert pl-sql logic into qlik

Hi,

Quer1 contains the following snippet:

WHERE STDATE BETWEEN TO_DATE(@Prompt ('1. Enter Start Date of Range in Fomat DD-MON-YYYY','A',,MONO,FREE),'DD-MON-YYYY') AND

TO_DATE(@Prompt ('2. Enter End Date of Range in Fomat DD-MON-YYYY','A',,MONO,FREE),'DD-MON-YYYY')

The where clause is waiting two dates as input.

Declare two variable e.g. startdate and enddate

let startdate = date('2016-01-01','YYYY-MM-DD');

let enddate = date('2016-01-31','YYYY-MM-DD');

And modify the where clause:

WHERE STDATE BETWEEN '$(startdate)' AND '$(enddate)'

Hope this helps.

G.