sql2005

  • when i try to execute a query i got this message

    Joined tables cannot be specified in a query containing outer join operators. View or function 'CRV_PRODUCTOS' contains joined tables.

    someone can help me please.

  • Do you have the old style joins in the query or the object crv_productos

    *= or =*

  • of course i got *= in my query but i use left outer join in the view crv_productos

  • From what I have read on the error your getting, it is because you are mixing the two types of join.

    *= and =* are only included for backwards compatability with sql2000 and db compat level 80

    You should be using the full join clauses like INNER JOIN, LEFT OUTER JOIN etc instead.

  • if i got this query how i can replace it by left outer join

    SELECT c_cliente = rtrim( CR_CLIENTE.crcli_apellidos ) + ' ' + rtrim( CR_CLIENTE.crcli_nombres ),

    FROM CR_CREDITOS,

    CR_CLIENTE,

    CR_OFICINAS,

    CR_LISTAS CR_LISTAS_a,

    CR_FORMATO,

    CR_LISTAS CR_LISTAS_b,

    CR_USUARIO,

    CR_USUARIO CA,

    CR_AGENTE,

    CRV_PRODUCTOS ,CR_SOLICITUDES , CR_PRODUCTOS

    WHERE ( CR_CREDITOS.crcre_cliente = CR_CLIENTE.crcli_id ) and

    ( CR_CREDITOS.crcre_operacion = CR_SOLICITUDES.crsol_operacion ) and

    ( CR_OFICINAS.crofi_sucursal = CR_CREDITOS.crcre_sucursal ) and

    ( CR_OFICINAS.crofi_oficina = CR_CREDITOS.crcre_oficina ) and

    ( CR_CREDITOS.crcre_moneda = CR_FORMATO.crfm_codigo ) and

    ( CR_CREDITOS.crcre_forma_pago *= CR_LISTAS_a.crlis_numero ) and

  • Completly re-write it

    SELECT

    ....

    FROM

    ....

    INNER JOIN --=

    .....

    ON ..... = .....

    LEFT OUTER JOIN --*=

    ON ..... = .....

    RIGHT OUTER JOIN --=*

    ON ..... = .....

    WHERE

    .....

    As you have only provided half of the query, it is hard to do it for you.

  • thank you so much

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply