Re: update statement
From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 03/18/04
- Next message: Anith Sen: "Re: Query to create user-customisable filters/search"
- Previous message: Carrasco: "View Partitioned"
- In reply to: hngo01: "Re: update statement"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: update statement"
- Reply: anonymous_at_discussions.microsoft.com: "Re: update statement"
- Reply: hngo01: "Re: update statement"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 01:52:38 +0530
Try:
--replace #t with the tablename you have
begin transaction
update #t
set unitnumber
=(select result from #t a
where a.name = #t.name and primarykey =
(select max(primarykey) from #t where #t.name = a.name and testcode = '%UN') )
where testcode ='TOOL'
--check the data and commit/rollback accordingly.
-- Vishal Parkar vgparkar@yahoo.co.in
- Next message: Anith Sen: "Re: Query to create user-customisable filters/search"
- Previous message: Carrasco: "View Partitioned"
- In reply to: hngo01: "Re: update statement"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: update statement"
- Reply: anonymous_at_discussions.microsoft.com: "Re: update statement"
- Reply: hngo01: "Re: update statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|