Entradas

Mostrando las entradas de febrero, 2015

UNIR 2 TABLAS EN UAN CONSULTA SIN USAR TABLAS TEMPORALES

UNIR 2 TABLAS EN UAN CONSULTA SIN USAR TABLAS TEMPORALES

SELECT SUM(peso)
FROM
(
SELECT
SUM(PERSO.peso) as peso
FROM
paqueteria_03cajaPersonaOrd AS PERSO
LEFT JOIN paqueteria_01ordenes AS ORD ON PERSO.idOrd=ORD.id
WHERE
PERSO.idOrd = '3235'

UNION ALL

SELECT
SUM(PRED.peso) as peso
FROM
paqueteria_03cajaPredetOrd AS PRED
LEFT JOIN paqueteria_01ordenes AS ORD ON PRED.idOrd=ORD.id
WHERE
PRED.idOrd = '3235'
)AS tablaPeso
-- GROUP BY peso

VIRTUEMART 2 CONSULTA PARA OBTENER product_name,PROD.product_sku,PNOM.product_name,CAT.category_name AS category_path,manufacturer_name,PRECIO.product_price,PROD.published,MEDIA.file_url,MEDIA.file_url_thumb,PNOM.product_s_desc,PNOM.product_desc,PROD.product_in_stock DE VIRTUEMART 3.02

CONSULTA PARA OBTENER product_name,PROD.product_sku,PNOM.product_name,CAT.category_name AS category_path,manufacturer_name,PRECIO.product_price,PROD.published,MEDIA.file_url,MEDIA.file_url_thumb,PNOM.product_s_desc,PNOM.product_desc,PROD.product_in_stock DE VIRTUEMART 3.02

SET NAMES 'utf8';
SELECT
SUBSTRING(PNOM.product_name,1,50) AS product_name,
PROD.product_sku,
PNOM.product_name,
CAT.category_name AS category_path,
FABRICANTE_ES.mf_name AS manufacturer_name,
PRECIO.product_price,
PROD.published,
MEDIA.file_url,
MEDIA.file_url_thumb,
PNOM.product_s_desc,
PNOM.product_desc,
PROD.product_in_stock
FROM
i90to_virtuemart_products AS PROD
LEFT JOIN i90to_virtuemart_product_prices AS PRECIO ON PRECIO.virtuemart_product_id = PROD.virtuemart_product_id
INNER JOIN i90to_virtuemart_products_es_es AS PNOM ON PNOM.virtuemart_product_id = PROD.virtuemart_product_id
LEFT JOIN i90to_virtuemart_product_categories AS REL_PROD_CAT ON REL_PROD_CAT.virtuemart_product_id = PROD.virtuemart_produc…

Facebook Like