SELECT A.BUSINESS_UNIT ,A.ORDER_NO ,A.SEQ_NUM ,LSNOTE.LANGUAGE_CD ,LSNOTE.TEXT254 FROM PS_ORD_NOTE A , PS_STD_NOTE_LANG LSNOTE , PS_STD_NOTE SNOTE , PS_STD_NOTE_DOC SDOC WHERE A.ORDER_INT_LINE_NO = 0 AND A.SCHED_LINE_NBR = 0 AND A.STD_NOTE_CD = LSNOTE.STD_NOTE_CD AND SDOC.DOCUMENT_CD = 'INVC' AND LSNOTE.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE SETCNTRLVALUE = A.BUSINESS_UNIT AND RECNAME = 'STD_NOTE_LANG') AND LSNOTE.SETID = SDOC.SETID AND LSNOTE.STD_NOTE_CD = SDOC.STD_NOTE_CD AND LSNOTE.EFFDT = SDOC.EFFDT AND %EffdtCheck(STD_NOTE_LANG, LSNOTE, %CurrentDateIn) AND SNOTE.SETID = LSNOTE.SETID AND SNOTE.STD_NOTE_CD = LSNOTE.STD_NOTE_CD AND SNOTE.EFFDT = LSNOTE.EFFDT AND SNOTE.EFF_STATUS = 'A'
|