[dba-SQLServer] Convert nvarchar to money

Nicholson, Karen knicholson at gpsx.net
Wed Feb 25 12:23:17 CST 2004


I believe you must use CAST to convert NvarChar to Money.
so, something like:

cast(amount as money)

-----Original Message-----
From: Mark Boyd [mailto:MarkBoyd at McBeeAssociates.com]
Sent: Wednesday, February 25, 2004 1:11 PM
To: SQLServerList
Subject: [dba-SQLServer] Convert nvarchar to money


I am trying to append data from Table1 to Table2.

In Table1, the field [Amount] is datatype 'nvarchar'.

In Table2, the field [Amount] is datatype 'money'.

 

I am using the following SQL query to run the append: "INSERT INTO
Table2 SELECT AcctNum, Amount FROM Table1".

I guess I need to use the CONVERT function, but can't figure out how
this is done.

Any examples would be greatly appreciated.

 

Thanks,

Mark Boyd

Sr. Systems Analyst

McBee Associates, Inc.

 

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com



More information about the dba-SQLServer mailing list