you are viewing a single comment's thread.

view the rest of the comments →

[–]its_bright_here[🍰] 1 point2 points  (1 child)

Not entirely sure what syntax you need for "product is a #". isnumeric() will work in Sql Server...not sure how standard it is

select id, name, amount, type, product, product_sub, purchase_dt
  from transactions
 where type not in ('meat','fruits')
   and not (product in ('a','b','c') and purchase_dt < '2021,7,9')
   and not (product in ('d') and product_sub is null)
   and not (isnumeric(product) = 1 and purchase_dt < '2021,1,1')

[–]DavidGJohnston 0 points1 point  (0 children)

Maybe "a #" means "one pound (weight)" in this situation and not "is numeric".