By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,236 Members | 1,292 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,236 IT Pros & Developers. It's quick & easy.

SELECT statement from within a Stored Procedure without INTO

P: n/a
FM
Hello:

Is there a posibility to execute a SELECT statement from within a
Stored Procedure without INTO?
I'm getting error SQL0104N but don't know how to do it.

Any idea?

Tahnks in advance for your help.

Sep 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

FM wrote:
Hello:

Is there a posibility to execute a SELECT statement from within a
Stored Procedure without INTO?
I'm getting error SQL0104N but don't know how to do it.

Any idea?

Tahnks in advance for your help.

hi,
i think u have to declare a cursor for that then fetch the values in
to it and
what is the error message u r getting

Sep 6 '06 #2

P: n/a
situ wrote:
FM wrote:
>Hello:

Is there a posibility to execute a SELECT statement from within a
Stored Procedure without INTO?
I'm getting error SQL0104N but don't know how to do it.

Any idea?

Tahnks in advance for your help.


hi,
i think u have to declare a cursor for that then fetch the values in
to it and
what is the error message u r getting
If all you do is assign a single column you can use the SET statement.
SET a = (SELECT MAX(c1) FROM T);
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 6 '06 #3

P: n/a
FM
Thanks to all!!
Finally it works fine!
If i could help somebody with this topic or something else don't
hesitate to contact me.

Regards

Serge Rielau wrote:
situ wrote:
FM wrote:
Hello:

Is there a posibility to execute a SELECT statement from within a
Stored Procedure without INTO?
I'm getting error SQL0104N but don't know how to do it.

Any idea?

Tahnks in advance for your help.

hi,
i think u have to declare a cursor for that then fetch the values in
to it and
what is the error message u r getting
If all you do is assign a single column you can use the SET statement.
SET a = (SELECT MAX(c1) FROM T);
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.