Re: problem with query moving data from 1 dbase to another.
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 11/03/04
- Next message: John Bell: "Re: xp_stopmail not working"
- Previous message: Prabhat: "Re: Index Seek (or) Index Scan in Execution Plan"
- In reply to: Paul: "problem with query moving data from 1 dbase to another."
- Next in thread: Paul: "Re: problem with query moving data from 1 dbase to another."
- Reply: Paul: "Re: problem with query moving data from 1 dbase to another."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Nov 2004 08:26:38 +0100
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: John Bell: "Re: xp_stopmail not working"
- Previous message: Prabhat: "Re: Index Seek (or) Index Scan in Execution Plan"
- In reply to: Paul: "problem with query moving data from 1 dbase to another."
- Next in thread: Paul: "Re: problem with query moving data from 1 dbase to another."
- Reply: Paul: "Re: problem with query moving data from 1 dbase to another."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|