SELECT DISTINCT A.BUSINESS_UNIT , A.AUC_ID , A.AUC_ROUND , A.AUC_VERSION , B.ATTACHSYSFILENAME , B.ATTACH_DESCR , B.ATTACHUSERFILE , A.SEND_TO_VENDOR , A.BID_FACTOR_NBR , A.LINE_NBR , D.DESCR254_MIXED , A.BIDDER_ID , A.BIDDER_SETID , E.OPRID FROM PS_AUC_ATTCH A , PS_PV_ATTACHMENTS B , PS_AUC_LINE D , PS_VNDR_USER_VW_FL E WHERE A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.ATT_VERSION = B.ATT_VERSION AND A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.AUC_ID = D.AUC_ID AND A.LINE_NBR = D.LINE_NBR AND A.BIDDER_SETID = E.SETID AND A.BIDDER_ID = E.VENDOR_ID AND A.SEND_TO_VENDOR = 'Y' AND A.BIDDER_TYPE = 'V' AND A.LINE_NBR <> 0 AND A.BID_FACTOR_NBR = 0 AND (A.AUC_EVENT_PDF_FLG = 'Y' OR A.AUC_EVENT_XML_FLG = 'Y') AND A.BIDDER_ID <> ' ' AND A.BIDDER_ID <> 'PUBLIC_AUC' UNION SELECT DISTINCT A.BUSINESS_UNIT , A.AUC_ID , A.AUC_ROUND , A.AUC_VERSION , B.ATTACHSYSFILENAME , B.ATTACH_DESCR , B.ATTACHUSERFILE , A.SEND_TO_VENDOR , A.BID_FACTOR_NBR , A.LINE_NBR , D.DESCR254_MIXED , A.BIDDER_ID , A.BIDDER_SETID , E.OPRID FROM PS_AUC_ATTCH A , PS_PV_ATTACHMENTS B , PS_AUC_LINE D , PSOPRALIAS E WHERE A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.ATT_VERSION = B.ATT_VERSION AND A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.AUC_ID = D.AUC_ID AND A.LINE_NBR = D.LINE_NBR AND A.BIDDER_SETID = E.SETID AND A.BIDDER_ID = E.BIDDER_ID AND E.OPRALIASTYPE = 'BID' AND A.BIDDER_TYPE = 'B' AND A.SEND_TO_VENDOR = 'Y' AND A.LINE_NBR <> 0 AND A.BID_FACTOR_NBR = 0 AND (A.AUC_EVENT_PDF_FLG = 'Y' OR A.AUC_EVENT_XML_FLG = 'Y') AND A.BIDDER_ID <> ' ' AND A.BIDDER_ID <> 'PUBLIC_AUC' UNION SELECT DISTINCT A.BUSINESS_UNIT , A.AUC_ID , A.AUC_ROUND , A.AUC_VERSION , B.ATTACHSYSFILENAME , B.ATTACH_DESCR , B.ATTACHUSERFILE , A.SEND_TO_VENDOR , A.BID_FACTOR_NBR , A.LINE_NBR , D.DESCR254_MIXED , E.OPRALIASVALUE , A.BIDDER_SETID , E.OPRID FROM PS_AUC_ATTCH A , PS_PV_ATTACHMENTS B , PS_AUC_LINE D , PSOPRALIAS E WHERE A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.ATT_VERSION = B.ATT_VERSION AND A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.AUC_ID = D.AUC_ID AND A.LINE_NBR = D.LINE_NBR AND A.BIDDER_SETID = E.SETID AND A.BIDDER_ID = E.OPRALIASVALUE AND E.OPRALIASTYPE = 'CST' AND A.BIDDER_TYPE = 'C' AND A.SEND_TO_VENDOR = 'Y' AND A.LINE_NBR <> 0 AND A.BID_FACTOR_NBR = 0 AND (A.AUC_EVENT_PDF_FLG = 'Y' OR A.AUC_EVENT_XML_FLG = 'Y') AND A.BIDDER_ID <> ' ' AND A.BIDDER_ID <> 'PUBLIC_AUC' UNION SELECT DISTINCT A.BUSINESS_UNIT , A.AUC_ID , A.AUC_ROUND , A.AUC_VERSION , B.ATTACHSYSFILENAME , B.ATTACH_DESCR , B.ATTACHUSERFILE , A.SEND_TO_VENDOR , A.BID_FACTOR_NBR , A.LINE_NBR , D.DESCR254_MIXED , A.BIDDER_ID , A.BIDDER_SETID , ' ' FROM PS_AUC_ATTCH A , PS_PV_ATTACHMENTS B , PS_AUC_LINE D WHERE A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.ATT_VERSION = B.ATT_VERSION AND A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.AUC_ID = D.AUC_ID AND A.LINE_NBR = D.LINE_NBR AND A.SEND_TO_VENDOR = 'Y' AND A.LINE_NBR <> 0 AND A.BID_FACTOR_NBR = 0 AND A.BIDDER_ID = ' ' AND A.AUC_EVENT_PDF_FLG = 'N' AND A.AUC_EVENT_XML_FLG = 'N' UNION SELECT A.BUSINESS_UNIT , A.AUC_ID , A.AUC_ROUND , A.AUC_VERSION , B.ATTACHSYSFILENAME , B.ATTACH_DESCR , B.ATTACHUSERFILE , A.SEND_TO_VENDOR , A.BID_FACTOR_NBR , A.LINE_NBR , D.DESCR254_MIXED , A.BIDDER_ID , A.BIDDER_SETID , ' ' FROM PS_AUC_ATTCH A , PS_PV_ATTACHMENTS B , PS_AUC_LINE D WHERE A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.ATT_VERSION = B.ATT_VERSION AND A.SCM_ATTACH_ID = B.SCM_ATTACH_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.AUC_ID = D.AUC_ID AND A.LINE_NBR = D.LINE_NBR AND A.SEND_TO_VENDOR = 'Y' AND A.LINE_NBR <> 0 AND ((A.BIDDER_TYPE = 'P' AND A.BIDDER_ID = 'PUBLIC_AUC' AND (A.AUC_EVENT_PDF_FLG = 'Y' OR A.AUC_EVENT_XML_FLG = 'Y')) OR (A.BIDDER_TYPE = ' ' AND (A.AUC_EVENT_PDF_FLG = 'N' AND A.AUC_EVENT_XML_FLG = 'N')))
|