Hi all,

select ucp.payment_id, ucp.payment_service_id, cps.payment_service_amount,
ucp.coupon, ucp.payment_order_id, cps.definition,
state
  FROM user_delivery_payment ucp, delivery_payment_service cps, user_info
ui, course c
  WHERE ucp.payment_order_id is not null and date_format(ucp.payment_date,
'%d-%b-%Y') = '04-May-2008' and
     ucp.payment_service_id = cps.payment_service_id and cps.expires >
sysdate() and cps.payment_service_id =
     ucp.payment_service_id and ucp.user_id = ui.user_id and ui.course_id =
c.course_id and *ui.course_id not in (select
     course_id from course_attribute where ATTRIBUTE =
'HOSTED_AFFILIATE')*and c.state = 'TX' and ui.drivers_license not like
     'TEST%'

In the above query how can i remove the sub query highlighted in bold.

-- 
Krishna Chandra Prajapati

Reply via email to