Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- item.f120_id,
- item.f120_rowid,
- item.f120_referencia,
- item.f120_descripcion,
- item.f120_id_grupo_impositivo,
- item.f120_id_tipo_inv_serv,
- item.f120_id_unidad_inventario,
- SUM ( costo.f402_costo_este_nivel_uni ) + SUM ( costo.f402_costo_nivel_previo_uni ) AS costo_estandar,
- item.f120_rowid_tercero_cli,
- bodega.f150_id AS bodega_asignada,
- item_ext.f121_rowid,
- item_ext.f121_id_ext1_detalle
- FROM
- unoee.dbo.t120_mc_items item
- INNER JOIN unoee.dbo.t121_mc_items_extensiones item_ext ON item.f120_rowid = item_ext.f121_rowid_item
- INNER JOIN unoee.dbo.t132_mc_items_instalacion instalacion ON item_ext.f121_rowid = instalacion.f132_rowid_item_ext
- INNER JOIN unoee.dbo.t150_mc_bodegas bodega ON instalacion.f132_mf_rowid_bodega_asigna = bodega.f150_rowid
- INNER JOIN unoee.dbo.t402_cm_costos costo ON item_ext.f121_rowid = costo.f402_rowid_item_ext
- AND costo.f402_id_grupo_costo = 2
- WHERE
- item.f120_id_cia = 1
- AND item.f120_referencia = '1818'
- GROUP BY
- f120_id,
- f121_rowid,
- f120_referencia,
- f120_descripcion,
- f120_id_grupo_impositivo,
- f120_id_tipo_inv_serv,
- f120_id_unidad_inventario,
- f150_id,
- f402_id_grupo_costo,
- f120_rowid_tercero_cli,
- f121_id_ext1_detalle,
- f120_rowid,
- f402_id_grupo_costo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement