Page 1 of 1

Posted: Tue Jul 13, 2004 6:21 pm
by rasi
Hi

The reason could be becos the procedure sends two output out of which datastage gets the last output regardless whatever is been done before. Either you could take out the Print command or try to call two procedures (which is not efficient).

Thanks
Siva

Posted: Tue Jul 13, 2004 6:29 pm
by Sandra
Hi,

We have many such update and print statements in the procedure.
What we are trying to do is, capture how many records / rows affected for each of the SQL statements and also get the corresponding 'print' messages from the procedure.

So that when the user looks at the log, they will know the results.

Thanks,
Sandra

Posted: Tue Jul 13, 2004 6:41 pm
by rasi
If you have multiple sql and want to capture all the result then try to output to a file and once the procedure is finished read the file and put it in the output log.

Cheers
Siva

Posted: Wed Jul 14, 2004 4:31 am
by mandyli
Hi

Inside the procedure (if MS SQL or Oracle or Sybase) don’t return string value return 1 or 0 for validation ok. Please use following way

[code][b]Alter PROCEDURE dbo.UpdatedAuthors
AS
BEGIN

UPDATE authors
SET au_fname = 'Annie'
WHERE au_fname = 'Anne'

IF @@ROWCOUNT = 0

Return 0

End

END[/b][/code]

Don’t use print stmt in SP.