I need help creating table in DB through Excel.
User has table in excel sheet, which has not exact count of columns. User can add or reduce columns and of course add or reduce rows too.
I need a script for example for ODBC Microsoft Query which choose all table range in excel sheet and create table with this data in DB (MySQL).
It has to work on a one click not manually.
Thank you
This is solution for me. It's not exactly what I wanted, but it's enough for me now. After some modifications, it works on MySQL.
tomaslind.net - export data excel to sql server
Related
How can I import an Excel file containing data from three different tables with foreign keys into a mysql database?
A very simple way to do it is working with Excel itself. In order to help you we need more details about the Tables in the excel and the tables in the database but you will get it:
Make a new column and using formulas with CONCATENATE, do a sample "INSERT INTO" command. Use series for do the INSERT's automatically, copy & paste the column into a .sql file and execute it.
If you need more detail, if you edit your question and I will glade to help you improving this answer.
I was given an excel (csv) sheet containing a database metadata.
I'm asking if there's a simple way to import the csv and create the tables from there?
Data is not part of this question. the csv looks like this:
logical_table_name, physical_table_name, logical_column_name, physcial_column_name, data_type, data_length
There's about 2000 rows of metadata. I'm hoping I don't have to manually create the tables. Thanks.
I don't know of any direct import or creation. However, if I had to do this and I couldn't find one, I would import the excel file into a staging table (just a direct data import). I'd make add a unique auto ID column to staging table to keep the rows in order.
Then I would use some queries to build table and column creation commands from the raw data. Unless this was something I was setting up to do a lot, I would keep it dead simple, not try and get fancy. Build individual add column commands for each column. Build a create Table command for the first row for each table. Sort them all by the order id, tables before columns. Then you should be able to just copy the script column, check the commands, and go.
When i am trying to export data from excel to sql table using ssis,the all rows are inserted . But,when i am inserting a data of length greater than 255 to excel it's giving truncation error. In output column i altered it to 500. in External column input i can't alter it. In my excel sheet there is 2808 rows..but when this error is generating its only inserting 1632 rows and whole other rows are getting truncated....
If any one knows about this,please help me..I am really stuck on this....
Thanks..
Try sorting your data by length eg longest first.
Excel import/export is very buggy in SSIS.
Sometimes the only option is to write VBA script and run it from excel itself
I want to develop an automation in SSIS.
Problem statement :
I have an excel sheet which has a single column.
Based on the values in that column (will be included as a search parameter in the SQL query) I need to fetch 2 or more columns from SQL server database
The results are to be stored in the same Excel sheet against the data obtained for that particular column.
I already have an excel macro for the same. But, now I want to develop a package for the same.
Please guide me through the necessary steps.
I will also keep trying to obtain the solution
Create an Excel Source and link it to your file
use a lookup component to perform a SQL select to obtain the missing data
Create an Excel destination to save your target data
I have a situation where I have the 2 copies of a same MS Access DB. In one Db some modifications has been done like , in some tables some new rows has been inserted , some existing rows has been modified.
Now the trick is that i have to identify that in which tables , which rows the modification has been made (in case of any modification done in any existing row) or what are the new rows that have been inserted and in which tables. All these comparysion has to be done against the 2nd copy of that database (before all the modifications).
CAn any one help me out in this? I
If you have access to Visual Studio, the database edition has schema and data compare functionality that is made for just this sort of problems.