RE: Using 'Execute SQL Task' to insert rows
- From: "frank chang" <frankchang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 08:56:06 -0700
Foss, I read your question and I don't see the subquery in the example you
have provided. Please elaborate. Cheers.
"Foss" wrote:
> 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
.
- References:
- Using 'Execute SQL Task' to insert rows
- From: Foss
- Using 'Execute SQL Task' to insert rows
- Prev by Date: Re: Pass server name inn global variable dynamically!!!
- Next by Date: Help - importing smalldatetime values from text in ActiveX script
- Previous by thread: Using 'Execute SQL Task' to insert rows
- Next by thread: Re: Using 'Execute SQL Task' to insert rows
- Index(es):
Relevant Pages
|
Loading