Author |
Message
|
saikrishna |
Posted: Thu Jul 30, 2015 2:21 am Post subject: How to pass ROW to procedure |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
while passing ROW to a procedure getting error.
Posting both code snippet and error. please help on this
CREATE PROCEDURE CopyEntireMessage() BEGIN
DECLARE x ROW;
set x=ROW('a','b');
CALL CallMessage(x);
END;
CREATE PROCEDURE CallMessage (IN x ROW)
BEGIN
No errors, but while depploying into EG am getting below error:
Syntax error : 'keyword Row'.
The token caused a syntax error.
Correct the syntax of your ESQL expression in node '. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 30, 2015 2:48 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Please do not open another thread when the other one is still active especially where you ask exactly the same question as you have done in the other thread. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
saikrishna |
Posted: Thu Jul 30, 2015 3:09 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
Look brother never classify any question as silly or excellent. there is no rule that every one should know everything. am new to ESQL.
If you know solution please post.
am expecting solution not non sense.
first u know basis purpose of any forums.
forums are open to share and discuss. |
|
Back to top |
|
 |
saikrishna |
Posted: Thu Jul 30, 2015 3:14 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
I got a solution: I declared param type as reference istead of row in procedure declaration as below. now it is working.
CREATE PROCEDURE CopyEntireMessage() BEGIN
DECLARE x ROW;
set x=ROW('a','b');
CALL CallMessage(x);
END;
CREATE PROCEDURE CallMessage (IN x REFERENCE)
BEGIN
can any one please tell what was the flaw I did previously ? |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 30, 2015 4:13 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
saikrishna wrote: |
Look brother never classify any question as silly or excellent. there is no rule that every one should know everything. am new to ESQL.
If you know solution please post.
am expecting solution not non sense.
first u know basis purpose of any forums.
forums are open to share and discuss. |
nowhere did I comment on your question directly. I was merely pointing out that postinbg the same question in two different threads is not how we do things around here. I started my post with 'Please'. I can't really be more polite that that.
Most, if not all of those who respond to questions here also have their job to do. We post here because we want to share our knowledge and understanding of the product with others.
However, we are not here to do your job for you. In many cases we may give you hints about the solution so that you can learn for yourself which you seem to have managed in this case. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
saikrishna |
Posted: Thu Jul 30, 2015 4:32 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
Yeah no more comments ....
So can you provide hint or solution why I got that error while passing a ROW type and catching that as ROW in procedure ?
DECLARE x ROW;
set x=ROW('a','b');
CALL CallMessage(x);
END;
CREATE PROCEDURE CallMessage (IN x ROW)
Same way why I didnt got any error while catching that as REFERENCE
DECLARE x ROW;
set x=ROW('a','b');
CALL CallMessage(x);
END;
CREATE PROCEDURE CallMessage (IN x REFERENCE) |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 30, 2015 4:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Obviously this is an question for you.
So going back to the Infocenter, what are the approved datatypes for parameters for a procedure call???
[last chance before you get moderated], just because you don't like the answer doesn't mean the answer was not accurate _________________ MQ & Broker admin |
|
Back to top |
|
 |
|