dbTalk Databases Forums  

Crerating Tabels with stored procedure

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Crerating Tabels with stored procedure in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ingmar
 
Posts: n/a

Default Crerating Tabels with stored procedure - 03-09-2010 , 09:09 AM






Helllo
Can somebody help me with the following.
I have a stored procedure likt this example:

ALTER PROCEDURE "DBA"."T_Test" (IN gs_test CHAR(6))
begin
select
o.test as test,
o.test1 as test1,
0.test2 as test2,
into #t1
from
Test O,
where o.test = gs_test;
select *
from #t1
END

What I want is to call this stored procedure and then put the result
in a new tabel created by the stored procedure.
Is that possible.

Reply With Quote
  #2  
Old   
tduemesnil
 
Posts: n/a

Default Re: Crerating Tabels with stored procedure - 03-10-2010 , 02:32 PM






On 9 Mrz., 16:09, Ingmar <ingmarthomas... (AT) gmail (DOT) com> wrote:
Quote:
Helllo
Can somebody help me with the following.
I have a stored procedure likt this example:

ALTER PROCEDURE "DBA"."T_Test" (IN gs_test CHAR(6))
begin
insert into #t1
select
o.test as test,
o.test1 as test1,
0.test2 as test2,
from
Test O,
where o.test = gs_test;
select *
from #t1
END
The usage of # in front of a tablename generates a temporary table.
Take a look in the docs.

HTH

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.