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 |
|
noamg
Posting Yak Master
215 Posts |
Posted - 2008-02-26 : 10:51:39
|
| what wrong ?IF NOT EXISTS ( SELECT * FROM sys.schemas WHERE [name] = 'ATypes' )BEGIN CREATE SCHEMA [ATypes] AUTHORIZATION Owner_SchATypes; ENDGOwhy I get an error ?Noam Graizer |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-26 : 11:03:23
|
| It should be like this:IF EXISTS ( SELECT * FROM sys.schemas WHERE [name] = 'ATypes' )DROP SCHEMA [ATypes]GOCREATE SCHEMA [ATypes] AUTHORIZATION Owner_SchATypesGOHarsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
noamg
Posting Yak Master
215 Posts |
Posted - 2008-02-26 : 11:10:43
|
| so, I get this error:Msg 3729, Level 16, State 1, Line 2Cannot drop schema 'ATypes' because it is being referenced by object ...Noam Graizer |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-02-26 : 11:37:19
|
| It looks like you already have that schema.Check in Schema. |
 |
|
|
|
|
|