You are here: Re: Creating a View from a Stored procedure « MsSQL Server « IT news, forums, messages
Re: Creating a View from a Stored procedure

Posted by Roy Harvey (MVP) on 09/19/07 15:41

A view is a single SELECT statement. If you can write the stored
procedure as a single SELECT you can make that SELECT into a view.

Otherwise, you might look into Table Valued Functions.

Roy Harvey
Beacon Falls, CT

On Wed, 19 Sep 2007 14:43:04 -0000, apothecary <wamweri@gmail.com>
wrote:

>Hello
>
>Newbie here.
>
>Is there a way of creating a VIEW...using a stored procedure. I am
>basically trying to create a view to return some data that I am
>getting using a stored procedure.
>
>I have created the procedure and when I execute this its working ok.
>The stored procedure uses a datefrom and dateTo which I have set up by
>tweaking the getdate() and getdate()-2.
>
>In other words can you create a view like this
>
>CREATE VIEW view_test
>AS
> exec proc_test
>GO
>
>Any help will be greatly appreciated.
>
>Remmy

 

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

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