|
|
|
Forum Member
      
Group: Forum Members
Last Login: 1/25/2007 11:21:00 AM
Posts: 25,
Visits: 1
|
|
Hello everyone, is it is it possible to display contents of a table through stored procedure?If yes then can some one provide me with the syntax
appreciate your help
Thanks Regards
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 1/25/2007 11:21:00 AM
Posts: 25,
Visits: 1
|
|
|
I need to pass the table name as a parameter to the stored procedure
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2 days ago @ 3:41:05 AM
Posts: 522,
Visits: 264
|
|
You can't return an answerset through a SP, just a single line using SELECT INTO.
I don't understand, why you ever want to do that, but you could use dynamic sql within your SP, e.g.:
create procedure foo (myparam varchar(30); begin call dbc.sysexecsql( 'create volatile table bar as (select * from ' || :myparam || ') with data on commit preserve rows;') end;
call foo('blabla'); select * from bar;
Dieter
|
|
|
|