Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Create SP from select

Author  Topic 

trento
Starting Member

13 Posts

Posted - 2009-09-02 : 13:29:49
Hi,
I need you help, I have sql that I have to transport to some third party dba group to create sp, I just want to prepare before shipping my sql to them, what min set of requirements I need to creat sp?
does it alwayse need to be <CREATE PROCEDURE AS...> or actual code could be imported from other DB?
Let say I have valid SELECT.... and I have teamDB database name, is it enough to create SP?

Tx
Trent

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-02 : 13:31:51
you want to transport query as a procedure?
Go to Top of Page

trento
Starting Member

13 Posts

Posted - 2009-09-02 : 14:12:30
I'm complete dummy about sp, I have select and I need (or dba need to create) sp on specific db.
So probably it sounds like transport query.

Tx
Go to Top of Page

eralper
Yak Posting Veteran

66 Posts

Posted - 2009-09-02 : 14:13:55
You can pass parameters to stored procedures.

If you have where conditions within you select statements, you can pass those where clause criterias as sp parameter and within the sp code place the params as the accurate column conditions

So you might need to identify the where clause parameters and parameter types.



-------------
Eralper
http://www.kodyaz.com
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2009-09-02 : 14:21:37
creating sp's is easy, just look at the link below

http://www.sql-server-performance.com/articles/dba/stored_procedures_basics_p1.aspx

Go to Top of Page
   

- Advertisement -