473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Procedure in Stored procedure??

Hi all,
Question from a guy who knows PL/SQL, but is starting with
Transac-SQL on SQL Server....

Is it possible to have a sub procedure in a Stored Procedure, like
we do in a PL/sql package ? Or better yet, have a kind of general
Stored Procedure that would contain procedures called by more than one
Stored Proc??

I can't find anything like this in the online books....

Thanks for your inputs....

Philip
Jul 20 '05 #1
2 4438
Hi

SQL Server does not have packages and limited scope for shared variables.

http://vyaskn.tripod.com/oracle_sql_...quivalents.htm
http://tinyurl.com/n7v6
http://www.algonet.se/~sommar/share_data.html
http://tinyurl.com/n7vc
http://www.algonet.se/~sommar/dynamic_sql.html

In general there should be no need to create a stored procedure within
another stored procedure, therefore I think you should think about your
requirements and design, rather than to do a parallel implementation that
mimicks your Oracle code.

John

"Philip" <th*********@yahoo.com> wrote in message
news:a2**************************@posting.google.c om...
Hi all,
Question from a guy who knows PL/SQL, but is starting with
Transac-SQL on SQL Server....

Is it possible to have a sub procedure in a Stored Procedure, like
we do in a PL/sql package ? Or better yet, have a kind of general
Stored Procedure that would contain procedures called by more than one
Stored Proc??

I can't find anything like this in the online books....

Thanks for your inputs....

Philip

Jul 20 '05 #2
Thanks ! And I'll chek out the links you gave me....
"John Bell" <jb************@hotmail.com> wrote in message news:<3f***********************@news.easynet.co.uk >...
Hi

SQL Server does not have packages and limited scope for shared variables.

http://vyaskn.tripod.com/oracle_sql_...quivalents.htm
http://tinyurl.com/n7v6
http://www.algonet.se/~sommar/share_data.html
http://tinyurl.com/n7vc
http://www.algonet.se/~sommar/dynamic_sql.html

In general there should be no need to create a stored procedure within
another stored procedure, therefore I think you should think about your
requirements and design, rather than to do a parallel implementation that
mimicks your Oracle code.

John

"Philip" <th*********@yahoo.com> wrote in message
news:a2**************************@posting.google.c om...
Hi all,
Question from a guy who knows PL/SQL, but is starting with
Transac-SQL on SQL Server....

Is it possible to have a sub procedure in a Stored Procedure, like
we do in a PL/sql package ? Or better yet, have a kind of general
Stored Procedure that would contain procedures called by more than one
Stored Proc??

I can't find anything like this in the online books....

Thanks for your inputs....

Philip

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
4
by: marc | last post by:
I've been developing a stored procedure that uses a user defined function in the query portion of the procedure. However, since the end product needs to allow for dynamic table names, the UDF will...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
3
by: kd | last post by:
Hi All, How to debug a stored procedure? Thanks, kd
1
by: ILCSP | last post by:
Hello, I'm trying to accomplish 3 things with one stored procedure. I'm trying to search for a record in table X, use the outcome of that search to insert another record in table Y and then exec...
9
by: fniles | last post by:
I am using VB.NET 2003 and SQL2000 database. I have a stored procedure called "INSERT_INTO_MYTABLE" that accepts 1 parameter (varchar(10)) and returns the identity column value from that table....
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
0
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.