471,108 Members | 1,289 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

SELECT statement from within a Stored Procedure without INTO

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
3 2174

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
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
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.

Similar topics

6 posts views Thread by Patrick | last post: by
1 post views Thread by anilcool | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.