Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 4th, 2013  |  syntax: None  |  size: 1.26 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ($P{SELECTED_EFFECTIVE_DATE}.equal("true")
  2.     AND  $P{SELECTED_THROUGH_DATE}.equal("true")) ?
  3.     SELECT PRD.PRD_IND AS PRODUCT_NM,PRD.PRD_DS AS PRODUCT_DESC,OFR.OFFR_DESC
  4.     AS  OFFR_DESC,
  5.     PRH.PRC_STA_DT AS START_DATE,PRH.PRC_END_DT AS END_DATE,SEU.SELL_UNIT_ID
  6.     AS SELL_UNIT_ID,SEU.SELL_UNIT_NAME
  7.     FROM $P!{EPISYS_SCHEMA}EPS_PRICE_HDR PRH
  8.     INNER JOIN $P!{SCHEMA}EPS_EV_HDR EV ON EV.EPS_UID = PRH.EV_UID
  9.     INNER JOIN $P!{SCHEMA}EPS_PRD_HDR PRD ON PRD.PRD_TYP_CD = PRH.PRD_TYP_CD
  10.     AND PRD.PRD_CD = PRH.PRD_CD
  11.     INNER JOIN $P!{SCHEMA}EPS_OFFR_HDR OFR ON OFR.EPS_UID = PRH.PRC_OFFR_ID
  12.     INNER JOIN $P!{SCHEMA}EPS_SELL_UNIT SEU ON SEU.SELL_UNIT_ID = PRH.STR_GRP_ID
  13.     WHERE EV.EV_TYP_CD = 'P'
  14.     AND PRD.PRD_TYP_CD='SKU'
  15.     AND PRH.ACTION != 'D'
  16.     AND SEU.SELL_UNIT_ID= $P{SELL_UNIT_ID_STRING}
  17.     AND (PRH.PRC_STA_DT BETWEEN TO_DATE($P{SELECTED_EFFECTIVE_DATE},'yyyy/mm/dd')
  18.     AND TO_DATE($P{SELECTED_THROUGH_DATE},'yyyy/mm/dd'))
  19.     OR(PRH.PRC_END_DT BETWEEN TO_DATE($P{SELECTED_EFFECTIVE_DATE},'yyyy/mm/dd')
  20.     AND TO_DATE($P{SELECTED_THROUGH_DATE},'yyyy/mm/dd'))
  21.     OR (PRH.PRC_STA_DT < TO_DATE($P{SELECTED_EFFECTIVE_DATE},'yyyy/mm/dd')
  22.     AND TO_DATE($P{SELECTED_THROUGH_DATE},'yyyy/mm/dd') < PRH.PRC_END_DT)
  23.     ORDER BY PRH.PRC_STA_DT,PRD.PRD_DS