mysql - select case not working #1064 -
i'm having issue this
select case when quantitypart =< threshold (threshold - quantitypart) + threshold end recommendedreorderquantity, * parts, stock can help?
select *, case when quantitypart =< threshold (threshold - quantitypart) + threshold end recommendedreorderquantity parts inner bring together stock on parts.partid = stock.partid
the * should come first before case sattement, 1 more thing, should be
<= not =<
select *, case when quantitypart <= threshold (threshold - quantitypart) + threshold end recommendedreorderquantity parts, stock as sidenote, query produces cartesian product. if that's not want tthen need supply linking condition, ex
select *, case when quantitypart <= threshold (threshold - quantitypart) + threshold end recommendedreorderquantity parts inner bring together stock on parts.columnname = stock.columnname where columnname column defines relationship.
mysql sql select
No comments:
Post a Comment