Solved

Excel and SQL data transferred in text format

Posted on 2011-09-06
3
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 40

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA - set conditional format rules precedence 3 77
Complex SQL Server WHERE CLause 9 36
count values within multiple bands 7 31
Vlookup Help 3 25
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.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

738 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