Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Modifying column from limited NVARCHAR to NVARCHARMAX in SQL Server 2005

Posted on 2009-04-12
8
Medium Priority
?
449 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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