I'm trying to have temporary tables created to trasfer data and change the architecture of some tables. The process I'm using to create them is the following code in a stored procedure:
the problem is when I try dropping them (using query analyzer), I get errors like this:
Server: Msg 3701, Level 11, State 5, Line 1
Cannot drop the table '_temp_Translation_CM_SUBTYPE', because it does not exist in the system catalog.
I have also tried creating the table like the code below, but it still does not "exist in the system catalog" and will not allow me to drop it:
I also tried dropping it from a stored procedure as well, and it worked there!
Any idea why it can work in one and not the other? Am I doing something wrong with the code while creating the tables?
-Ovatvvon :-Q
Code:
CREATE TABLE _temp_Translation_CM_SUBTYPE
(
id int IDENTITY (1, 1) NOT NULL,
type_id int NOT NULL,
title varchar (50) NOT NULL,
icon_id int NULL,
CONSTRAINT PK_temp_CM_SUBTYPE PRIMARY KEY (id)
)
ON [PRIMARY]
the problem is when I try dropping them (using query analyzer), I get errors like this:
Server: Msg 3701, Level 11, State 5, Line 1
Cannot drop the table '_temp_Translation_CM_SUBTYPE', because it does not exist in the system catalog.
I have also tried creating the table like the code below, but it still does not "exist in the system catalog" and will not allow me to drop it:
Code:
CREATE TABLE _temp_Translation_CM_SUBTYPE
(
id int IDENTITY (1, 1) CONSTRAINT PK_temp_CM_SUBTYPE PRIMARY KEY NOT NULL,
type_id int NOT NULL,
title varchar (50) NOT NULL,
icon_id int NULL
)
ON [PRIMARY]
I also tried dropping it from a stored procedure as well, and it worked there!
Any idea why it can work in one and not the other? Am I doing something wrong with the code while creating the tables?
-Ovatvvon :-Q