Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Question Unanswered: Money to Varchar

    From query analyzer how can I change the field datatype from money to varchar?
    Alter table tablenaame alter column columnname varchar(30)--Is not working.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Can you describe "not working" in a bit more detail? Does the command appear to run, but the column datatype doesn't change? Does it give an error message? Does your server crash and spit blue smoke?


  3. #3
    Join Date
    Jul 2003
    San Antonio, TX
    You cannot change the datatype to money from (n)varchar, because this conversion cannot be done implicitly. You'll have to create a new table with desired datatype (money), use CONVERT/CAST function to insert the data into it, then drop the original table, create a new table with the same name, and insert the data back in.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts