Hi Cinderella,
I think you haven't got my previous post right. I was talking about not to use COMMA as FIELDDELIMITER. There can be comma within your field value.
Just found that in EXCEL that is treated as formatting of numbers. So on import from EXCEL to SQL server would result in loss of COMMAs.
As you say it is just one column you are trying to import, do the following.
1) Open Notepad file
2) Copy all the phone numbers from excel to notepad.
3) Save it as SOMETHING.CSV / .TXT
Then try this command in SQL Query analyser.
Code:
BULK INSERT YOURTABLENAME
FROM 'c:\something.csv'
--NOTE : The file should be on the local hard disk of your SQL server,
if you are remotely accessing your SQL server through SQL Query analyser
WITH
(
ROWTERMINATOR = '\n'
)
OR Try the same with DTS Wizard.
1) Choose Data Source - Choose TEXT FILE from the drop down, and browse to choose your filename and click next
2) Select File Format - Choose DELIMITED Option button, and click next
3) Specify Column Delimiter - Choose TAB there and click next (should see the numbers with comma below in the preview).
3) I hope, the rest you can manage.
It is always better to use CSV or TXT formats for such imports as excel applys its default formatting and that doesn't reflect in your tables when imported.
Hope that explains better this time:).
Cheers!
_________________________
- Vijay G
Strive for Perfection