Sorting changed by custom sql? BT 10.1SR4/Excel2010 Follow
I'm not sure if this is just an SQL thing or a BarTender thing.
I have database connection to an Excel workbook with two spreadsheets in it. I join those two spreadsheets using custom SQL in BarTender. Neither spreadsheet has a numeric ID, the join is around a text field.
I want the query to keep the sorting order of the table CustOrders. Normally this is the way the data appears when I don't specify any ORDER BY. Except now that I've added an additional clause to my WHERE, it suddenly reverts to sorting by the first column instead of keeping the data in its original order. When I remove this line, sorting goes back to the way it should be. Any idea why it might be doing this?
For reference, my WHERE clause looks like this:
WHERE `CustOrders$`.`Name` LIKE '?CustName%'
AND `Sheet1$`.`Full Item No` = `CustOrders$`.`Item`
AND ABS(`CustOrders$`.`Qty`/`Sheet1$`.`UnitQty`) >= 1 this is the line I added that apparently causes the sorting order to change.
Please sign in to leave a comment.