Solved

Excel and SQL data transferred in text format

Posted on 2011-09-06
3
206 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

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

810 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