You are exactly right. I didn't know the subselect statement could
reference the table in the update clause, and that was my main
question.
The only real difference then is the size of the statement if you
wanted to update 5 fields you would need to repeat the subselect 5
times.
Sim
__
Sim Zacks wrote:
Elke,
A simple example of the power of including joins in an Update
Statement:
Update Tbl1 set tbl1.field1=tbl2.field2*.10,
from Tbl1 join tbl2 on tbl1.PKfield=tbl2.tbl1FK
I'm nearly sure you meant something like
... on tbl1.tbl1FK=tbl2.PKfield ?
and then
update tbl1 set field1=(se
> Oh well, grubby vb app to the rescue.
>
> -Original Message-
> From: John Singleton [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 11, 2004 4:26 PM
> To: Kevin Wilson
> Cc: [EMAIL PROTECTED]
> Subject: Re: UPDATE FROM STATEMENT NOT SUPPORTED
>
>
> Kev
; Oh well, grubby vb app to the rescue.
>
> -Original Message-
> From: John Singleton [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 11, 2004 4:26 PM
> To: Kevin Wilson
> Cc: [EMAIL PROTECTED]
> Subject: Re: UPDATE FROM STATEMENT NOT SUPPORTED
>
>
> Kevin,
&
ssage-
From: John Singleton [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 4:26 PM
To: Kevin Wilson
Cc: [EMAIL PROTECTED]
Subject: Re: UPDATE FROM STATEMENT NOT SUPPORTED
Kevin,
After looking at what that statment does in MS SQL Server, I think this
is the syntax you are looking for
-
From: John Singleton [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 4:26 PM
To: Kevin Wilson
Cc: [EMAIL PROTECTED]
Subject: Re: UPDATE FROM STATEMENT NOT SUPPORTED
Kevin,
After looking at what that statment does in MS SQL Server, I think this
is the syntax you are looking for:
UPDATE
Kevin,
After looking at what that statment does in MS SQL Server, I think this
is the syntax you are looking for:
UPDATE SET = | (,...) =
WHERE
Hope that helps. (That update from statement is wild...)
Cheers,
JLS
[EMAIL PROTECTED] wrote:
Unable to do mass update from a table using:
UPDAT
FROM STATEMENT NOT SUPPORTED
Hi Kevin,
That statement really works in SQL Server? What does it do?
Try:
UPDATE SET = WHERE
JLS
[EMAIL PROTECTED] wrote:
>Unable to do mass update from a table using:
>
>UPDATE SET = 'X' FROM , WHERE
>
>Get "Invalid end of
Hi Kevin,
That statement really works in SQL Server? What does it do?
Try:
UPDATE SET = WHERE
JLS
[EMAIL PROTECTED] wrote:
Unable to do mass update from a table using:
UPDATE SET = 'X' FROM , WHERE
Get "Invalid end of SQL statement." on the FROM keyword. This is a real
handy item to have (u
Unable to do mass update from a table using:
UPDATE SET = 'X' FROM , WHERE
Get "Invalid end of SQL statement." on the FROM keyword. This is a real
handy item to have (use it in MS SQL Server). It may be a non-standard T-SQL
extension but I am not sure. Nonetheless, I would think that adding
10 matches
Mail list logo