You are here: Re: Please Help With Complex Update Statement Logic « MsSQL Server « IT news, forums, messages
Re: Please Help With Complex Update Statement Logic

Posted by othellomy on 11/10/06 07:07

I was wondering if multiple updates are happening that is overwriting
previous updates. The table in the where clause has '...in (some
values)...' If '...in (some values)...' are hit twice then the latest
value will overwrite other updates. I hope this makes sense.

pbd22 wrote:
> hi.
>
> I am having probelms with an update statement. every time
> i run it, "every" row updates, not just the one(s) intended.
>
> so, here is what i have. i have tried this with both AND and OR
> and neither seem to work.
>
> i dont know why this is elluding me, but i'd appreciate help with the
> solution.
>
> thanks.
>
> UPDATE add
> SET add_s = 1
> WHERE add.add_status = 0 and add.add_email = 'mags23@rice.edu'
> or add_s in
> (
> SELECT a.add_s
> FROM add a, edit e
> WHERE a.email_address = e.email_address
> and e.public_name = 'professor'
> )

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация