Ayuda sobre productos BOLD:

ReferenceObjectsByClass_Need

Página:
< Volver

Esta consulta muestra los contratos que tienen la necesidad :pIDObject como preferente, preferente secundaria o preferente terciaria. Además muestra los planes que la incluyen.

 <Query Name='ReferenceObjectsByClass_Need' ShowName=>
   <Metadata>
       <Field Name="CLASE" ShowName= "Tipo de Objeto" />
           <Field Name="ID_CONTRACT_NAME" ShowName= "Contrato" ClassName="ContractWorker" Link="ID_CONTRACT"/>
           <Field Name="ID_CASE_NAME" ShowName= "Plan" ClassName="GlobalCase" Link="ID_CASE"/>
       </Metadata>
       <Return>1</Return>
       <MSSQL>
<![CDATA[
                   SELECT 'Contrato' AS CLASE, C.ID AS ID_CONTRACT, C.NOMBRE AS ID_CONTRACT_NAME,  null as ID_CASE, null as ID_CASE_NAME
                   FROM WPCONTRACTWORKER_TB C 
                   JOIN WPNEED_TB N ON C.ID_WPNEED = N.ID AND N.ID  = :pIDObject WHERE C.ACTIVO <> 2
                   UNION
                   SELECT 'Contrato' AS CLASE, C.ID AS ID_CONTRACT, C.NOMBRE AS ID_CONTRACT_NAME,  null as ID_CASE, null as ID_CASE_NAME
                   FROM WPCONTRACTWORKER_TB C 
                   JOIN WPNEED_TB N ON C.ID_WPNEED_2 = N.ID AND N.ID  = :pIDObject WHERE C.ACTIVO <> 2
                   UNION
                   SELECT 'Contrato' AS CLASE, C.ID AS ID_CONTRACT, C.NOMBRE AS ID_CONTRACT_NAME,  null as ID_CASE, null as ID_CASE_NAME
                   FROM WPCONTRACTWORKER_TB C 
                   JOIN WPNEED_TB N ON C.ID_WPNEED_3 = N.ID AND N.ID  = :pIDObject WHERE C.ACTIVO <> 2
                   UNION
                   SELECT 'Plan' AS CLASE, null AS ID_CONTRACT, null AS ID_CONTRACT_NAME,  W.ID_CASE AS ID_CASE, GC.NOMBRE AS ID_CASE_NAME
                   FROM
                   (SELECT ID_CASE FROM VIEW_INCLUDECASEOBJECTS_TB CO WHERE CLASS = 28 AND ID_OBJECT= :pIDObject) W
                   JOIN WPCASEGLOBAL_TB GC ON W.ID_CASE = GC.ID
]]>
       </MSSQL>
       <ORACLE>
       </ORACLE>
   </Query>
Was this article helpful?
0 out Of 5 Stars
5 Estrellas 0%
4 Estrellas 0%
3 Estrellas 0%
2 Estrellas 0%
1 Estrellas 0%
5
How can we improve this article?
How Can We Improve This Article?

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Contenido