Untitled

 avatar
unknown
plain_text
a month ago
1.1 kB
2
Indexable
SELECT 
    cost,
    CONCAT('s', serialnumber) serial,
    CASE
        WHEN product LIKE '%-_Y%' THEN 'Handbag'
        WHEN product LIKE '%-_O%' THEN 'Outer'
        WHEN product LIKE '%-_L%' THEN 'Jewelry'
        WHEN product LIKE '%-_Z%' THEN 'Shoe'
        WHEN product LIKE '%-_G%' THEN 'Glasses'
        WHEN product LIKE '%-_A%' THEN 'Accessory'
        WHEN product LIKE '%-_H%' THEN 'Home'
        WHEN product LIKE '%-_U%' THEN 'Beauty'
        ELSE 'Standard Inv'
    END AS 'Type',
    product,
    size,
    bin,
    location,
    previousbin,
    previouslocation,
    lastscandate,
    SUBSTRING_INDEX(SUBSTRING_INDEX(locationhistory, ']', 1),
            ',',
            - 1) user
FROM
    inventoryitem
WHERE
    location LIKE 'STORE%'
        AND location LIKE '%3002%'
        AND location != 'STORE-SBX-Consignment-3002'
        AND location NOT LIKE '%STORE-WH7%'
        AND location NOT LIKE '%STORE-L%'
        AND location NOT LIKE '%STORE-TI%'
        AND location NOT LIKE '%STORE-TO%'
        AND qtyonhand = 1
HAVING product NOT LIKE 'RHOM%'
ORDER BY cost DESC
Editor is loading...
Leave a Comment