D
D
Hi:
I have the below SQL:
SELECT DISTINCT ODSDBA_WATP1MIT.MENU_ITEM_CD, ODSDBA_WATP1MIT.MENU_ITEM_DSC,
ODSDBA_WATP1MIT.AMIL_FG, ODSDBA_WATP1MIT.MENU_ITEM_STS,
ODSDBA_WATS5MIX.DLY_UNT_SLS_QTY, ODSDBA_WATS5MIX.NATL_STR_NBR,
ODSDBA_WATS5MIX.DLY_SLS_DT, [DS Complete].[Site Description], [DS
Complete].City, [DS Complete].Prov, IIf([Owner Type]="M",[Business/Ops
Consultant],[Franchisee]) AS Expr1, IIf([Owner Type]="M","Ops.
Consultant","Franchisee") AS Expr2, [DS Complete].[BO Mobil], [DS
Complete].[BO Office], [DS Complete].[Fran Mobil], [DS Complete].[Owner
Type], [DS Complete].[Fran Office], [DS Complete].[Restaurant Phone #], [DS
Complete].[McOpCo#], IIf([dly_sls_dt]>[comp],"Contact Store?","Ignore") AS
Expr3, [DS Complete].Comp
FROM (ODSDBA_WATP1MIT INNER JOIN ODSDBA_WATS5MIX ON
ODSDBA_WATP1MIT.MENU_ITEM_CD = ODSDBA_WATS5MIX.MENU_ITM_NBR) INNER JOIN [DS
Complete] ON ODSDBA_WATS5MIX.NATL_STR_NBR = [DS Complete].[Natl#]
WHERE (((ODSDBA_WATP1MIT.AMIL_FG)="N") AND ((ODSDBA_WATP1MIT.MENU_ITEM_STS)
Not Like "T") AND ((ODSDBA_WATS5MIX.DLY_SLS_DT) Between [Please enter the
Start Date] And Date()) AND ((IIf([dly_sls_dt]>[comp],"Contact
Store?","Ignore")) Like "Contact Store?"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC;
*************
What I would like is if today I have 2 Menu Items: 1 and 2 and tomorrow I
have 12 and 3 fro one store I would show just the 3 one?
Any help is appreciated
Thanks,
Dan
I have the below SQL:
SELECT DISTINCT ODSDBA_WATP1MIT.MENU_ITEM_CD, ODSDBA_WATP1MIT.MENU_ITEM_DSC,
ODSDBA_WATP1MIT.AMIL_FG, ODSDBA_WATP1MIT.MENU_ITEM_STS,
ODSDBA_WATS5MIX.DLY_UNT_SLS_QTY, ODSDBA_WATS5MIX.NATL_STR_NBR,
ODSDBA_WATS5MIX.DLY_SLS_DT, [DS Complete].[Site Description], [DS
Complete].City, [DS Complete].Prov, IIf([Owner Type]="M",[Business/Ops
Consultant],[Franchisee]) AS Expr1, IIf([Owner Type]="M","Ops.
Consultant","Franchisee") AS Expr2, [DS Complete].[BO Mobil], [DS
Complete].[BO Office], [DS Complete].[Fran Mobil], [DS Complete].[Owner
Type], [DS Complete].[Fran Office], [DS Complete].[Restaurant Phone #], [DS
Complete].[McOpCo#], IIf([dly_sls_dt]>[comp],"Contact Store?","Ignore") AS
Expr3, [DS Complete].Comp
FROM (ODSDBA_WATP1MIT INNER JOIN ODSDBA_WATS5MIX ON
ODSDBA_WATP1MIT.MENU_ITEM_CD = ODSDBA_WATS5MIX.MENU_ITM_NBR) INNER JOIN [DS
Complete] ON ODSDBA_WATS5MIX.NATL_STR_NBR = [DS Complete].[Natl#]
WHERE (((ODSDBA_WATP1MIT.AMIL_FG)="N") AND ((ODSDBA_WATP1MIT.MENU_ITEM_STS)
Not Like "T") AND ((ODSDBA_WATS5MIX.DLY_SLS_DT) Between [Please enter the
Start Date] And Date()) AND ((IIf([dly_sls_dt]>[comp],"Contact
Store?","Ignore")) Like "Contact Store?"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC;
*************
What I would like is if today I have 2 Menu Items: 1 and 2 and tomorrow I
have 12 and 3 fro one store I would show just the 3 one?
Any help is appreciated
Thanks,
Dan