Modifying column from limited NVARCHAR to NVARCHARMAX in SQL Server 2005

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.
IvicarpAsked:
Who is Participating?
 
udaya kumar laligondlaConnect With a Mentor Technical LeadCommented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
can you run this
ALTER TABLE yourtable ALTER yourcolumn NVARCHAR(MAX)

Open in new window

0
 
momi_sabagCommented:
how do you know the column is still nvarchar(1)?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
IvicarpAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
-add a new column nvarchar(max)
-copy your data from one column to the other
-delete the old column
-rename the new column
0
 
IvicarpAuthor Commented:
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
 
udaya kumar laligondlaTechnical LeadCommented:
I believe my message was right ID:24125636
check if something is happeing at the Godaddy side.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.