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 |
|
azamsharp
Posting Yak Master
201 Posts |
Posted - 2005-12-31 : 23:47:50
|
| Hi, How can I pass database name to the stored procedures? I want to use something like this: USE Northwind But I cannot use USE statement inside the stored procedure. How can I achieve this. Thanks, AzamSharpMohammad Azam www.azamsharp.net |
|
|
sachinsamuel
Constraint Violating Yak Guru
383 Posts |
Posted - 2006-01-01 : 02:40:13
|
| why do you want to use 'Use' ??? You can directly write in your stored procedure as belowCreate proc test as select * from [northwind]..customersgoRegardssachinDon't sit back because of failure. It will come back to check if you still available. -- Binu |
 |
|
|
azamsharp
Posting Yak Master
201 Posts |
Posted - 2006-01-01 : 02:42:13
|
| Yeah thanks!Mohammad Azam www.azamsharp.net |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-02 : 01:54:27
|
| Usage of Use is not allowed inside stored Procedure and you need to use DbName..tableName as suggested or Dbname.owner.tableNameMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|