I need to issue an SQL statement that will change the datatype of a column from nvarchar to money.
While we're on the subject, does anyone have a link to explanations of all the datatypes; (varchar vs. nvarchar) and so on?
1) There is no single SQL command that will convert a column from varchar to money. You'll need to create a new column (or new table) with a money column and drop the old column. If the old column contains data you'll need to explicitly convert and move the data to the new column.
You can use Enterprise Manager to convert the column but it will create a new table and insert the data into the new table. It drops the old table.
2) SQL BOL defines the data types. You can find BOL at Microsoft.
3) You can execute the sp_datatype_info system stored proc to list info about data types. Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.