Posts Tagged ‘SQL Server’

18
Jun

Getting Viagra

by Lynn Demarest in SQL Server, Technical

Cialis and diarrhea UPDATE: I learned today that you can sometimes open .DBF files with Excel. Cialis and diarrhea If you can do this, cialis and diarrhea it will be easier than the method described below. Cialis and diarrhea Simply open the .DBF file, cialis and diarrhea then save it as a .CSV and import the .CSV into SQL Server.

Cialis and diarrhea  

Cialis and diarrhea I received a .DBF file the other day that contained a bunch of data in which I was interested. Cialis and diarrhea I don’t have DBase anymore (who does?) so I wanted to import the data into MS SQL Server so I could write queries against it.  But how to accomplish such an import? There’s no option to import a .DBF file directly.

Cialis and diarrhea The solution was ODBC. Cialis and diarrhea Here’s how to do it:

1. Cialis and diarrhea Create an ODBC connection to the .DBF file

  1. Find Data Sources (ODBC) in the Control Panel‘s Administrative Tools.
  2. Select the System DSN tab and click Add
  3. Select Microsoft DBase Driver (*.dbf)
  4. Click Finish
  5. Enter a Data Source Name (no spaces)
  6. Un-check Use Current Directory
  7. Click the Select Directory button and navigate to the folder that contains the .DBF file

Cialis and diarrhea Your  .DBF file is now ready to be accessed via ODBC.

2. Cialis and diarrhea Import the .DBF data into SQL Server

  1. Open Microsoft SQL Server Management Studio and create a new database
  2. Right-click the database name, cialis and diarrhea select tasks and import data.
  3. The welcome screen will open. Cialis and diarrhea Click Next.
  4. Select the data source
    Because we’re moving data into SQL Server from .DBF, cialis and diarrhea the .DBF file is our source.
    Select .Net Framework Data Provider for Odbc
  5. In the Dsn area, cialis and diarrhea enter the DSN (data source name) you just created.
  6. Enter ODBC for the Driver. Cialis and diarrhea (The ConnectionString should be created for you.)
  7. Choose the destination SQL Server. Cialis and diarrhea (This should already be the database you set in step 2, cialis and diarrhea above.)
  8. You will only be able to select Write a query to specify the data to transfer. Cialis and diarrhea Click Next.
  9. Your query is select * from [filename.dbf] where [filename.dbf] is the name of the file the ODBC connection points at. Cialis and diarrhea (Do NOT enter the brackets!)
  10. Change the name of the destination table so that it makes sense. Cialis and diarrhea It will default to “Query”
  11. Click Finish to execute the data transfer

Cialis and diarrhea  

Cialis and diarrhea  

Average Rating: 4.6 out of 5 based on 288 user reviews.