HELP, unbelievable problem about temporary table

From: Alex Lee (anonymous_at_discussions.microsoft.com)
Date: 04/13/04


Date: Tue, 13 Apr 2004 05:51:08 -0700

to avoid using cursor, i create a temporary table like this:
create table #INS_DETAIL
(
  SN int not null identity, --
  COMMODITY_CODE varchar(10) not null, --
  LIMIT_PRICE decimal(10, 3) not null default 0.00, --
  LIMIT_QTY decimal(15, 0) not null default 0.00, --
)

insert #INS_DETAIL (COMMODITY_CODE, LIMIT_PRICE, LIMIT_QTY)
       select COMMODITY_CODE, LIMIT_PRICE, 9
....
....
drop table #INS_DETAIL
...

but sometimes the very error encountered: field 'LIMIT_QTY' doesn't exist.
if i change the temporary table name or delete the filed LIMIT_QTY, it's OK.
what's wrong? thanks in advance.

OS: WINDOWS 2000 SERVER
DB: MS SQL SERVER2000 + SP3
 



Relevant Pages