on 05-16-2017 9:13 AM
Hello ,
I am trying to convert a Scripted Calculation view to Graphical one.
Scripted one has a logic depending on the input parameter to execute a block of view/sql
Say .. If parameter has been passed. I check this my length of parameter. If more than Zero is Yes and IF ZERO is no.
{
yes block
}
else
{
No Block.
}
How can i achieve the same in CA graphical view.
Thanks in Advance.
Regards
Srikanth
Hi Srikanth,
As Florian mentioned the answer depends on your scenario, which is not exposed on your request.
Adding another solution with a different approach you can create two projections and later union it to prepare the output.
On each projection you put an expression as filter like:
projection source 1 expression: strlen( p_parameter) = 0
projection source 2 expression: strlen( p_parameter) > 0
The "magic" will happen on instantiation of view which will prune the false constant and execute only the true expression.
Hope this helps.
Regards, Fernando Da Rós
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution depends on what your logic is in the blocks.
For easy cases maybe the replacement can be done using calculated columns, for complex cases which cannot be realized in a graphical way, maybe a table function is necessary (in which you can do the same SQLScript logic) which is used as data source in a projection node of the graphical calc. view.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.