RE: Urgent: Regarding use of top

RE: Urgent: Regarding use of top

 

  

Think what you want is something like:

UPDATE EMP SET SAL=3500
WHERE ENAME in (SELECT TOP 20 ENAME FROM EMP WHERE ENAME LIKE '%s%')


Daniel Morphett
DBA
Brilliant Digital Entertainment
02 9281 9272


-----Original Message-----
From: Biswaranjan Rath
[mailto:mssqldba-ezmlmshield-x16143881.[Email address protected]
Sent: Thursday, July 29, 2004 3:35 PM
To: LazyDBA Discussion
Subject: Urgent: Regarding use of top


I have a SQL query like:

UPDATE EMP SET SAL=3500
WHERE ROWNUM <= 20 AND ENAME LIKE '%s%';

Can anybody help me out by giving suggestion about the equivalent
statement in T-SQL (SQL Server) ?


With best regards

Biswaranjan Rath
Subject Matter Expert
Amdocs DVCI, Pune, India
Phone : +91-20-4048951 Extn.: 302(Office)
+91-20-4062302 (Direct)












------------------------------------------------------------------------
-------------

The information contained in this message is proprietary of Amdocs,

protected from disclosure, and may be privileged.

The information is intended to be conveyed only to the designated
recipient(s)

of the message. If the reader of this message is not the intended
recipient,

you are hereby notified that any dissemination, use, distribution or
copying of

this communication is strictly prohibited and may be unlawful.

If you have received this communication in error, please notify us
immediately

by replying to the message and deleting it from your computer.

Thank you.

---------------------------------------------------------


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]



MS Sql Server LazyDBA home page