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
Call Stored Procedure and receive ODBC SQL messages
Moderators: chulett, rschirm, roy
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
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
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.
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.