Solved

Empty Cell in Excel to Null Value in SQL

Posted on 2011-09-30
3
219 Views
Last Modified: 2012-05-12
Hello,
I am using DTS to upload an excel spreadsheet into the database. I have several cells that are empty and it gets uploaded as "NULL" value into the database. I want the fields to remain empty in the dba, meaning nothing at all, not for it to read "NULL" in all the empty fields. Can someone help please?
0
Comment
Question by:JessyRobinson1234
3 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 36890809
ypu can update the NULL value afterwords with blank
something like this

Update tablename
set col = ""
where col = 'NULL'

0
 
LVL 5

Expert Comment

by:AlokJain0412
ID: 36891042
You can Update with this single Action

Update tablename
set col = null
where col = 'NULL'
0
 

Author Closing Comment

by:JessyRobinson1234
ID: 36891147
I had to tweak it just a little to:

Update table
set col = ''
where col is NULL
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question