The following procedure throwing error.
Basically the requirement is to send the CARDID to the virtual procedure and return card BALANCE and CARDID both back.
Full script is attached just in case for reference.
The errors are:
CREATE VIRTUAL PROCEDURE LOYALTY_IVR_BALANCE (IN CARDID string(17))
RETURNS TABLE (BALANCE long, CARDID string)
AS
BEGIN
IF (CARDID LIKE_REGEX('^(700436)([0-9]{11})$'))
BEGIN
SELECT
LOYALTY_IVR_PROVIDER_RU.LOYALTY_IVR_BALANCE.BALANCE,LOYALTY_IVR_PROVIDER_RU.LOYALTY_IVR_BALANCE.CARDID
FROM
LOYALTY_IVR_PROVIDER_RU.LOYALTY_IVR_BALANCE WHERE LOYALTY_IVR_PROVIDER_RU.LOYALTY_IVR_BALANCE.CARDID=LOYALTY_IVR_PROVIDER.LOYALTY_IVR_BALANCE.CARDID;
END
IF (CARDID LIKE_REGEX('^(700405)([0-9]{13})$'))
BEGIN
SELECT
LOYALTY_IVR_PROVIDER_UK.LOYALTY_IVR_BALANCE.BALANCE,LOYALTY_IVR_PROVIDER_UK.LOYALTY_IVR_BALANCE.CARDID
FROM
LOYALTY_IVR_PROVIDER_UK.LOYALTY_IVR_BALANCE WHERE LOYALTY_IVR_PROVIDER_UK.LOYALTY_IVR_BALANCE.CARDID=LOYALTY_IVR_PROVIDER.LOYALTY_IVR_BALANCE.CARDID;
END
END;
For both the result set column names and the parameter names are considered siblings for the purposes of naming. Can you change the name of the input parameter?