[IWE] requesting help with T-SQL on Sysobjects table

Chris Rathman iwe@warhead.org.uk
Tue, 09 Jan 2007 17:25:33 -0600


IF EXISTS(SELECT * FROM sysobjects WHERE uid = 10 AND name = 
'temprbsa33' AND type = 'U')
    DROP TABLE sabreguest.temprbsa33

IF EXISTS(SELECT * FROM sysobjects WHERE uid = 1 AND name = 'temprbsa33' 
AND type = 'U')
    DROP TABLE temprbsa33

Chris

golf_lover44 wrote:
> Here is the T-SQL code that I want to perform:
>
> declare	@B	int
> if exists (select @B = uid
> 	from sysobjects
> 		where name = 'temprbsa33' and
> 			type = 'U')
> begin
> 	case
> 		when @B = 10 then drop table sabreguest.temprbsa33
> 		when @B = 1  then drop table temprbsa33
> 	end
> end
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> IWE mailing list
> IWE@warhead.org.uk
> http://lists.warhead.org.uk/mailman/listinfo/iwe
>
>