I am copying data from an Excel workbook/worksheet to a SQL Server 2005
data-mart database table (not previously existing) using the SQL Server 2005
Import/Export Wizard. I would like to do it using an import query that
recasts the data types, as opposed to copying the Excel data and letting the
Wizard set the data types. Below is a small sample of the code I'm trying t
o
use. I always get an error message (also below). What do I do to make this
work?
select
cast(REPORT_NAME as char(10)) as [Report_Name],
cast(SYSTEM as char(10)) as [System],
cast(PRIN as char(10)) as [Prin],
cast(AGENT as char(10)) as [Agent],
cast(BANK_NAME as char(50)) as [Bank_Name],
Report_Date as [Report_Date]
TITLE: SQL Server Import and Export Wizard
--
The statement could not be parsed.
ADDITIONAL INFORMATION:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005). (System.Data)You will get this error if you use a keyword or a reserved word as the table
or column name you are using.
Check it out with the list of keyowrds. You may want to try this link..
http://msdn.microsoft.com/library/d...getkeywords.asp
or try googling to get the latest list.
Hope this helps.|||No reserved words were column headings or table names. It still doesn't
work.
"Omnibuzz" wrote:
> You will get this error if you use a keyword or a reserved word as the tab
le
> or column name you are using.
> Check it out with the list of keyowrds. You may want to try this link..
> http://msdn.microsoft.com/library/d...getkeywords.asp
> or try googling to get the latest list.
> Hope this helps.|||Is all the data within the ranges specified.
if importing to char(10) does all data fit (only have 10 chars)?
"Mitch" wrote:
> No reserved words were column headings or table names. It still doesn't
> work.
> "Omnibuzz" wrote:
>|||Yes... I have been very careful with the cast statements.
"MattB" wrote:
> Is all the data within the ranges specified.
> if importing to char(10) does all data fit (only have 10 chars)?
> "Mitch" wrote:
>|||I discovered an easy solution to this problem. In the Import/Export Wizard
do not use a query to transfer the table. The wizard brings you to a point
where you can click on the EDIT button for the sheet or table selected. Thi
s
bring up a form that allows you to recast each column. It works beautifully
!
"Mitch" wrote:
> I am copying data from an Excel workbook/worksheet to a SQL Server 2005
> data-mart database table (not previously existing) using the SQL Server 20
05
> Import/Export Wizard. I would like to do it using an import query that
> recasts the data types, as opposed to copying the Excel data and letting t
he
> Wizard set the data types. Below is a small sample of the code I'm trying
to
> use. I always get an error message (also below). What do I do to make th
is
> work?
> select
> cast(REPORT_NAME as char(10)) as [Report_Name],
> cast(SYSTEM as char(10)) as [System],
> cast(PRIN as char(10)) as [Prin],
> cast(AGENT as char(10)) as [Agent],
> cast(BANK_NAME as char(50)) as [Bank_Name],
> Report_Date as [Report_Date]
> TITLE: SQL Server Import and Export Wizard
> --
> The statement could not be parsed.
> --
> ADDITIONAL INFORMATION:
> IErrorInfo.GetDescription failed with E_FAIL(0x80004005). (System.Data)
>
Showing posts with label copying. Show all posts
Showing posts with label copying. Show all posts
Friday, March 30, 2012
Friday, March 9, 2012
Import data failed
I tried to import data from a SQL Server 2000 database in another machine to
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC Sql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC Sql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
Import data failed
I tried to import data from a SQL Server 2000 database in another machine to
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC S
ql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followin
t
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC
Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the follow
int
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC S
ql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followin
t
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC
Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the follow
int
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
Import data failed
I tried to import data from a SQL Server 2000 database in another machine to
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC Sql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.
Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
my machine. The data is about 3 gig in size.
When copying the data, it failed with this error "[Microsoft][ODBC Sql
Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
SET options have incorrect settings: 'ARITHABORT'.
What does it mean and how can I fix it ?
Thank you very much.
Never mind, I fixed the problem.
I was copying from a "Simple" recovery mode database to a "Full" recovery
mode database.
I change the destination database to be "Simple" and it fixed the problem.
Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23CN2L9QBHHA.2276@.TK2MSFTNGP03.phx.gbl...
>I tried to import data from a SQL Server 2000 database in another machine
>to my machine. The data is about 3 gig in size.
> When copying the data, it failed with this error "[Microsoft][ODBC Sql
> Server Driver][SQL Server] UPDATE STATISTICS failed because the followint
> SET options have incorrect settings: 'ARITHABORT'.
> What does it mean and how can I fix it ?
> Thank you very much.
>
Subscribe to:
Posts (Atom)