Re: problem with query moving data from 1 dbase to another.
From: Paul (Paul_at_discussions.microsoft.com)
Date: 11/03/04
- Next message: Steve Thompson: "Re: Moving SQL Server 2000 from NT4.0 to Windows 2003"
- Previous message: Niall: "Re: SQL Performance"
- In reply to: Tibor Karaszi: "Re: problem with query moving data from 1 dbase to another."
- Next in thread: AnthonyThomas: "Re: problem with query moving data from 1 dbase to another."
- Reply: AnthonyThomas: "Re: problem with query moving data from 1 dbase to another."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Nov 2004 07:43:11 -0800
Thanks will give this a try. Being a C programmer was thinking of using a
cast but did not know how to impliment this with SQL
"Tibor Karaszi" wrote:
> If I understand the problem connect, try:
>
> INSERT INTO [dbase1].dbo.Table1 [Data_Item_Log_ID]
> Select CAST([Data_Item_Log_ID] AS int) from
> [dbase2].dbo.dataitemlog
>
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
>
> "Paul" <Paul@discussions.microsoft.com> wrote in message
> news:8C6EFEC1-7B3F-48AB-B0BF-82694B3D7596@microsoft.com...
> > I have a large dbase table and am moving the data from 1 table to another.
> > The problem is that I had to change the datatypes in the destination table so
> > am getting the failure
> > Syntax error converting the nvarchar to int.
> >
> > INSERT INTO [dbase1].dbo.Table1 [Data_Item_Log_ID]
> > Select [Data_Item_Log_ID] from
> > [dbase2].dbo.dataitemlog
> > Data_Item_Log_ID (destination field) is type integer and the source field
> > (from another dbase on the same server) is type nvarchar 4. I have several
> > columns like this and the table has approximately 20k records.
> > The origin of the source database was a MySQL dbase which I moved to SQL2000
> > using a driver and access. Thanks.
> > --
> > Paul G
> > Software engineer.
>
>
>
- Next message: Steve Thompson: "Re: Moving SQL Server 2000 from NT4.0 to Windows 2003"
- Previous message: Niall: "Re: SQL Performance"
- In reply to: Tibor Karaszi: "Re: problem with query moving data from 1 dbase to another."
- Next in thread: AnthonyThomas: "Re: problem with query moving data from 1 dbase to another."
- Reply: AnthonyThomas: "Re: problem with query moving data from 1 dbase to another."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|