Closed theking2 closed 1 month ago
Input data
Which SQL and options did you provide as input?
select coalesce(FAMILY_ITEMS_DESCRIPTION, 'nicht zugewiesen') `Item family`, coalesce(SUBFAMILY_ITEMS_DESCRIPTION, 'nicht zugewiesen') `Item subfamily`, product.ITEMNR `Art-Nr.`, product.DESCRIPTION Bezeichnung, coalesce(LOCATIONQTY, 0) `Verfügbar`, STANDARDCOST EP, coalesce(StockAmount, 0) `Lagerwert`, KONTONR /*, concat( KONTOBEZEICHNUNG, '|', KONTONR ) Account*/ from product left join product_family pf on ITEMFAMILY = FAMILY_ITEMS and ITEMSUBFAMILY = SUBFAMILY_ITEMS join ( select ITEMNR, sum(LOCATIONQTY) LOCATIONQTY, sum(StockAmount) StockAmount, str_to_date(IP_TIMEDATEPK_REPORTING, '%Y%m%d') `last_date`, STANDARDCOST from report_stock_300 join warehouse_300_state using (IP_WAREHOUSE, STOCKTYPE) where `State` = 'Verfügbar' and TDYEAR = $year and TDMONTH = $month group by ITEMNR, IP_TIMEDATEPK_REPORTING ) r300 using (ITEMNR) order by coalesce(FAMILY_ITEMS, 'zz'), SUBFAMILY_ITEMS, product.DESCRIPTION
Expected Output
Actual Output
Usage
Prettier-SQL VSCode extension is outdated. Please read the FAQ.
However the tabulateAlias feature has been removed from SQL Formatter since 14.0.0 (because it was fundamentally broken, as demonstrated by the bug report above).
tabulateAlias
Input data
Which SQL and options did you provide as input?
Expected Output
Actual Output
Usage