Solved

Modifying column from limited NVARCHAR to NVARCHARMAX in SQL Server 2005

Posted on 2009-04-12
8
429 Views
Last Modified: 2012-05-06
I have a table in SQL Server 2005 hosted by Godaddy. When trying to modify the structure using the direct access to the table provided by Godaddy, everytime I change the data type to a column from NVARCHAR(1) to NVARCHAR(MAX) when updating it goes back to NVARCHAR(1). The table is empty. I tried by adding a new column with no success as well.
0
Comment
Question by:Ivicarp
8 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
can you run this
ALTER TABLE yourtable ALTER yourcolumn NVARCHAR(MAX)

Open in new window

0
 
LVL 37

Expert Comment

by:momi_sabag
Comment Utility
how do you know the column is still nvarchar(1)?
0
 

Author Comment

by:Ivicarp
Comment Utility
On the screen provided by Godaddy to maintain the tables after the update to the changes is done, It shows that the data type is nvarchar with a size of 1
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 12

Accepted Solution

by:
udayakumarlm earned 500 total points
Comment Utility
check if something is happeing at the Godaddy side.
or
may be your own code somewhere changing the column
or
even dropping the table and creating it again.
there is no logic in SQL that will rollback the column altered unless you do it some how.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
-add a new column nvarchar(max)
-copy your data from one column to the other
-delete the old column
-rename the new column
0
 

Author Comment

by:Ivicarp
Comment Utility
I found it myself, a bug in Godaddy interface perhaps?, for a MAX in a NVARCHAR column setup the size to -1 (that is "MINUS ONE").
Thanks for all the suggestions
0
 
LVL 12

Expert Comment

by:udayakumarlm
Comment Utility
I believe my message was right ID:24125636
check if something is happeing at the Godaddy side.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Server DatePart HOUR 6 31
SQL - sum months, quarter, YTD 9 80
Another way of doing this SQL 8 40
Record open by another user 6 40
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now