Solved

Excel and SQL data transferred in text format

Posted on 2011-09-06
3
205 Views
Last Modified: 2012-05-12
Hi

There are a number of different Excel spreadsheets that I have to automating of sending data to a SQL database. There are a number of others that have to pull data from this.
I thought that keeping all my columns as text type columns and then converting data types from when sending data from Excel or pulling data into Excel.
Would this work? What are the disadvantages/advasntages, especially with dates?
0
Comment
Question by:murbro
3 Comments
 
LVL 9

Accepted Solution

by:
mimran18 earned 250 total points
ID: 36487125
Hi,
    Ya, you can do it like this.But not recommended because if some garbage data is there is excel, so you might import it in this way.For example.
If there is a column in excel and half of its value is dd/mm/yyyy or half is mm/dd/yyyy.
So it might mess-up things.

There are other best solutions for it as well.

Cheers

0
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 250 total points
ID: 36512954
I would import EXCEL data into SQL using process like described below and SQL users can query those tables after that or someone can write code for them to do that:

How to import data from Excel to SQL Server
http://support.microsoft.com/kb/321686

How to use Excel with SQL Server linked servers and distributed queries
http://support.microsoft.com/kb/306397

openrowset excel 2007
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/23e7b80d-c7ec-4875-bd3a-aa137fd95dfb
0
 

Author Closing Comment

by:murbro
ID: 36516419
Thanks for the advice
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

760 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

20 Experts available now in Live!

Get 1:1 Help Now