Skip to Content
avatar image
Former Member

Calling a calc view with 3 Input Parameters from a Table Function code

Hi

I am trying to call a calculation view (with 3 IP's) from a Table Function based on the following logic:

If (some logic) THEN

var_temp = SELECT some fields from Calc View 1

ELSE

var_temp = SELECT some fields from Calc View 2

END

RETURN

....

Now the my Calc View 1 or Calc View 2 has 3 Input Parameters each which I need to pass when I am calling them as above. But I am getting syntax error, no matter what I try. I am able to call a CV with 1 IP though. The problem starts the moment I am trying to call a CV with multiple Input Parameters.

Code that I am using to call the CV is as follows and I am getting syntax error:

SELECT	 "ABC", "PQR", "XYZ"
FROM ("<Package_name>/CV1"('PLACEHOLDER' = ('$$IP_STORE$$', :I_IP1),
'PLACEHOLDER' = ('$$IP_DATETO$$', :I_IP2),
'PLACEHOLDER' = ('$$IP_DATEFROM$$', :I_IP3)) ;

Please note that I am taking the values of I_IP1, I_IP2 and I_IP3 by passing them to the Table function in the first line as follows

FUNCTION"<PACKAGE_PATH>::TF_NAME" (I_IP1 NVARCHAR(4), I_IP2 NVARCHAR(10), I_IP3 NVARCHAR(10))

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers