View Single Post

   
  #1 (permalink)  
Old 04-08-2008, 06:17 PM
ali.alauoubiy@drkw.com
 
Posts: n/a
Default Need Help with Sybase

Hi all..

I need to change the following Select statement to an update statement
which updates hf.active to 'N' where all the hf.active found is 'n'.. I
am finding difficulties of re-writting this because of the recursive
relationship.

select
*
from
OrgUnit ou_sb inner join Allocation a
on ( a.subjectOrgUnitId = ou_sb.orgUnitId )
inner join OrgUnit ou_tb
on ( ou_tb.orgUnitId = a.parentOrgUnitId )
inner join HierarchyFlags hf
on ( hf.orgUnitId = ou_sb.orgUnitId )
where
ou_tb.orgUnitName = 'Old Books'
and hf.active ='n'

Many Thanks
Ali

Reply With Quote