Using 'Execute SQL Task' to insert rows
- From: "Foss" <Foss@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 07:49:17 -0700
Hi there all,
I'm trying to insert a number of rows into a table using the results of a
sub-query to populate them.
They're both on the same connection.
When I parse this, it's fine. When I execute it, I get this message:
"Error Source : Microsoft OLE DB Provider for SQL Server'
Error Description : The statement has been terminated.
Subquery returned more than 1 value. This is not permitted when the subquery
follows =, !=, <, <=, >, >= or when the subquery is used as an expression."
What am I doing wrong?!
Here's my SQL statement:
----------------------------------------
INSERT INTO dbo.ExportUpdates
(exup_collisionID, exup_addedat)
SELECT DISTINCT col_id, GETDATE() AS CurrDate
FROM dbo.Collisions
----------------------------------------
I'm going quite mad looking at this so any help would be much appreciated!
Cheers,
Foss
.
- Follow-Ups:
- Re: Using 'Execute SQL Task' to insert rows
- From: Allan Mitchell
- RE: Using 'Execute SQL Task' to insert rows
- From: frank chang
- Re: Using 'Execute SQL Task' to insert rows
- Prev by Date: Re: Insert Title into text file during transformation task in DTS
- Next by Date: Re: Pass server name inn global variable dynamically!!!
- Previous by thread: Changing the DataSource in a loop
- Next by thread: RE: Using 'Execute SQL Task' to insert rows
- Index(es):
Relevant Pages
|