Curtis Long
asked on
convert sql column from nvarchar to numeric
I have a SQL database called BBKTrial, a table called dbo.sheet1$. a column called [as-am]. This column is nvarchar(225) format. I need to convert it to numeric.
How can I do this??
How can I do this??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do you define the data type during import?? I do not see that option in the wizard
e.g.
select CONVERT( [as-am] as decimal(12,3) )
from that_table
where ISNUMERIC([as-am]) = 1
a result of 1 from ISNUMERIC() indicates the parameters holds numeric information but this can include items such as currency symbols
We could advise better if you supplied this:
select distinct [as-am]
from that_table
where ISNUMERIC([as-am]) = 0