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 do you define the data type during import?? I do not see that option in the wizard
Vitor Montalvão
In the Import Wizard when you chose the worksheets and the destination table, click on "Edit Mappings..." button and will pop-up a new screen where you can change column names and data types.
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