Win has asked for the wisdom of the Perl Monks concerning the following question:
If object_id(“table_name”) is not null begin … end
This does not work for MS SQL Server 2000. So I tried something along the lines of:
if (SELECT COUNT(*) FROM #Experimental_parameters) <> 0 begin DROP TABLE Experimental_parameters end
The problem is that this updated solution requires the existence of the table. So it is not the same thing as the first.
I am activating this with a Perl script. Maybe there is not a T-SQL solution for this, in which case I will need a Perl work around.
Any suggestions would be welcome, even though I know that this is not really a Perl question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: T-SQL problem - Perl solution?
by EdwardG (Vicar) on Oct 25, 2004 at 11:10 UTC | |
by Win (Novice) on Oct 25, 2004 at 13:52 UTC | |
by monktim (Friar) on Oct 25, 2004 at 14:17 UTC | |
by EdwardG (Vicar) on Oct 25, 2004 at 14:57 UTC | |
by monktim (Friar) on Oct 25, 2004 at 15:36 UTC | |
by EdwardG (Vicar) on Oct 25, 2004 at 13:59 UTC | |
|
Re: T-SQL problem - Perl solution?
by mpeppler (Vicar) on Oct 25, 2004 at 11:24 UTC | |
by EdwardG (Vicar) on Oct 25, 2004 at 11:38 UTC | |
by mpeppler (Vicar) on Oct 25, 2004 at 12:25 UTC | |
by gellyfish (Monsignor) on Oct 25, 2004 at 12:27 UTC |