Hello there, I need your help.
I have this output with query COUNT and GROUP BY `Identified` and `store`, execute in `tbl_quantity`:
With server side language (ASP NET) the user choose `quantity` for `Identified`.Code:quantity Identified store 12 115961 NY 3 115961 BS
I need update the selected quantity and not make available the number of rows quantity.
e.g.:
The user choose `quantity` 5 for `Identified` 115961 and store `NY`, this is the new output:
And I tried this query (I'm not sure of this solution...)Code:quantity Identified store 7 115961 NY 3 115961 BS
I have this error, can you help me?Code:UPDATE `tbl_quantity` AS t JOIN `tbl_registry` AS e ON t.store = e.store SET available = 'No' WHERE 1 AND Identified = '115961' AND t.store = 'NY' AND id IN ( SELECT id FROM ( SELECT id FROM `tbl_quantity` ORDER BY id ASC LIMIT 0, 5 <=== the user choose `quantity` ) tmp );
Thank you.
Code:[Err] 1052 - Column 'id' in IN/ALL/ANY subquery is ambiguous



Reply With Quote






Bookmarks