TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohan Chandra
NA
101
17.1k
How we can validate excel data before import in SQL by using
Jul 9 2016 5:19 AM
How we can validate excel data before import in SQL by using
I need a solution that my client give the master data in excel sheet old + new data) it is difficult to find which one is new data, and even some data is updated with same Receipt No,which is already in SQL but not updated.
now give me solution how i can validate data when file upload control picks that excel sheet for uploading.
I want to try when an new excel sheet comes by client, client upload it to SQL by using file upload control but it should be validate first.if new entry come then it should be insert and if old record already in SQL then skip and if updated row comes then update in SQL server
Reply
Answers (
2
)
0
Nilesh Sawardekar
404
3.9k
397.2k
Jul 10 2016 3:18 AM
Two solutions
Do work in coding using for loop and if else and then insert in database.(time consuming if data is huge but may not if you know row numbers.)
Create temp data and add whole data and then manipulate.
0
Nitin Sontakke
135
13.6k
14.9k
Jul 9 2016 11:55 PM
What do you want to do everything in one go?
You can simply import the Excel data to SQL Server (which you know how to do) and put that data in some staging table.
And then from staging table move to your main table using MERGE statement.
how to sample email app create in asp.net
Validate data from Excel before uploading it in SQL using C#