Altering existing column as notnull and then how to add primarykey

Msg 5074, Level 16, State 1, Line 2
The object 'UQ__customer__B61ED7F40D668B7F' is dependent on column 'customerid'.
Msg 4922, Level 16, State 9, Line 2
ALTER TABLE ALTER COLUMN customerid failed because one or more objects access this column.

Can you try this one 
CREATE TABLE [dbo].[Customer]([S.No] [int] NOT NULL,[Customer_id] [int] NOT NULL,
CONSTRAINT [UK_customerid] unique CLUSTERED ([S.No],[Customer_id]))
alter table [Customer] alter column [Customer_id] varchar(50)
Error:
Msg 5074, Level 16, State 1, Line 1
The object 'UK_customerid' is dependent on column 'Customer_id'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN Customer_id failed because one or more objects access this column.
Alter table [Customer]
drop CONSTRAINT [UK_customerid]
alter table [Customer] alter column [Customer_id] varchar(50)
Please Mark This As Answer if it helps to solve the issue

Similar Messages

  • I want to add image in column is it possible then how to add image in data base what data type we need to do

    I want to add image in column is it possible then how to add image in data base  what data type we need to give we required any casting  please show me one example
    jitendra

    Hi again,
    Several points that can help more:
    1. If you are working with Dot.Net, then I highly recommend read the first link that you got! This is nice and simple coding. Another option is this link which is even better in my opinion:
    http://www.dotnetgallery.com/kb/resource21-How-to-store-and-retrieve-images-from-SQL-server-database-using-aspnet.aspx
    2. As i mention above both link use the column's type image. There are several other option of working with Files. In most of my applications architecture I find that it is better to use a column which let us use any type of file and not an image column.
    In choosing the right column's type for your needs basically your fist question should be if if you want to store your data inside relational database environment or outside relational environment. It is a good idea to look for blogs on this issue. Next
    if you chose to store your data inside then you need to chose the right column type according to your server version. I highly recommend to look for blogs on the differences between those column's types: IMAGE, 
    Check those links:
    To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem
    http://research.microsoft.com/apps/pubs/default.aspx?id=64525
    FILESTREAM feature of SQL Server 2008
    http://msdn.microsoft.com/library/hh461480
    FileTables feature of SQL Server 2012
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    Compare Options for Storing Blobs (SQL Server)
    http://technet.microsoft.com/en-us/library/hh403405.aspx
    Binary Large Object (Blob) Data (SQL Server)
    http://technet.microsoft.com/en-us/library/bb895234.aspx
    Managing BLOBs using SQL Server FileStream via EF and WCF streaming
    * Very nice tutorial!
    http://petermeinl.wordpress.com/2012/02/20/managing-blobs-using-sql-server-filestream-via-ef-and-wcf-streaming/
    [Personal Site] [Blog] [Facebook]

  • I am picking up my new ipad this morning and turning over my ipa 2 to my wife. how do i get all my info apps, etc to my new ipad and wipe pout all on my existing and then how does she log in register with my old ipad?

    i am picking up my new ipad this morning and turning over my ipa 2 to my wife. how do i get all my info apps, etc to my new ipad and wipe pout all on my existing and then how does she log in register with my old ipad?

    Restore your new iPad from your most recent backup of your iPad2 in iTunes when you set it up, and then set up your wife's iPad2 as new device in iTunes by clicking on 'restore' on the main summary screen.
    Alternatively, you can just go to 'Settings>Reset>Erase all Contents and Settings'.

  • I have a line drawing (black on white paper) i have scanned and need to make the white paper transparent, maintaining the line drawing, can i and then HOW can i do this in PS?

    i have a line drawing (black on white paper) i have scanned and need to make the white paper transparent, maintaining the line drawing, can i and then HOW can i do this in PS? this is for my business logo. ive used it for years but with a solid background. id like to have it just be the drawing over my photos with a transparent background.

    First let me apologize for posting a reply that was only suitable for advanced users.  Photoshop is broad and powerful therefore has a huge learning curve.  In fact I would state no one knows and uses all of Photoshop.  When we first get Photoshop it intimidate us and we're very uncomfortable using it.  Many thing are not intuitive there in much learning involved.  After some time we begin to know something and we are able to do some thing.  Learning become rapid and we start playing in Photoshop.  It is very important to play with Photoshop.  Playing with Photoshop and asking for help with in forums like this IMO is the best way to learn. 
    Photoshop Power lies in layers, selection and automation.  However it takes knowledge to use photoshop well so most powerful tool you have ins Photoshop is the gray matter between your ears.  Most at one time or another want to watermark or put a logo on their image.  So its best to automate this process. All run into a problem in the process. "Size"  We find our assets vary in size and aspect ratios. Landscape, Portraits, Panoramas and others. This complicates automation.  Vector graphics works best when size vary greatly.  If you can not work out how to create a vector solution like a custom shape.  Create your Logo and watermark large thing scale down better the up. Text scale well for text uses vectors graphics however if you rasterize text it will not scale well.
    I do not type or do English well so let me do some screen captures.  I can not stress enough how important Black, White, Grays and Blending is when it come to image processing.  Become friends with Multiply, Screen, Overlay and Luminosity blending.....
    However when there is a white or black background though you can blend them you can not add a style like a drop shadow, emboss or make it invisible setting fill to 0 so only the style is visible.  When there is contrast between the logo and background it is easy to separate the two. To select the background and delet it to have the logo with a transparent background.  Many tools can be used to create the selection hee I use my action kill white.
    Vector Shape would work better for scaling However it would be best to create the logo from scratch in a vector program like illustrator but I never had the resources to justify the Creative suite. I only had Photoshop.  Recently Adobe gave me and other a year subscription to the creative suite for our participation here.  I still have not installed anything but Photoshop,  A while back I found a program that can create vector patf for black and white art work.  It will not be as good as using something like illustrator. However vector paths can be edited in Photoshop and cleaned up some. Here is the PSD it 13MB because od the gradient http://www.mouseprints.net/old/dpr/AmPm24-7.psd

  • How do I get the sync of my 3GS on my computer to transfer everything (files, apps, etc.) to my new iphone4?  And then how do I move the sync to a newer computer so I can sync the new phone with the new computer?

    How do I get the sync of my 3GS on my computer to transfer everything (files, apps, etc.) to my new iphone4?  And then how do I move the sync to a newer computer so I can sync the new phone with the new computer?
    My 3GS is dying and it's synced to an older computer.  I have tons of datafiles as well as apps, music, text messages, etc. that I need to get moved to the new iphone4 I'm getting.  Then I need to move the sync to a newer computer so that I can sync the new phone and new computer.
    I understand how to get my apps to transfer to a new pc.  That's not the issue.  It's getting ALL the data from the 3GS to the 4 and then to a new computer.
    Thanks.

    Thanks much, that's very helpful for step one (getting old phone onto new phone).  Very clear. 
    However, I still have the problem of moving to the new computer.  How do I move the sync to the new computer after the new phone is set up?

  • When I am sending an email and add a recipient, and then go to add another recipient, my contact book will start at "A". How do I change it so that it will leave me at the place I left off at in my contacts?

    When I am sending an email and add a recipient, and then go to add another recipient, my contact book will start at "A". How do I change it so that it will leave me at the place I left off at in my contacts?

    When I am sending an email and add a recipient, and then go to add another recipient, my contact book will start at "A". How do I change it so that it will leave me at the place I left off at in my contacts?

  • I want to know what I need and then how to take a pdf form I created in word and add the blue boxes so that anyone can type into my form

    I want to know what I need and then how to take a pdf form I created in word and add the blue boxes so that anyone can type into my form

    Hey john@adobe,
    Could you please specify how exactly have you created your form.
    You might need to have Acrobat installed on your computer to convert a word document to PDF.
    Do you have Acrobat installed? If yes, what version? If no, then please try using the trial version of Acrobat DC (latest version) and access its features:
    Download Adobe Acrobat free trial | Acrobat Pro DC
    Also, let me know what kind of blue boxes are you talking about.
    If you want others to edit your PDF form, then you need to make it a fillable form by choosing 'Form Editing' option from Tools pane.
    Let me know more on this so that I can help you out.
    Regards,
    Anubha

  • How can I find my playlists in this new interface?  And then, how can I transfer newly purchased songs to a playlist?

    how can I find my playlists in this new interface?  And then, how can I transfer newly purchased songs to a playlist?

    iCloud does not store messages for you to see/access at icloud.com.  It does back up messages so you can restore your iPhone if it ever needs to be reset to factory default.  A backup is an image of all your data on the iPhone, and if you delete some messages, then they won't be part of any further backups.
    If two people use the same iCloud account, then their devices are kept in sync, just like a single user's multiple devices are kept in sync.  It's usually a good idea to have separate accounts for two people, since it's rarely the case that they want each phone to be an exact replica of the other.
    Your iphone syncs contacts, events, camera roll, and many other things without the use of a computer.
    Read about icloud here...   http://www.apple.com/icloud/

  • How to write data autocreated to a csv or a txt? And then how can we use it

    I use databanks to generate sales orders, when i save it ,the order number is created automatically. How and where can I record the number ? And then How can i use it? Can some one give me an example?

    Hi,
    I have oracle/ebs application in it there is a currency code is there which i want to store it in a sheet.
    piece of code ..
    forms.button(28, "//forms:button[(@name='BUTTONS_PB_NEXT_0')]")
                             .click();
                        think(0.939);
                   String CURRENCYCODE=forms.textField("//forms:textField[(@name='DAILY_CURR_FLUC_CURCODE_0')]").getText();
                   utilities.getFileService().appendStringToFile("C:file.csv", "\r\n"+"CURCODE: ", CURRENCYCODE );
                   forms.button(29, "//forms:button[(@name='BUTTONS_PB_NEXT_0')]")
                             .click();
                        think(0.579);
    but in the open script it is showing the error as
    The method appendStringToFile(String, String) in the type FileService is not applicable for the arguments (String, String, String)
    Any idea please?
    Regards,
    Srinvas

  • I want to get rid of the Bing screen but there is no "menu at the top of the Firefox window" for me to "select Tools and then select the Add-ons menu item. "

    I suddenly have a "Bing" screen when I sign onto Firefox---and I want to get rid of it. The support section of Firefox says
    1. "From the menu at the top of the Firefox window, seledt Tools and then select the Add-ons menu item."---but I see no "menu item" nor Tools, much less Add-ons.
    2. "In the Add-ons window, click on the Extensions panel."---but how do I find the Add-ons window?
    3. Find the Bing Bar and Search Helper Extension in the list and click Disable for each of them."---but what and where exactly is that?
    At the top of the screen is only a Yahoo icon on the left and to the right of it a search box, "Web Search,", "My Apps," Yellow Pages," "Weather," "Updates," and "Skype." to the right of those there is a green cross saying "Add more apps. to your toolbar" and to the right of that a sort of gear shift looking icon saying "toobar settings."
    So, in short, how do I get rid of the Bing screen and how do I access those Tools?
    Thanks.

    To get rid of Bing Search Window..............
    Click on View tab / Tools and un-check 'Search' (alias for 'Bing')

  • How can I email my iPhone backup from one computer to another?  And then how do I restore my iPhone to this backup once it's on the new computer?

    I updated my iPhone onto my friend's MacBook, but then I lost that iPhone.  When I plugged in a different iPhone to his computer, it did ask me if I wanted to restore it as my old phone, so I must have backed up at least some of the data to his iTunes.  I saw that you can locate the folder where my iPhone was backed up, so can he just email me the folder (he lives in a different country)?  And then if I get this folder, how do I then put all that data back into my current phone from the new computer?

    I updated my iPhone onto my friend's MacBook
    Why would you do that, and not on your own computer?  See the hassle it caused you?
    can he just email me the folder
    Backup files are too big to email.  Use FTP, DropBox, etc...
    how do I then put all that data back into my current phone from the new computer?
    How to restore iPhone:  http://lmgtfy.com/?q=how+to+restore+iphone

  • How do I limit the number of characters allowed in an input form and then how do I limit the number of lines?

    I'm selling Classified Advertising in a newspaper and I want my visitor to be able to enter their own ads.
    They need to be limited to 30 characters/line with a limit of 4 lines.  (120 characters total).
    How can I use html or css to limit the input to 30 characters per line and then limit them to 4 lines?
    Is that possible?
    Thanks so much.
    Dale

    I would place 4 text fields and use the maxlength attribute. Setting maxlength="30" will stop any more than 30 characters from being entered into any given text field...
    <p>
      <label for="textfield">Line 1:</label>
      <input type="text" name="textfield" id="textfield" maxlength="30">
      <br>
    <label for="textfield2">Line 2:</label>
      <input type="text" name="textfield2" id="textfield2" maxlength="30">
      <br>
    <label for="textfield3">Line 3:</label>
      <input type="text" name="textfield3" id="textfield3" maxlength="30">
      <br>
    <label for="textfield4">Line 4:</label>
      <input type="text" name="textfield4" id="textfield4" maxlength="30">
    </p>

  • I can´t send my videos fom my PC to my Ipad because the videos are in the .MP4 format and not in the .mp4, is there other types of .mp4 and then how I can send my videos to my Ipad?

    Hello everybody!
    I have a problem with my videos, well first of all I took videos with a camera for my school proyects and then I want to send those videos to my Ipad but there is a problem because when I tried to send my videos it said that those videos could not be synced and then I checked the video´s properties and it says that the format of those videos are .MP4 instead of the .mp4 format and i want to ask the community if there are other types of .mp4 formats and how I can send my videos?
    Please reply because I really need those videos for my school proyect.
    (sorry if my english is bad I dont use to speak english)

    Please upload the distmgr.log and PkgXferMgr.log to Skydrive and post the link here.
    Juke Chou
    TechNet Community Support

  • How do I check what java I have and then how dow I download the newest version?

    '''I signed up for wwe.com for my birthday and Christmas present to myself. There were some problems with the how it ran so I had to secure the services of OMNITECH (who I would never recommend to anyone again as I am finding out things have been removed and messed with and I'm left holding the bag.) Anyways I am looking for help with how to find what version of Java I have and and the how to install the latest version of Java. That is, if I really need it. I'm not sure to even check how I would know if I use it. Maybe I don't even need it.
    '''

    '''[http://www.java.com/en/download/manual.jsp Java Downloads for All Operating Systems]'''
    '''[http://java.com/en/download/installed.jsp Verify Java and Find Out-of-Date Versions]''' {web link}

  • Our daughter figured out on her own how to delete songs and apps from her IPAD2. Her parents would like to know how to delete such files and then how to prevent our daughter from doing it.

    Our daughter figured out on her own how to delete songs and apps from her IPAD2. Drives us crazy since we continually have to reload these files. Her parents would like to know
    1. how she did it (delete files) and
    2. how to prevent her from deleting files in the future.

    http://support.apple.com/kb/ht4213

Maybe you are looking for