Reply to Re: Update n rows

Your name:

Reply:


Posted by David Portas on 03/25/06 09:54

Khan wrote:
> I'm using where condition e.g. " where assign = ' ' ". but this
> condition is true for 100 rows, and i want to update only first 15
> rows, otherwise all 100 rows will be updated which i don't want.
> I tried SET ROWCOUNT but coud'nt get through.

Tables have no inherent order. "First 15 rows" doesn't make any sense
unless you explain what defines those first 15. Is there a date column
for example? What is/are the key(s) of your table? As we already
suggested, please post DDL and sample data and tell us what version of
SQL Server you are using. See:
http://www.aspfaq.com/etiquette.asp?id=5006

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

[Back to original 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

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