Skip to Content

Calculation view with multiple selects using sql script

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2013 at 05:32 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 07, 2013 at 05:33 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded