Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Table Create Failing

Author  Topic 

donchamp
Starting Member

9 Posts

Posted - 2010-07-05 : 17:36:47
The following code is failing, but get no error msg. Can someone suggest what might be wrong.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--SET ANSI_PADDING ON
--GO
CREATE TABLE [dbo].[TestDataTable](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Code] [varchar](10) NULL,
[Description] [varchar](100) NULL,
[ParentID] [int] NULL,
CONSTRAINT [ID] PRIMARY KEY CLUSTERED(
[ID] ASC))
GO
--SET ANSI_PADDING OFF

sql-programmers
Posting Yak Master

190 Posts

Posted - 2010-07-05 : 23:45:45
It's working properly, I don't thick that anything wrong, check your database for the table TestDataTable.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-07-06 : 00:26:46
Post the error message so that we know what's going on . .

Any chance the error message is ?
Server: Msg 2714, Level 16, State 6, Line 3
There is already an object named 'TestDataTable' in the database



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -