?
Solved

Modifying column from limited NVARCHAR to NVARCHARMAX in SQL Server 2005

Posted on 2009-04-12
8
Medium Priority
?
446 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 143

Expert Comment

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

Open in new window

0
 
LVL 37

Expert Comment

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

Author Comment

by:Ivicarp
ID: 24125634
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Accepted Solution

by:
udaya kumar laligondla earned 2000 total points
ID: 24125636
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 70

Expert Comment

by:Éric Moreau
ID: 24127283
-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
ID: 24129105
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:udaya kumar laligondla
ID: 24129138
I believe my message was right ID:24125636
check if something is happeing at the Godaddy side.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

752 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