Re: Is this a bug?

Поиск
Список
Период
Сортировка
От Carl van Tast
Тема Re: Is this a bug?
Дата
Msg-id 73t1vtk61pcsob9pa0p32a9eou3a31tolh@4ax.com
обсуждение исходный текст
Ответ на Is this a bug?  ("Imtiaz. S. M" <imtiaz_sm@yahoo.com>)
Список pgsql-sql
On Mon, 12 Nov 2001 21:20:44 -0800, "Jack Gao" <wei@gaofamily.org>
wrote:

>Update tblUserConfig Set Value = '1' From tblUserConfig As a Join
>tblConfigItem As b On a.ItemID = b.ID And b.Scope = 3 Where a.UserID = 1 And
>b.Name = 'UserClassID';
>
>It always update all records in tblUserConfig table!!!

Jack,

don't include the table you want to update in the FROM clause. Just
try:

Update tblUserConfig Set Value = '1' From tblConfigItem As b Where tblUserConfig.ItemID = b.ID   And b.Scope = 3   And
tblUserConfig.UserID= 1   And b.Name = 'UserClassID';
 

Kind regardsCarl van Tast


В списке pgsql-sql по дате отправления:

Предыдущее
От: Haller Christoph
Дата:
Сообщение: Re: Joins!!
Следующее
От: Robert Sundström
Дата:
Сообщение: Re: SQL99