drop / create table
От: KetchUp Inside aka Zig  
Дата: 22.01.04 07:56
Оценка:
MSSQL2K
вот такой запрос:

if ( SELECT OBJECT_ID('tempdb..#t1') ) is not null
drop table #t1

create table #t1 (Дата datetime, Товар int, КолОптРос numeric(15, 4))
create index ix_t1_date on #t1(Дата)
create index ix_t1_good on #t1(Товар)



if ( SELECT OBJECT_ID('tempdb..#t1') ) is not null
drop table #t1

create table #t1 (Дата datetime, Товар int, КолОптРос numeric(15, 4))
create index ix_t1_date on #t1(Дата)
create index ix_t1_good on #t1(Товар)


выполненный в QA выдает

Server: Msg 2714, Level 16, State 1, Line 13
There is already an object named '#t1' in the database.


может кто подскажет как это побороть?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.