Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring to Stored Proceduers within a Stored Procedure?

Status
Not open for further replies.

mangocinn

Programmer
Joined
Jul 26, 2001
Messages
66
Location
US
I am pretty new to SQL Server...so please bare with me...

I'm converting an Access DB into a SQL Server Database.
In Access I was able to query on two other queries.
Ex.
Select * from (QueryA) left join (QueryB) on QueryA.IDNum = QueryB.IDNUm

In SQL Server, can I refer to stored procdures within a stored procedure? If so, how?
 

The queries you JOIN in Access should be converted to VIEWs in SQL Server. The you can JOIN the VIEWs. You can execute STORED PROCEDURES From other STORED PROCEDURES but you don't JOIN them. I suggest reading about VIEWs and STORED PROCEDURES in SQL Books Online (SQL BOL). Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thanks tlb...I'm reading up on some stuff.

I'm approaching a deadline...so I'm kinda rushing...
one question...Can you pass parameters to a view?
 

A view is, in reality, a virtual table. You can select from and if updateable, update, delete and insert into a view like a table. You can use criteria to select rows to be acted upon. However, views don't have parameters. You cannot create "parameterized views" as you could create parameterized queries in Access.

You can create a parameterized stored procedure and have the stored procedure return a record set, update a table, etc. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top