Skip to content
Loading
  • 0
    Even when I specified the barcode that 1 have and 1 dont have bookcode, it just print that 1 bookcode only and theres no 'Nodata' cell row
    1. var barCodesstring = string.Format("'{0}'", string.Join("','", 9789830093819,9789830094205));

    2. SqlCommand cmd = new SqlCommand("WITH cte AS(SELECT case WHEN InvtID IS NULL OR InvtID = '' THEN 'Nodata' ELSE InvtID END AS InvtID, Barcode, ROW_NUMBER() OVER(PARTITION BY Barcode ORDER BY InvtID Asc) rid FROM InventoryCustomer) SELECT InvtID AS BOOKCODE FROM cte WHERE rid = 1 and Barcode In (" + barCodesstring + ")", conn);
    0