Friday, March 9, 2012

Help! Bad insert to a table which I can't delete now.

I made a mistake in my insert statement, the insert to destination table is
the same as the Source from table. Oops! Now I can't truncate, delete this
table at all. Any way to get rid of it and start again?
Thanks, Alpha
insert into
[TisSuite].[dbo]. tblSource_info(extTID,RelatedEmployment,
RelatedAuto
Accident,RelatedOtherAccident,RelatedNot
Accident,
ReleasePatientInfo,PlaceOfService,TypeOf
Service, EMG,COB)
--We default to not releasing patient info
select exttid,0,0,0,1,0,1,41,'','' from [TisSuite].[dbo].tblPCS orde
r by
exttidOops, sorry. I was able to delete the table after all.
"Alpha" wrote:

> I made a mistake in my insert statement, the insert to destination table i
s
> the same as the Source from table. Oops! Now I can't truncate, delete th
is
> table at all. Any way to get rid of it and start again?
> Thanks, Alpha
> insert into
> [TisSuite].[dbo]. tblSource_info(extTID,RelatedEmployment,
RelatedAu
toAccident,RelatedOtherAccident,RelatedN
otAccident,
> ReleasePatientInfo,PlaceOfService,TypeO
fService, EMG,COB)
> --We default to not releasing patient info
> select exttid,0,0,0,1,0,1,41,'','' from [TisSuite].[dbo].tblPCS o
rder by
> exttid
>

No comments:

Post a Comment