Skip to Content
Former Member
Mar 10, 2009 at 03:49 PM

query help


Hi, all-

Wondering if anyone can help me with the following query? When I run this using a date of 3/9/09, I get all dates instead of 3/9//09. Problem arose when I added several GLDiv fields instead of using just one - up until then it worked fine. I'm trying to see deliveries for a specified date by division, and in this case, I want to see 4 divisions on one report (this is the U_ABBA_GLDiv field).

What do I need to tweak?

SELECT T0.[DocNum], T0.[U_ABBA_SONum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[U_ABBA_ShipName], T0.[U_ABBA_ShipAttn], T0.[U_ABBA_ShipCity], T0.[U_ABBA_ShipState] FROM ODLN T0 WHERE T0.[DocDate] =[%] AND T0.[U_ABBA_GLDiv] = '3-Whsl' OR T0.[U_ABBA_GLDiv] = '4-C2' OR T0.[U_ABBA_GLDiv] = '6-Retail' OR T0.[U_ABBA_GLDiv] = '7-Rugged'