NETEZZA - anyone have a sample how to return a table from a sp ?
Posted on 2013-12-27
We are migrating certain database and SPs to netezza.
We have an sp in Sql server 2008 which does a join between 2 tables and returns the join.
How can i write this in netezza as an sp.
As far as i read the doc, it says that it can return only an existing table. does it mean i have to create a permenant table and then insert into that table and then return ?
any sample which shows how to create an sp and return an ondemand query results from join of 2 tables would be useful .
S.CURRENCY, --NULL AS CURRENCY,
S.RESULTVALUE2 AS RESULTVALUE,
SIMRESULTBASE_D S ,
WHERE S.SIMID = pSIMID
AND P.SIMULATIONID = pSIMID
AND P.SIMULATIONID = S.SIMID
AND P.POSITIONUID = S.POSITIONUID
AND P.POSITIONID >= pSTARTPID
AND P.POSITIONID <= pENDPPID
AND S.VALUEID = pRESULTID
AND LENGTH(S.CURRENCY) > 0