Can anybody solve this stored procedure ? I AM GETTING ERROR :( CREATE PROCEDURE SP_TABLE_NAMES_BOFC_TO_CCR_BW_AC_USD_CF(OUT RETURNVAL NVARCHAR(50), Category NVARCHAR(255), DataEntryPeriod NVARCHAR(255), scope NVARCHAR(25), GV_VARIANT NVARCHAR(255), Currency NVARCHAR(10)) LANGUAGE SQLSCRIPT AS Table_Names nvarchar(255); Category := 'AC-USD'; DataEntryPeriod := '2011.12'; GV_VARIANT := 'ARE-ORIGINAL'; Scope := 'KO'; Currency := 'USD'; BEGIN SELECT COALESCE(:Table_Names || +',\', '\') || 'ct_co\' || RIGHT('0000\' || CAST("id" AS varchar(4)), 4) INTO Table_Names FROM "BFC"."ct_coref" WHERE phase := (SELECT id FROM "BFC"."ct_phase" WHERE name := :Category) AND updper := (CAST(LEFT(:DataEntryPeriod, 4) AS integer) - 1900) * 262144 + (CAST(RIGHT(:DataEntryPeriod, 2) AS integer) * 8192) AND scope := (SELECT id FROM "BFC"."ct_scope_code" WHERE name := :Scope) AND variant IN (SELECT id FROM "BFC"."ct_variant" WHERE name := :GV_VARIANT) AND curncy = (SELECT id FROM "BFC"."ct_curncy" WHERE name := :Currency); RETURNVAL := (:Table_Names); END;
↧