cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation view with multiple selects using sql script

0 Kudos

Hi All,

I am trying to implement a logic where there are multiple selects which perform filtering and evaluate other conditions to get the result.

As a small example, i fetched the result of first select into "var_out1" and then did a simple select from it into "var_out".

On validation i get the error "var_out1 does not exist in SYSTEM schema".

Any suggestions on how to deal with this??? As there would be multiple selects into different variables in the program.

Thank you,

Preeti

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Preeti,

Can you please share the sample code which you are using? The syntax which you need to follow is

VAR_OUT= <<select statement>>

You can not write <<Select stament>>  INTO VAR_OUT. Remeber, in calculation view you can perform only read operation and not write operations. Ultimately, your Script Based calculation view acts as a read-only procedure with VAR_OUT as a parameter.

Also, since VAR_OUT1 is a local variable, try using a colon before its name i.e. :VAR_OUT1 instead of VAR_OUT1.

Regards,

Piyush

Answers (1)

Answers (1)

former_member184768
Active Contributor
0 Kudos

Hi Preeti,

Can you please post the code. Ideally the variables which contain the resultset (except for var_out) need not be defined explicitly. There could be some syntax issue. Hence the code will help identify the issue.

Regards,

Ravi