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]
|