You are here: Re: resultset of proc in another proc « MsSQL Server « IT news, forums, messages
Re: resultset of proc in another proc

Posted by helmut woess on 09/30/45 11:28

Am Wed, 05 Oct 2005 01:54:33 +0200 schrieb Simon Hayes:

> helmut woess wrote:
>> Hello,
>>
>> i want to use the result set from a stored proc in another stored proc, for
>> example:
>>
>> create stored procedure proc1 (@x int) as
>> declare @tbl (y1 int, y2 int)
>> insert into @tbl values(@ * @x, @x * @x * @x)
>> select * from @tbl
>> GO
>> --
>> create stored procedure proc2 (@x int) as
>> declare @tbl (y1 int, y2 int)
>> while @x > 0 begin
>> insert into @tbl select (exec proc1 @x) <-- this is my problem
>> set @x = @x - 1
>> end
>> select * from @tbl
>> GO
>> --
>>
>> I know i could use output parameters. But i want to know if something is
>> possible with SQL-Server?
>>
>> thanks,
>> Helmut
>
> This is a good summary of the options:
>
> http://www.sommarskog.se/share_data.html
>
> Simon

very good information!

thank you very much,
Helmut

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация