Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Friday, March 30, 2012

import rpt file to SQL Server 2005

Hi,

I know how to import the .rpt file into Access database using import.

can some body tell about how to import to SQL Server 2005 database, both front end (using some utility or interface) and back end (directly accessing the server) solution.

Thanks,

Fahim.

hi,

I'm not sure I understood you question...

.rpt file could stand for a "report file", but SQL Server has nothing to do with client issues like reports.. so, the question is, where do you want to import those .rpt files? do you like to store them into a database table? and if this is correct, what do you like to do with that files, as SQL Server can not use them to render reports?..

a "branch" of SQL Server, available in SQLExpress edition as well, is devoted to reporting, using Reporting Services, an additional "engine" responsible for the purpose..

regards

|||

In addition to Andrewa, if you want to convert your rpt file into a report in reporting services you will have to do manual work as the queries within the Report will have to be trasnfered to SQL Server syntax. In addition, the migraiton assistant for Report wont transfer the underlying tables to SQL Server, you will have to do that on your own.
Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Inert rpt file to SQL table now ( from front end ),

i hope my question is clear.

thanks for your help.

|||

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Insert rpt file to SQL table now ( from front end ),

i hope my question is clear.

thanks for your help.

|||

hi,

FahimatMicrosoftForum wrote:

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Insert rpt file to SQL table now ( from front end ),

if you want to insert "files" into a database table, you can perhaps bulk insert them... or you can deal the task via client code, reading the files into memory and passing the resulting byte array to the Transact-SQL command specified for the INSERT INTO operation..

i hope my question is clear.

absolutely not... at least not to me

regards

|||

FahimatMicrosoftForum wrote:

Hi,

I know how to import the .rpt file into Access database using import.

can some body tell about how to import to SQL Server 2005 database, both front end (using some utility or interface) and back end (directly accessing the server) solution.

Thanks,

Fahim.

Hi,

I also looking for this solution. I am import excel, txt, pdf file to sql2005. Are you found the solution?

|||

Search Books Online for the bcp utility, it should allow you to import various types of files.

Mike

|||

Excel and Textfiles are supported by bcp, bcp does not support imporintg pdf files as their file structure is not bulk-importable.

Jens K. Suessmeyer


http://www.sqlserver2005.de

import rpt file to SQL Server 2005

Hi,

I know how to import the .rpt file into Access database using import.

can some body tell about how to import to SQL Server 2005 database, both front end (using some utility or interface) and back end (directly accessing the server) solution.

Thanks,

Fahim.

hi,

I'm not sure I understood you question...

.rpt file could stand for a "report file", but SQL Server has nothing to do with client issues like reports.. so, the question is, where do you want to import those .rpt files? do you like to store them into a database table? and if this is correct, what do you like to do with that files, as SQL Server can not use them to render reports?..

a "branch" of SQL Server, available in SQLExpress edition as well, is devoted to reporting, using Reporting Services, an additional "engine" responsible for the purpose..

regards

|||

In addition to Andrewa, if you want to convert your rpt file into a report in reporting services you will have to do manual work as the queries within the Report will have to be trasnfered to SQL Server syntax. In addition, the migraiton assistant for Report wont transfer the underlying tables to SQL Server, you will have to do that on your own.
Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Inert rpt file to SQL table now ( from front end ),

i hope my question is clear.

thanks for your help.

|||

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Insert rpt file to SQL table now ( from front end ),

i hope my question is clear.

thanks for your help.

|||

hi,

FahimatMicrosoftForum wrote:

Thanks for your reply,

I am currently doing like this,

-- take comma delimited file.

-- convert into rpt file using Excel

-- manuall insert to Access database table.

now I want to upgrade this process to

-- SQL Server 2005 ( i know how to upgrade database to this engine)

-- Insert rpt file to SQL table now ( from front end ),

if you want to insert "files" into a database table, you can perhaps bulk insert them... or you can deal the task via client code, reading the files into memory and passing the resulting byte array to the Transact-SQL command specified for the INSERT INTO operation..

i hope my question is clear.

absolutely not... at least not to me

regards

|||

FahimatMicrosoftForum wrote:

Hi,

I know how to import the .rpt file into Access database using import.

can some body tell about how to import to SQL Server 2005 database, both front end (using some utility or interface) and back end (directly accessing the server) solution.

Thanks,

Fahim.

Hi,

I also looking for this solution. I am import excel, txt, pdf file to sql2005. Are you found the solution?

|||

Search Books Online for the bcp utility, it should allow you to import various types of files.

Mike

|||

Excel and Textfiles are supported by bcp, bcp does not support imporintg pdf files as their file structure is not bulk-importable.

Jens K. Suessmeyer


http://www.sqlserver2005.de

Import Question

I am running an Import from an Access database into my SQL Server 2000
database.
The problem is that when I run this process it Appends the Access details to
the SQL Server when I want to replace the SQL Server data.
Can anyone tell me how to get around this. I'm pretty new to this sort of
thing.
TIAPoppy,
You can make use of DTS (SQL Server) which will have an option to "drop existing table" or "replace
existing date". For instance if you open DTS import/export wizard. choose source and destination of
which one will be access. On the next screen select "copy tables/views from source database" . on
the next screen select the required tables to transfer and click on button of "transform" you will
get relevant options here to transfer the data. The one which will be relevent to you will be
"delete rows in destination table"
- Vishal|||Thanks
"Vishal Parkar" <_vgparkar@.yahoo.co.in> wrote in message
news:#mdDhckmDHA.2200@.TK2MSFTNGP12.phx.gbl...
> Poppy,
> You can make use of DTS (SQL Server) which will have an option to "drop
existing table" or "replace
> existing date". For instance if you open DTS import/export wizard. choose
source and destination of
> which one will be access. On the next screen select "copy tables/views
from source database" . on
> the next screen select the required tables to transfer and click on button
of "transform" you will
> get relevant options here to transfer the data. The one which will be
relevent to you will be
> "delete rows in destination table"
>
> --
> - Vishal
>
>

Import of Data from Access DB

Hello,

I'm trying to import some data from a table in an Access Database into my SQL Server.

It's one field I'm having a problem with and I don't know how to get round it.

Basically the field in Access is called "DueToStart" and is a "Date/Time" type field.
It shows values as "09:00:00" etc.

When I try to import this table into SQL, I get the following message, and I don't know how to get round it.

"Error as destination for row number 1. Errors encountered so far in this task: 1.
Insert Error, column 3('DueToStart', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Invalid character value for cast specification."

Does the access column contain only time?

|||Yes is does|||Is there a target table in the SQL Server or is it created automatically when you import the table? The Import Export Wizard in SQL Server automatically creates a table when the table does not exist when importing. Either the table destination exists or is created by the import wizard, check that the definition of the column in the SQL Server is datatime and not smalldatetime.|||

It seems that the column contains only time information and no date imformation. As SQL Server knows only combined data types (e. g. DT_DBTIMESTAMP), I wonder what date it should insert. Maybe 1/1/1753 but maybe that is the problem.

What about a viewer for the output of the data source?

|||Alas_gr - The table already exists in the new SQL DB. The format is smalldatetime and this is what it needs to be.

Anonymous - What do you mean by "viewer for the output data source" ? Sorry but I'm brand new to this and trying to find my way blindly !
|||

I think the problem occurs because the value in your Access table that is either too small or too large for the SQL data type. So try to switch it to datetime, and do the import, and see if it works.

As for the viewer, it can be useful only if you are using Visual Studio BI to design a package. If so, in the data flow designer, if you right click on the connector between the source (access) and the destination (sql server) there is a choice (Data Viewers). So next time you run the package you can see what data you are importing.

|||

This thread deals with an similar issue. In short the date time column from access had to be placed in a SSIS string variable and then casted to date/time.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2071251&SiteID=1

Wednesday, March 28, 2012

Import MDB File

I have a current Access 03 application that has a 3 tables that I would like to import, can this be done?

Davids Learning

You can't import mdb file to Sql server. but for alternative you can import data from acces 03 to sql server. the 1st, you must make new database & table (same with mdb file).

You can do, right click your db file in database manager, and then click import data. Please follow instruction from Sql......

Thanks

Jebat

Import into SQL Server Oracle Database from Export File (SQL*Loader)

I need to import an Oracle Database into SQL Server 2000.
I know this can be done easily using DTS but I do not have access to the
Oracle Database, I only have an Oracle Database Export File.
The Export file has been generated using SQL*Loader.
Oracle Export File is created with a proprietery format that can only be
read by the importer. This is the same problem if you take a SQL backup file
and try to load it into Oracle without access to a SQLServer.
-oj
"K Kelly" <kkelly@.nospam.com> wrote in message
news:eryCZe8$EHA.2608@.TK2MSFTNGP10.phx.gbl...
>I need to import an Oracle Database into SQL Server 2000.
> I know this can be done easily using DTS but I do not have access to the
> Oracle Database, I only have an Oracle Database Export File.
> The Export file has been generated using SQL*Loader.
>
|||On Fri, 21 Jan 2005 14:42:22 -0000, "K Kelly" <kkelly@.nospam.com> wrote:

>I need to import an Oracle Database into SQL Server 2000.
>I know this can be done easily using DTS but I do not have access to the
>Oracle Database, I only have an Oracle Database Export File.
>The Export file has been generated using SQL*Loader.
>
While it may not be strictly legal from a licensing standpoint, there is an approach that may work. First, Oracle
makes copies of their older software available for downloading from their website. Therefore, you could download a
copy of Oracle and install it on a suitable system. Next, import the Oracle database from the export file. Be
warned -- the export file also includes information on directory locations for database files, rollback segments,
and so on. In order for the import to work properly, you need to make sure that you replicate the file system
environment exactly. Oracle will not re-create it on the fly, so you may spend quite a bit of time reading error
logs before you can get it right. In the end, though, it should work correctly.
Once you have the Oracle database up and running, use DTS from SQL Server to cross over the data you need,
remembering to deal with issues such as data type conversions, etc. (pardon me for straying into "I know that!!"
areas). After you get it crossed over, then kill the Oracle installation before the license police catch you.
I once did a similar thing years ago in the opposite direction. I needed to move a DocsOpen SQL 4.0 database into
Oracle 7.2, but the Docs application no longer supported SQL 4, only SQL 6.5 and above. However, Microsoft had a
120-day demonstration version of SQL 6.5 on their website. So I downloaded that, used it to upgrade the SQL 4
database to SQL 6.5, then ran DocsOpen to move it from SQL Server to Oracle 7.2. Worked a treat. Crazily enough, I
have to now move that same database from Oracle 8.1 to SQL Server 2000 in the next couple of weeks.
Good luck.
|||Clever! ;-)
-oj
"Norm Powroz" <npowroz.delete.this.part@.and.this.part.rogers.com > wrote in
message news:1a45v09n8p0j4ud4ep57cdu91vgav6qv2r@.4ax.com...
> On Fri, 21 Jan 2005 14:42:22 -0000, "K Kelly" <kkelly@.nospam.com> wrote:
>
> While it may not be strictly legal from a licensing standpoint, there is
> an approach that may work. First, Oracle
> makes copies of their older software available for downloading from their
> website. Therefore, you could download a
> copy of Oracle and install it on a suitable system. Next, import the
> Oracle database from the export file. Be
> warned -- the export file also includes information on directory locations
> for database files, rollback segments,
> and so on. In order for the import to work properly, you need to make sure
> that you replicate the file system
> environment exactly. Oracle will not re-create it on the fly, so you may
> spend quite a bit of time reading error
> logs before you can get it right. In the end, though, it should work
> correctly.
> Once you have the Oracle database up and running, use DTS from SQL Server
> to cross over the data you need,
> remembering to deal with issues such as data type conversions, etc.
> (pardon me for straying into "I know that!!"
> areas). After you get it crossed over, then kill the Oracle installation
> before the license police catch you.
> I once did a similar thing years ago in the opposite direction. I needed
> to move a DocsOpen SQL 4.0 database into
> Oracle 7.2, but the Docs application no longer supported SQL 4, only SQL
> 6.5 and above. However, Microsoft had a
> 120-day demonstration version of SQL 6.5 on their website. So I downloaded
> that, used it to upgrade the SQL 4
> database to SQL 6.5, then ran DocsOpen to move it from SQL Server to
> Oracle 7.2. Worked a treat. Crazily enough, I
> have to now move that same database from Oracle 8.1 to SQL Server 2000 in
> the next couple of weeks.
> Good luck.
>
sql

Monday, March 26, 2012

Import from MS Access to SQL 2005 problem

I can not import a MS Access database into a SQL Server 2005 database on the
SQL Server 2005 server where MS Access is not installed but I can import it
from a Citrix computer where MS Access is installed.
Is there a requirement that MS Access has to be installed on the computer
where you want to load the Access database from ?
I get the following error when I try from the Server where MS Acces is not
installed:
Could not retrieve table list.
Could not load file or assembly 'System.Enterprise.Services.Wrapper.dll' or
one of its dependencies. The system cannot find the path specified.........
Thanks.
On Thu, 21 Jun 2007 07:10:00 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:

>Is there a requirement that MS Access has to be installed on the computer
>where you want to load the Access database from ?
I believe Access needs to be installed on the computer where the
import process executes.
Roy Harvey
Beacon Falls, CT
|||Thanks............
"Roy Harvey" wrote:

> On Thu, 21 Jun 2007 07:10:00 -0700, DXC
> <DXC@.discussions.microsoft.com> wrote:
>
> I believe Access needs to be installed on the computer where the
> import process executes.
> Roy Harvey
> Beacon Falls, CT
>

Import from MS Access to SQL 2005 problem

I can not import a MS Access database into a SQL Server 2005 database on the
SQL Server 2005 server where MS Access is not installed but I can import it
from a Citrix computer where MS Access is installed.
Is there a requirement that MS Access has to be installed on the computer
where you want to load the Access database from ?
I get the following error when I try from the Server where MS Acces is not
installed:
Could not retrieve table list.
Could not load file or assembly 'System.Enterprise.Services.Wrapper.dll' or
one of its dependencies. The system cannot find the path specified........
.
Thanks.On Thu, 21 Jun 2007 07:10:00 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:

>Is there a requirement that MS Access has to be installed on the computer
>where you want to load the Access database from ?
I believe Access needs to be installed on the computer where the
import process executes.
Roy Harvey
Beacon Falls, CT|||Thanks............
"Roy Harvey" wrote:

> On Thu, 21 Jun 2007 07:10:00 -0700, DXC
> <DXC@.discussions.microsoft.com> wrote:
>
> I believe Access needs to be installed on the computer where the
> import process executes.
> Roy Harvey
> Beacon Falls, CT
>

Import from MS Access to SQL 2005 problem

I can not import a MS Access database into a SQL Server 2005 database on the
SQL Server 2005 server where MS Access is not installed but I can import it
from a Citrix computer where MS Access is installed.
Is there a requirement that MS Access has to be installed on the computer
where you want to load the Access database from ?
I get the following error when I try from the Server where MS Acces is not
installed:
Could not retrieve table list.
Could not load file or assembly 'System.Enterprise.Services.Wrapper.dll' or
one of its dependencies. The system cannot find the path specified.........
Thanks.On Thu, 21 Jun 2007 07:10:00 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:
>Is there a requirement that MS Access has to be installed on the computer
>where you want to load the Access database from ?
I believe Access needs to be installed on the computer where the
import process executes.
Roy Harvey
Beacon Falls, CT|||Thanks............
"Roy Harvey" wrote:
> On Thu, 21 Jun 2007 07:10:00 -0700, DXC
> <DXC@.discussions.microsoft.com> wrote:
> >Is there a requirement that MS Access has to be installed on the computer
> >where you want to load the Access database from ?
> I believe Access needs to be installed on the computer where the
> import process executes.
> Roy Harvey
> Beacon Falls, CT
>

Import from Data from Microsoft Access

In SQL Server 2005, Im trying to append data to tables which already exist. Im importing the data through the import wizard.

The source from is Microsoft Access with no username and password.

The source to is SQL Server 2005 using OLE DB Provider SQL Server with the login information of the schema I wish to use.

I click through and the tables appear in the source. When I select all, they appear in the destination but they appear with the dbo. prefix which would regard them as new tables since the tables dont exist under that schema. I can click on the first destination table drop down text box and see all the tables under the schema there suppose to be under but its not the default. There are a lot of tables and I don't feel like using the drop down text box hundreds of times. Is there a solution to this problem?

It worked in Sql Server 200

Thanks

Scott

use dts or ssis|||

But why is it defaulting to dbo. when the table doesnt even exist and I can dropdown and see the proper table. Im even connected as the user I want to the destination database and the user is a db_owner. Creating a package wont work because we;re constantly adding tables and DTS may work but the preferred method is just to be able to import data into the proper schema

|||

dbo is the default schema.

how about qualifying the destination table with shcemaname.tablename in

the import process

|||

But if Im loggin in as Another user I would figure it would default to that user. When you say qualify in the import process do you mean change the [dbo]. to [proper schema owner].

I tried to create a package and then took the file and cut and paste dbo with proper name however since the table never existed its trying to create the table and it already exists so I get an error when I run it. When I use the drop down text box and change the table to the proper table with the proper owner it changes the option to append which is correct.

Im kinda at a loss as I feel there is nothing I Can do but hit the drop down text box for 200+ tables every time.

What I really need is a solution in the import/export wizard to show up with the destination tables as the proper schema owner?

Scott

|||

For my sake and everyone else's, Im not crazy. In SQL Server 2005 SP1 Microsoft has fixed this issue and now allows you to choose a destination schema. woooohoooo!!!!

However ... I am now getting the following error on appending data. The table structure exists and Im trying to append all data from Access tables into SQL Server tables. Not all Access tables have data. If I do one individual table it works. If I do 200 I get the following error:

- Prepare for Execute (Error)

Messages

Error 0xc0202009: {8DD4F4CE-2DD7-4856-A251-71D4206EC6DC}: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)

Error 0xc020801c: Data Flow Task: The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009.
(SQL Server Import and Export Wizard)

Error 0xc004701a: Data Flow Task: component "Source 64 - DP_ROUTE_JURISDICTION" (6998)failed the pre-execute phase and returned error code 0xC020801C.
(SQL Server Import and Export Wizard)

Does anyone have a solution or can point me in the right direction. Does it have something to do with the Access buffer size? Ive see some posts for this error but no solid solutions. Any help would be greatly appreciated.

Thanks

Scott

|||

Can you publish the Access database anywhere so that we can reproduce the problem?

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

Import from Data from Microsoft Access

In SQL Server 2005, Im trying to append data to tables which already exist. Im importing the data through the import wizard.

The source from is Microsoft Access with no username and password.

The source to is SQL Server 2005 using OLE DB Provider SQL Server with the login information of the schema I wish to use.

I click through and the tables appear in the source. When I select all, they appear in the destination but they appear with the dbo. prefix which would regard them as new tables since the tables dont exist under that schema. I can click on the first destination table drop down text box and see all the tables under the schema there suppose to be under but its not the default. There are a lot of tables and I don't feel like using the drop down text box hundreds of times. Is there a solution to this problem?

It worked in Sql Server 200

Thanks

Scott

use dts or ssis|||

But why is it defaulting to dbo. when the table doesnt even exist and I can dropdown and see the proper table. Im even connected as the user I want to the destination database and the user is a db_owner. Creating a package wont work because we;re constantly adding tables and DTS may work but the preferred method is just to be able to import data into the proper schema

|||

dbo is the default schema.

how about qualifying the destination table with shcemaname.tablename in

the import process

|||

But if Im loggin in as Another user I would figure it would default to that user. When you say qualify in the import process do you mean change the [dbo]. to [proper schema owner].

I tried to create a package and then took the file and cut and paste dbo with proper name however since the table never existed its trying to create the table and it already exists so I get an error when I run it. When I use the drop down text box and change the table to the proper table with the proper owner it changes the option to append which is correct.

Im kinda at a loss as I feel there is nothing I Can do but hit the drop down text box for 200+ tables every time.

What I really need is a solution in the import/export wizard to show up with the destination tables as the proper schema owner?

Scott

|||

For my sake and everyone else's, Im not crazy. In SQL Server 2005 SP1 Microsoft has fixed this issue and now allows you to choose a destination schema. woooohoooo!!!!

However ... I am now getting the following error on appending data. The table structure exists and Im trying to append all data from Access tables into SQL Server tables. Not all Access tables have data. If I do one individual table it works. If I do 200 I get the following error:

- Prepare for Execute (Error)

Messages

Error 0xc0202009: {8DD4F4CE-2DD7-4856-A251-71D4206EC6DC}: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)

Error 0xc020801c: Data Flow Task: The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009.
(SQL Server Import and Export Wizard)

Error 0xc004701a: Data Flow Task: component "Source 64 - DP_ROUTE_JURISDICTION" (6998)failed the pre-execute phase and returned error code 0xC020801C.
(SQL Server Import and Export Wizard)

Does anyone have a solution or can point me in the right direction. Does it have something to do with the Access buffer size? Ive see some posts for this error but no solid solutions. Any help would be greatly appreciated.

Thanks

Scott

|||

Can you publish the Access database anywhere so that we can reproduce the problem?

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

Friday, March 23, 2012

import from Access to SQL, not knowing the table format

I need to import few tables from MS Access to MS SQL but the table structure in Access is always different, as I would like the destination table in SQL to be.

Therefore I would like that a table would be created in SQL at runtime, according to the structure the Access table accessed has.

You can't do this using a data-flow because for these you need to know the metadata of the source and destination at design-time and according to your post, you don't know that!

I don't know much about Access. Is there a way of interrogating the metadata at design-time? If so you could get that metadata (hopefully using an Execute SQL Task) and use that to build your data-flow programatically at runtime. That's a difficult thing to do though. If you really want to go down this route then there's some stuff in BOL to help you.

-Jamie

|||OK, got the point.
Just to be clear, I wuold like to do something like

select * into <table destination> from <table source>

But I cannot because the source is Access, the destination is SQL Server 64 bit and there is no MS Jet driver for 64 bit.

Anybody has a good idea?
|||

The only way to do this with a SELECT...INTO... is to set the Access mdb up as a linked server.

-Jamie

|||

srem wrote:

But I cannot because the source is Access, the destination is SQL Server 64 bit and there is no MS Jet driver for 64 bit.

You can still run this on a 64 bit machine, just call it through the 32 bit dtexec, see the Program Files x86 folder.

I think your bigger issue is the lack of metadata up front, as Jamie points out.

|||i'm not sure about this, but i think you can use the script task to determine the access table schema. then, you could use this schema information to dynamically create the sql server table.

import from Access to SQL, not knowing the table format

I need to import few tables from MS Access to MS SQL but the table structure in Access is always different, as I would like the destination table in SQL to be.

Therefore I would like that a table would be created in SQL at runtime, according to the structure the Access table accessed has.

You can't do this using a data-flow because for these you need to know the metadata of the source and destination at design-time and according to your post, you don't know that!

I don't know much about Access. Is there a way of interrogating the metadata at design-time? If so you could get that metadata (hopefully using an Execute SQL Task) and use that to build your data-flow programatically at runtime. That's a difficult thing to do though. If you really want to go down this route then there's some stuff in BOL to help you.

-Jamie

|||OK, got the point.
Just to be clear, I wuold like to do something like

select * into <table destination> from <table source>

But I cannot because the source is Access, the destination is SQL Server 64 bit and there is no MS Jet driver for 64 bit.

Anybody has a good idea?|||

The only way to do this with a SELECT...INTO... is to set the Access mdb up as a linked server.

-Jamie

|||

srem wrote:

But I cannot because the source is Access, the destination is SQL Server 64 bit and there is no MS Jet driver for 64 bit.

You can still run this on a 64 bit machine, just call it through the 32 bit dtexec, see the Program Files x86 folder.

I think your bigger issue is the lack of metadata up front, as Jamie points out.

|||i'm not sure about this, but i think you can use the script task to determine the access table schema. then, you could use this schema information to dynamically create the sql server table.

Import from access db to sql express db

How do I import tables from an access db to sql Express?
reidarTHi
I did some testing on DEV edition and it works just file
SELECT *
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\northwind.mdb";
User ID=Admin;Password='
)...Customers
Take a look at linked servers in the BOL as well
"reidarT" <reidar@.eivon.no> wrote in message
news:%23S9JQgPoGHA.680@.TK2MSFTNGP03.phx.gbl...
> How do I import tables from an access db to sql Express?
> reidarT
>

Import from access db to sql express db

How do I import tables from an access db to sql Express?
reidarTHi
I did some testing on DEV edition and it works just file
SELECT *
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\northwind.mdb";
User ID=Admin;Password='
)...Customers
Take a look at linked servers in the BOL as well
"reidarT" <reidar@.eivon.no> wrote in message
news:%23S9JQgPoGHA.680@.TK2MSFTNGP03.phx.gbl...
> How do I import tables from an access db to sql Express?
> reidarT
>

Import from Access - Datatype conversions

I have to do a lot of inporting from Access files. Is there a place where I can change the default datatype conversion for Access Text from nvarchar to varchar?

Thanks.

Kato

If you are using the import wizard then you can affect this with the mapping files at:

%PROGRAMFILES%\Microsoft SQL Server\90\DTS\MappingFiles

I'm guessing that the one you want is JetToSSIS.xml

If you are building packages manually then you can change this in the source adapter.

-Jamie

|||

Outstanding. Exactly what I was looking for.

Thank you.

sql

Import flat file into SQL Server 2005 Express

I am new to SQL Server, and migrating part of an Access application to
SSE. I am trying to insert a comma delimited file into SSE 2005. I am
able to run a BULK INSERT statement on a simple file, specifying the
field (,) and row (\n) terminators. I can also do the same with a
format file.

Here is the problem. My csv file has 185 columns, with a mixture of
datatypes. Sometimes, a text field will contain the field delimiter as
part of the string. In this case (and only in this case) there will be
double quotes around the string to indicate that the comma is part of
the field, and not a delimiter.

Is there any way to indicate that there is a text delimiter that is
only present some of the time?

If not, any suggestions on getting the data into SSE?

Many thanks for your input.

Cheryl(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

I am new to SQL Server, and migrating part of an Access application to
SSE. I am trying to insert a comma delimited file into SSE 2005. I am
able to run a BULK INSERT statement on a simple file, specifying the
field (,) and row (\n) terminators. I can also do the same with a
format file.
>
Here is the problem. My csv file has 185 columns, with a mixture of
datatypes. Sometimes, a text field will contain the field delimiter as
part of the string. In this case (and only in this case) there will be
double quotes around the string to indicate that the comma is part of
the field, and not a delimiter.


So a file could look like this:

2,34,Enter Sandman,Pat Boone
9,34,Zabadak,"Dave, Dee, Dozy, Mich & Tich"
8,981,"Rebel, Rebel",David Bowie

There is now way to get BULK INSERT to handle this file in that shape.
If I were faced with this file, I would write Perl script that replaced
the commas outside the "" with a different delimiter and then removed the
"". And it would not be trivial.

Most other people would probably try to write a package in Integration
Services, but I have never used Integration Services myself. And for your
part - SQL Express does not come with Integration Services, I believe.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||In message <Xns98B096E86FA00Yazorman@.127.0.0.1>, Erland Sommarskog
<esquel@.sommarskog.sewrites

Quote:

Originally Posted by

(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

>I am new to SQL Server, and migrating part of an Access application to
>SSE. I am trying to insert a comma delimited file into SSE 2005. I am
>able to run a BULK INSERT statement on a simple file, specifying the
>field (,) and row (\n) terminators. I can also do the same with a
>format file.
>>
>Here is the problem. My csv file has 185 columns, with a mixture of
>datatypes. Sometimes, a text field will contain the field delimiter as
>part of the string. In this case (and only in this case) there will be
>double quotes around the string to indicate that the comma is part of
>the field, and not a delimiter.


>
>So a file could look like this:
>
2,34,Enter Sandman,Pat Boone
9,34,Zabadak,"Dave, Dee, Dozy, Mich & Tich"
8,981,"Rebel, Rebel",David Bowie
>
>There is now way to get BULK INSERT to handle this file in that shape.
>If I were faced with this file, I would write Perl script that replaced
>the commas outside the "" with a different delimiter and then removed the
>"". And it would not be trivial.
>
>Most other people would probably try to write a package in Integration
>Services, but I have never used Integration Services myself. And for your
>part - SQL Express does not come with Integration Services, I believe.


Two things to add, both useful options if the amount of data is small.
First, the import filters in MS Access are better than those in SQL
Server. If the data will fit into an Access table that might just do the
trick. Second, spreadsheets have more flexible parsing options than
databases. It may be possible to load the data into a spreadsheet. That
allows different algorithms to be applied to different rows.

Lastly, text files can be opened and read by VBA code in any of the
office languages, or any of the .NET languages. Either could be used,
but writing code to cope with all of the possible options may take time.

--
Bernard Peek
back in search of cognoscenti|||Erland Sommarskog (esquel@.sommarskog.se) writes:

Quote:

Originally Posted by

So a file could look like this:
>
2,34,Enter Sandman,Pat Boone
9,34,Zabadak,"Dave, Dee, Dozy, Mich & Tich"
8,981,"Rebel, Rebel",David Bowie
>
There is now way to get BULK INSERT to handle this file in that shape.
If I were faced with this file, I would write Perl script that replaced
the commas outside the "" with a different delimiter and then removed the
"". And it would not be trivial.


In addition to Bernard's post, is not Excel able to read that format?
In such case open in Except, and save as a tab-delimited file and importing
that should be a breeze. (Assuming, of course, there are no tabs in the
data!)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thank you both for your suggestions. Yes, I was thinking that BULK
INSERT was not going to be able to handle this. I had thought about
dumping the file into an Access table first, but the file could be very
large (200,000+ rows). I am going to try the Excel spreadsheet idea.

Erland Sommarskog wrote:

Quote:

Originally Posted by

Erland Sommarskog (esquel@.sommarskog.se) writes:

Quote:

Originally Posted by

So a file could look like this:

2,34,Enter Sandman,Pat Boone
9,34,Zabadak,"Dave, Dee, Dozy, Mich & Tich"
8,981,"Rebel, Rebel",David Bowie

There is now way to get BULK INSERT to handle this file in that shape.
If I were faced with this file, I would write Perl script that replaced
the commas outside the "" with a different delimiter and then removed the
"". And it would not be trivial.


>
In addition to Bernard's post, is not Excel able to read that format?
In such case open in Except, and save as a tab-delimited file and importing
that should be a breeze. (Assuming, of course, there are no tabs in the
data!)
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

Thank you both for your suggestions. Yes, I was thinking that BULK
INSERT was not going to be able to handle this. I had thought about
dumping the file into an Access table first, but the file could be very
large (200,000+ rows). I am going to try the Excel spreadsheet idea.


200000+ rows? Then Access is probably a better bet. Doesn't Excel stop
at 65536 rows?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:

Quote:

Originally Posted by

(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

>Thank you both for your suggestions. Yes, I was thinking that BULK
>INSERT was not going to be able to handle this. I had thought about
>dumping the file into an Access table first, but the file could be very
>large (200,000+ rows). I am going to try the Excel spreadsheet idea.


>
200000+ rows? Then Access is probably a better bet. Doesn't Excel stop
at 65536 rows?


I think the latest version of Excel may have a higher row limit - which
only increases the tendency of newbies to misuse Excel as a "database".|||You are correct - Excel has a limit on the number of rows. I thought
about that after I sent the reply. So now I am looking at Access.

Here is my next question. I want to use OPENROWSET in a procedure to
get the data from Access into SSE. My code looks something like this:

INSERT INTO sse_table1 Select GFF.*
FROM OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
'path to mdb';'admin';'',
'Select * FROM access_table1
) as GFF

This works great. However, the location of the access database is only
known at runtime. I can pass the path as a parameter to the stored
procedure, but using it as a variable in OPENROWSET fails. Code looks
like this

CREATE PROCEDURE [dbo].[spImportBillingFile]
@.strTableLocation varchar(255),
@.btSuccess bit OUTPUT
AS
BEGIN

DECLARE @.strConnect varchar(255)
SET @.strConnect = @.strTableLocation

INSERT INTO tbl_ups_eInvoice_tmpData Select GFF.*
FROM OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
' + @.strConnect + ';'admin';'',
'Select * FROM tbl_ups_eInvoice_tmpData'
) as GFF

Set @.btSuccess = 1

END

Does OPENROWSET not allow a variable to be used?

Thanks again for the help.

Ed Murphy wrote:

Quote:

Originally Posted by

Erland Sommarskog wrote:
>

Quote:

Originally Posted by

(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

Thank you both for your suggestions. Yes, I was thinking that BULK
INSERT was not going to be able to handle this. I had thought about
dumping the file into an Access table first, but the file could be very
large (200,000+ rows). I am going to try the Excel spreadsheet idea.


200000+ rows? Then Access is probably a better bet. Doesn't Excel stop
at 65536 rows?


>
I think the latest version of Excel may have a higher row limit - which
only increases the tendency of newbies to misuse Excel as a "database".

|||(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

INSERT INTO tbl_ups_eInvoice_tmpData Select GFF.*
FROM OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
' + @.strConnect + ';'admin';'',
'Select * FROM tbl_ups_eInvoice_tmpData'
) as GFF
>
Set @.btSuccess = 1
>
END
>
Does OPENROWSET not allow a variable to be used?


No. Either you have to use dynamic SQL, or define a linked server on the
fly. The former is probably simpler. Look at
http://www.sommarskog.se/dynamic_sql.html#OPENQUERY for a similar example
on how to deal with the nested strings.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks for all the info - I figured out how to use the dynamic sql.

Erland Sommarskog wrote:

Quote:

Originally Posted by

(cabrenner@.optonline.net) writes:

Quote:

Originally Posted by

INSERT INTO tbl_ups_eInvoice_tmpData Select GFF.*
FROM OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
' + @.strConnect + ';'admin';'',
'Select * FROM tbl_ups_eInvoice_tmpData'
) as GFF

Set @.btSuccess = 1

END

Does OPENROWSET not allow a variable to be used?


>
No. Either you have to use dynamic SQL, or define a linked server on the
fly. The former is probably simpler. Look at
http://www.sommarskog.se/dynamic_sql.html#OPENQUERY for a similar example
on how to deal with the nested strings.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

sql

Import Excel to SQL using Access Project

Sorry if this is the wrong forum for this, but was as close as I could get. I am an amateur stumbling thru this to "learn by doing". I am trying to set up an access front end for a SQLExpress database, currently all local for experimenting. Trying to import Excel data to a table in the database, using Access "get external data" function. I get errors and the data wont import. Error message won't give me a clue to what is wrong. All fields are named the same. If I convert the excel to a csv or tab delineated, it imports correctly. Just not the excel. Any ideas?

Take a look at this article

http://support.microsoft.com/kb/321686

sql

Wednesday, March 21, 2012

Import Errors from MS Access

I encountered errors while importing tables from an Access. The only tbales
that errored had date/time fields and it seems SQL didn't like them. The tab
les work just fine in Access so I'm surprised SQL didn't like them. Anyone s
ee this before?Alan,
Most likely cause: MS Access supports dates as early as Jan 1, 100, while
SQL Server only supports dates back to Jan 1, 1753. You probably have a date
prior to Jan 1, 1753. Before you dismiss this idea, keep in mind that a
simple data entry error can morph Jul 15, 1999 to Jul 15, 199 :-)
Use an Access query to locate dates earlier than Jan 1, 1753.
Chief Tenaya
"Alan Fisher" <anonymous@.discussions.microsoft.com> wrote in message
news:838D8D52-BB99-416A-A4D2-4781DCE7040F@.microsoft.com...
> I encountered errors while importing tables from an Access. The only
tbales that errored had date/time fields and it seems SQL didn't like them.
The tables work just fine in Access so I'm surprised SQL didn't like them.
Anyone see this before?|||On Tue, 23 Mar 2004 16:01:06 -0800, "Alan Fisher"
<anonymous@.discussions.microsoft.com> wrote:
Different versions of Access have different levels of support for
upsizing. Try with Access XP or 2003.
When push comes to shov, it's not so hard to build those few tables
yourself, and write append queries to copy over the data.
-Tom.

>I encountered errors while importing tables from an Access. The only tbales that er
rored had date/time fields and it seems SQL didn't like them. The tables work just f
ine in Access so I'm surprised SQL didn't like them. Anyone see this before?

Import Error

I receive unhelpful errors from attempting to import a ms access table into sql server 2005 using the import wizard. Here is the report.

Operation stopped...

- Initializing Data Flow Task (Success)

- Initializing Connections (Success)

- Setting SQL Command (Success)

- Setting Source Connection (Success)

- Setting Destination Connection (Success)

- Validating (Error)

Messages

Error 0xc00470fe: Data Flow Task: The product level is insufficient for component "Data Conversion 1" (73).
(SQL Server Import and Export Wizard)

- Prepare for Execute (Stopped)

- Pre-execute (Stopped)

- Executing (Success)

- Copying to [Company].[dbo].[EMPLOYEE] (Stopped)

- Post-execute (Stopped)

- Cleanup (Stopped)

I received this type of error once before and got around it by removing all constraints from the table. I was able to import the table when the data types were nvarchar. I changed the data types to varchar and this occurred. How do I know what the message is specifically referring to or can I see more details of the import command. This is my first posting.

Charley,

Data conversion transformation requires SQL Server enterprise edition to be executed. see if this link provides more information

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=594086&SiteID=1