Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2010, 03:34 AM
Karthick Karthick is offline Need an Automated sql query for the Excel file Windows XP Need an Automated sql query for the Excel file Office 2007
Novice
Need an Automated sql query for the Excel file
 
Join Date: Dec 2009
Posts: 7
Karthick is on a distinguished road
Default Need an Automated sql query for the Excel file

Hi all,


Hope everybody doing good!!!
I have a .csv file with 20-30 coulmns with different data types(numbers, strings, date, time, etc.). I just want to create a table with those same columns with the data type it holds. So am in need of an create table query fot that.

Is there any tool or way to generate an automated create table sql query if i provide the file as input?

Please help me on this
Reply With Quote
  #2  
Old 12-11-2010, 03:34 AM
BjornS BjornS is offline Need an Automated sql query for the Excel file Windows Vista Need an Automated sql query for the Excel file Office 2003
Competent Performer
 
Join Date: Jan 2010
Location: Sweden
Posts: 116
BjornS is on a distinguished road
Default

Hi,
I have a proposal for a solution, but I am not sure if is what you want. Lets try!

Use the command "Data / Import external data / Import data...".
Import your file, set formats as you like etc.

When this is finished you have it imported in Excel. If your data source (he csv-file) is updated, you can just right-click in your excelsheet (on the existing data) and choose "update". This can also be automated in different ways. Please see different possibilities by right-cklicking (for example the choice "Properties for data area..."). You can also use it to import csv-files with different data, but same structure.

After this you can use pivot tables and database formulas/functions within Excel.

A more complex solution is briefly to link an Access database to the csv-file, and then use Excel MS Query linked to this Access database to create questions and results in your excel sheet.

Kind regards
Bjorn
Reply With Quote
  #3  
Old 12-20-2010, 03:18 AM
Karthick Karthick is offline Need an Automated sql query for the Excel file Windows XP Need an Automated sql query for the Excel file Office 2007
Novice
Need an Automated sql query for the Excel file
 
Join Date: Dec 2009
Posts: 7
Karthick is on a distinguished road
Default

HI Bjorn,
Thanks a lot for the solution!!
I apologies that i forgot to mention the version of Excel that I’m using.

Sorry, I'm using excel 2007. Please rephrase your solution so that it adapts to excel 2007.
Reply With Quote
  #4  
Old 12-20-2010, 04:52 AM
BjornS BjornS is offline Need an Automated sql query for the Excel file Windows Vista Need an Automated sql query for the Excel file Office 2003
Competent Performer
 
Join Date: Jan 2010
Location: Sweden
Posts: 116
BjornS is on a distinguished road
Default

Hi,
basically the function you need you will find here: "Data / From text". Try this and the help function attached to it. This is the corresponding function in Excel 2007.

To guide you through each step would unfortunately cost me too much time. Now you know the way to start. I am sure you find your way to a good final solution by this. Good luck!

Kind regards
Bjorn
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated reminders paulgy80 Outlook 1 08-21-2010 04:35 PM
Automated Letter Sections gladfan Word 0 08-11-2010 01:53 AM
Text Box Query Meljord Word 3 12-15-2009 12:25 PM
Automated Functions?? nickypatterson Outlook 0 08-27-2009 01:50 PM
Mail Merge Query kangabanga Mail Merge 0 09-25-2008 04:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft