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.
Author |
Topic |
Bonzol
Starting Member
3 Posts |
Posted - 2007-11-02 : 05:59:20
|
Hello, just trying to call a stored procedure from another SP like this..CREATE PROCEDURE [TEstTHIS]ASBEGINEXEC dbo.CreateDateWareHouseENDand it saysCannot add rows to sys.sql_dependencies for the stored procedure because it depends on the missing table 'CreateDateWareHouse'. The stored procedure will still be created; however, it cannot be successfully executed until the table exists.it deafinatlly is a stored procedure,, im clearly doing this wrong? can anyone suggest to me how I can call a SP from another SP?Thanks in advance |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-02 : 06:06:06
|
It's just a warning to indicate that SQL Server was unable to locate stored proc - CreateDateWareHouse. If you want to avoid this warning, firstly compile CreateDateWareHouse stored proc and then TestThis SP.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
Bonzol
Starting Member
3 Posts |
Posted - 2007-11-02 : 06:18:27
|
ah ok! cheers, it works,, so yeah. But just out of interest how do I compile the SP? I thought it was when I executed it and it appeared as a registered SP |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-11-02 : 08:13:30
|
It's when it's first run. That's when you find out whether it will work or not.It's a bit of an issue that sql server is now happy to have missing tables and won't tell you about it until the SP is executed - it won't give an error when you create the sp. It will error if the table exists and a column is not there but if the table is missing it won't.Oddly it gives a warning if an SP is missing.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|