Results 1 to 2 of 2

Thread: Help!!!

  1. #1
    stelios Guest

    Default Help!!! stuck as using SQL to create a large table from smaller tables uing Inner Join..anyway doesn&#039;t matter..The problel I get is that sometimes I get an ERROR message saying that table already exists..this happens when i try to insert a there a way to check if a table exists..and then drop it so it can be created again with different parameters..or if not to be created..sort of like a boolean function<BR><BR>like if Table "something" = true<BR> drop and create the other<BR> or if not create the other<BR><BR>Thanx from advance

  2. #2
    Join Date
    Dec 1969

    Default RE: Help!!!

    i dont know a ton of sql but this<BR>might help a bit.<BR><BR>Message is the table name.<BR><BR>if exists (select * from sysobjects where id = object_id(N&#039;[dbo].[Message]&#039;) and OBJECTPROPERTY(id, N&#039;IsUserTable&#039;) = 1)<BR>drop table [dbo].[Message]<BR>GO

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts