Is there a way to have a msAccess DB query import a table from file?
Yes, as long as the data is organized. You can use VBA or a macro with TransferText or you can use Get External Data from the menu or ribbon, which will guide you through the steps.
EDIT
You can import into a new or existing table from say, CSV, like so:
SELECT * INTO NewTable
FROM [Text;HDR=Yes;FMT=Delimited;Database=C:\Docs].Test.csv
The solution will vary depending on the format of the file. If it's simple enough, checking out the options on the External Data tab (MS Access 2007) in the Import section, may do the trick.
For complex integrations, I'll often use SQL Server Integration Services (SSIS) to migrate the data into Access, where I can then process it with SQL queries. Of course, SSIS is a much "heavier" solution with a bit of a learning curve, but its been handy when the wizards aren't flexible enough.
Related
I have like 20 tables and one general table in SQL. That main table has indexes in in its columns. Using these indexes I create a view by getting the data from other 20 tables.
My question would be what would be the most efficient way to create a process of updating all of those tables accordingly using an Excel source. It should be future proof (new excel data being inputted once a month e.g.).
If it is a SSIS package how would it look, maybe you have any examples of something similar?
Thank you for the help.
I for one do not like SSIS. I find it a pain to troubleshoot, but for some tasks it's fine. If I were you I would:
Use the data import wizard from within Microsoft SQL Studio to import the Excel file.
Simply get the data into a staging table in SQL.
You'll have the option to save this as an SSIS package, good for automation
Now, write a pile of SQL to sort and update the data as you wish. Perhaps make a series of stored procedures
Create a job in SQL that runs your package, and then runs each stored procedure
Writing a solution in this fashion will allow you to troubleshoot each step and make reporting easy. You can just do the whole thing is SSIS but like I said, I'm not a fan of that tool. I like my code on the command line as much as possible for troubleshooting :)
I used this app from windows store to convert Excel into SQL script.
Then send script to our DBA.
Due to circumstances beyond my control, I'm currently not able to create a table on one of my company's databases, and I got a project where I need to break down and get stats from a large data file. I can open it in Excel, but its not very happy about it. What I'd like to be able to do is create a local database where I could use the import wizard to import an excel file to a new table. Is this possible? If so, how would I do it?
SQL server has a free express edition of their database http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx. It probably has a cumulative data limit though (Oracle express does, I don't know much about sql server express).
I need to import to Access a .sql database backup file created with MySql .
Is there a way to perform this operation?
You can't restore a MySQL backup into any other database system.
If you want to import the MySQL data into Access, you could export it all into CSV files and import those to Access. You will still need to recreate relationships, defaults, indexes (?) and other data.
You can import SQL Server data into a new Access table. In general, importing is a way to convert data from a different format and copy it into Access. The source table or file is not altered in this process. You can import directly from a SQL Server database using an ODBC connection, a text file exported from SQL Server, or an XML file exported from SQL Server.
To make frequent import operations more convenient, you can automate them by creating a macro or creating a Microsoft Visual Basic for Applications (VBA) procedure. This is useful, for example, when you import data on a regular schedule or you have unusual or complex requirements for importing data.
if you use SQL Server Management studio then you can open the .SQL files and it will give you help in figuring out what syntax works in SQL -- and which doesn't.
For example, if you have a table name that is mis-spelled, SQL Server Management Studio will give you red squigglies under that table name.
I don't see that functionality in Access, and I don't think that it's coming any time soon. Access (Jet) hasn't gotten any new features in almost fifteen years.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Tools for Generating Mock Data?
I am running SQL Server 2005 and I want to dump some dummy data into a large table with about 50 columns (I did not design it :P) - anyone know a tool to do this automatically? I want the rows to have all sorts of different data, and I would rather not write a script if there is already a tool out there - thanks.
Check out Sql Data Generator by Red Gate.
Do you want the tool to generate the data, or just get it into the database? If you just want to be able to easily dump in some canned data, use Excel.
Edit: These options only apply if you already have data from another system that you want to import in. After re-reading your question I don't think my answer is relevant...
Inside SQL Server 2005 (and 2008), you have a few built-in (aka free) options to import data:
1) Management Studio
This is by far the simplest option for importing data.
1) Connect to your database inside Management Studio.
2) In Object Explorer, right click on your database then select Tasks -> Import Data
3) From here you can specify your data source, do some minor transformations on the columns, and specify what table(s) you want to dump the data to.
4) You can save this as a job in case you want to repeat this (even automate this) as a future task.
2) SQL Server Integration Services
You can use Business Intelligence Development Studio (BIDS) to create an SSIS project and have much more granularity over your data source, the transformations on your data, and how you want to import it into your destination database(s).
This tool takes some time to master, but is very useful once you get the hang of it.
And, like the previous option, SSIS packages can be put into a job and set as an automated task.
3) Command line BCP Utility
If you're interested I'd recommending Googling this option. It is a time consuming option, and there are easier ways to get data into a system. :)
I hope that helps.
I want to import data from MS SQL Server, run it through some sort of regexp to filter out stuff, and import it into MySQL. I then, for each query, wish to display a relevant image from a third database. What would be the easiest way to do this, importing and linking wise?
Thank you.
Clarification: It is a php application to filter data from another database, and then for each record show an associated image from a 3rd database. It is from scratch...
You can try the MySQL Migration Toolkit.
http://dev.mysql.com/downloads/gui-tools/5.0.html
Now archived at http://downloads.mysql.com/archives.php?p=mysql-migration-toolkit
use SQL Management Studio (or Enterprise Manager depending on version) with the SQL Server import wizerd to get it into MS SQL.
From there you can export it to Mysql using the MySQL connector drivers.
As for as displaying an image from a third database, that is completely up to the code you have written in your application.
I would use the Microsoft SQL Server Data Publishing Wizard (free). You can use it to script your entire database (including insert statements.) You'll have to edit this script a little bit probably to get it to run in MySQL. Now you just have a regex problem. You can try:
Manipulating the data in MS SQL via a query, or from code (using regex) the transfer.
Running your regexes on the script file itself, maybe try some macros, find and replace, etc.
Manipulating the data in MySQL via a query, or from code (using regex) after the transfer.