Hi,
I am trying to import data from a spread sheet to a sql server database... and one of the cells contains which are numeric and only and some are alpha numeric also... but when i try to import them to Sql server i get a NULL in the cells where there is Alpha numeric characters...
I have also tried opening a new spread sheet and setting the format for that particular column and text then i just paste it and then saving,.. but when i try to upload the data i am getting an error (thru my asp.net website) Saying that
No value given for one or more required parameters.
Hope someone can help me solve this.....
Regards
Karen
You could probably use BCP.exe to get this done quickly. The process would be to save the excel file as a .csv, then strip off the headers, if you use tab as your columns separator and \n as your row terminator, then you should be able to bcp it in with the -c option and no further work. Otherwise, you might need to create a format file. More information on how to use BCP can be found in books online for bcp.exe.
Hope that helps,
John
|||Have you tried using OPENROWSET?
|||Whats that about.. The user has data in spread sheet and right now i have built a interface that the user can directly log in and upload the excel files and then it will transfer the data to the database.. it works fine if a particular column doesnt have alpha numeric characters..
Regards
Karen
|||Check out the following KB articles
http://support.microsoft.com/kb/321686 - This address's possible methods for importing from Excel to SQL Sever
Also http://support.microsoft.com/kb/194124/EN-US/
This article directly address's the issue of "Excel Values Returned as NULL Using DAO OpenRecordset"
This sounds like the issue you are facing
Regards
Nadreck
No comments:
Post a Comment