DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 133

Points: 2153

Post Posted: Wed Sep 19, 2018 3:28 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Server
OS: Windows
Additional info: NETEZZA
Hey guys, I have been reading up on for loops as I am hoping to simplify one of our cleanup tasks. I started reviewing here:
http://dwgeek.com/netezza-nzplsql-control-structures.html/

and attempted to run a for loop straight up and this fails miserably, nzsql and aginity are expecting something before the FOR. Continuing my reading I've come across several examples such as this:
Code:
CREATE OR REPLACE PROCEDURE generateTime(integer)
LANGUAGE NZPLSQL RETURNS varchar(255) AS

BEGIN_PROC

DECLARE
        p_abc     integer;
        p_bcd     integer;

        p_var1    ALIAS FOR $1;

BEGIN
        p_bcd := ISNULL(p_var1, 10);

        raise notice 'p_bcd=%',p_bcd;

        FOR p_abc in 0..(p_bcd)
        LOOP
                raise notice 'Hello World %', p_abc;
        END LOOP;
END;
END_PROC;


However when attempting something like this I get an error as follows:
Code:
ERROR:  'CREATE OR REPLACE PROCEDURE generateTime(integer) LANGUAGE NZPLSQL RETURNS varchar(255) AS BEGIN_PROC DECLARE p_abc integer'
error                                                                                              ^ found "" (at char 91) unterminated BEGIN_PROC string


I'm curious how one goes about doing this?

_________________
-Me
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42834
Location: Denver, CO
Points: 220807

Post Posted: Thu Sep 20, 2018 6:06 am Reply with quote    Back to top    

Probably best to post this in a dedicated Netezza support forum...

_________________
-craig

Your brain is full of spiders, you've got garlic in your soul, Mr. Grinch!
I wouldn't touch you With a thirty-nine-and-a-half foot pole!
Rate this response:  
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 133

Points: 2153

Post Posted: Thu Sep 27, 2018 2:56 pm Reply with quote    Back to top    

Opened a case with IBM after the one and only netezza specific forum based site I posted on got no response. Seems like a dead site.... Stack Exchange I suppose could work but I've never been a fan of posting there. I will update this again once I get a solution from IBM.

_________________
-Me
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours