Thanks, that works.

The syntax i used is allowed in MS SQL.

best regards,
Radzi.

----- Original Message ----- From: "Kees Nuyt" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Monday, October 16, 2006 1:54 PM
Subject: Re: [sqlite] How do i do this UPDATE in SQLite?


On Mon, 16 Oct 2006 09:53:19 +0800, you wrote:

update i set val=qty*q.price
from salesrecord i
inner join historicalprice q on i.itemid=q.itemid

I would use a correlated subquery which returns one column,
instead of the join. I don't think you can use aliasses there.

update salesrecord set val = qty * (select price from
historicalprice where historicalprice.itemid ==
salesrecord.itemid);  {untested}

It depends on the version if you can use this.

thanks.

Radzi.
--
 (  Kees Nuyt
 )
c[_]

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------





-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to