View Single Post
 
Old August 25th, 2009, 04:53 AM
om_prakash om_prakash is offline
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You can re-write the SQL as follows:
select main_acnt_code as code, main_acnt_name asname
from
fm_main_account
where MAIN_FRZ_FLAG ='N'
and
((in_Code ='CAPEX'AND main_class_code_05 ='Y')
OR(in_Code ='MAIN_ACC2'AND main_class_code_02 ='Y'))
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
The Following User Says Thank You to om_prakash For This Useful Post:
rupen (August 27th, 2009)