SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Column doesnt create
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thendraljazz
Starting Member

India
26 Posts

Posted - 04/28/2012 :  01:50:50  Show Profile  Reply with Quote
Hi

I have a table with 175 columns.i need to create more columns but it was not created.I am facing the issue in windows server 2003 but its working in local system.

Can anyone tell me the issue?
How can i rectify this?What can i do to create more columns?

Edited by - thendraljazz on 04/28/2012 01:56:21

SwePeso
Patron Saint of Lost Yaks

Sweden
29138 Posts

Posted - 04/28/2012 :  01:57:15  Show Profile  Visit SwePeso's Homepage  Reply with Quote
What is the error message you get? Any warnings?

How does your query look like to create the new column?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

thendraljazz
Starting Member

India
26 Posts

Posted - 04/28/2012 :  02:04:40  Show Profile  Reply with Quote
i didnt get any error in sql server.first time it is created but it was changed once i debug the application and i got invalid columns error in my application side.

this is my query

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[merchantlists](
[updateddate1] [datetime] NULL,
[MPN1] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Merchant1] [varchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Baseprice1] [decimal](15, 2) NULL,
[Shipping1] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Tax1] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BLPrice1] [decimal](15, 2) NULL,
[updateddate2] [datetime] NULL,
[MPN2] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Merchant2] [varchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Baseprice2] [decimal](15, 2) NULL,
[Shipping2] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Tax2] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BLPrice2] [decimal](15, 2) NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

likewise i created upto 175 columns.now i need to add more columns in that query.

Edited by - thendraljazz on 04/28/2012 02:06:58
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
29138 Posts

Posted - 04/28/2012 :  02:37:45  Show Profile  Visit SwePeso's Homepage  Reply with Quote
If you don't show us the code that triggers the error, we can't help you.
You ARE aware that the total storage size cannot exceed 8060 bytes for an entire row?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

thendraljazz
Starting Member

India
26 Posts

Posted - 04/28/2012 :  02:44:38  Show Profile  Reply with Quote
i didnt get any error.if i modify the table it will create the columns but
it was removed once i close the table and open.
Go to Top of Page

thendraljazz
Starting Member

India
26 Posts

Posted - 04/28/2012 :  02:57:13  Show Profile  Reply with Quote
i got Sql execution error
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
29138 Posts

Posted - 04/28/2012 :  05:55:16  Show Profile  Visit SwePeso's Homepage  Reply with Quote
So... What is the code you use to create the column?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

YazanAllahham
Starting Member

Syria
2 Posts

Posted - 04/29/2012 :  08:56:29  Show Profile  Reply with Quote
What is the new column datatype? and what is the name of the new column?
did you try to use another name for the column? if you any spaces in the name of the column please use brackets [column name]

try another datatype and see if the problem is still appearing?

change the table name in the query and run it then see if new table is created and the new column is added.

it would be very great if you post here the creation script so we can try to figure the problem.

Regards

-----------------------------------------------------------------
Being a computer software developer doesn't mean you can fix a TV
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000