vb.net - SQL Select results in 0 rows only if I use a date or date range -
so i've been stuck on awhile because every statement came test in sql developer , worked fine, pulling on 300 rows. error in vb.net saying 0 rows exist.
select distinct mti_part_no,sum(mpcs.shop_inv_history.quantity) febqty mpcs.shop_inventory, mpcs.shop_inv_history shop_inv_history.date_time between '" & dt1.text & "' , '" & dt2.text & "' , shop_inv_history.comments = 'check item out' , mpcs.shop_inventory.si_key=mpcs.shop_inv_history.si_key , shop_inventory.category between 900 , 999 , shop_inventory.scrap_flag <> 1 group mti_part_no order febqty desc now, have tried date more vague like '%feb%' or more precise 05-feb-15
all of these pull rows fine in sql developer produce 0 rows in vb. tried in c# in case , results same.
the moment take date out of equation together, data fine in vb.
i'm @ loss here.
here statement sent when ran , when copied on sql dev produces 1,022 rows
select distinct mpcs.shop_inventory.mti_part_no, sum(mpcs.shop_inv_history.quantity) febqty mpcs.shop_inventory, mpcs.shop_inv_history mpcs.shop_inventory.si_key = mpcs.shop_inv_history.si_key , mpcs.shop_inv_history.date_time between '22-jun-2015' , '14-sep-2016' , mpcs.shop_inv_history.comments = 'check item out' , mpcs.shop_inventory.category between 900 , 999 , mpcs.shop_inventory.scrap_flag <> 1 group mpcs.shop_inventory.mti_part_no order febqty desc

Comments
Post a Comment