Solved

Empty Cell in Excel to Null Value in SQL

Posted on 2011-09-30
3
214 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now