Filter

D

D

Hi:

I have a report based on the below SQL; is there any way to display just the
new Invalid MI? what I mean is for example today I got 4 Invalid MI; what I
would like is that tomorrow to display just the new ones if any!!

Thanks,

Dan

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, IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED") AS Expr3
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 ((IIf([dly_sls_dt]>[Comp],"Contact Store","Store is
ALIGNED")) Like "Contact Store"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC , IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED");
 
D

D

Hi John:

Thanks! the Dly_sls_dt; if today for the period of 1-7 March 2005 I have 5
Invalid MI, tomorrow for the period of 1-8 I need just the new ones, I do not
want to repeat the first 5.

Thanks,

Dan

JohnFol said:
What flags a record as being new as opposed to old?


D said:
Hi:

I have a report based on the below SQL; is there any way to display just
the
new Invalid MI? what I mean is for example today I got 4 Invalid MI; what
I
would like is that tomorrow to display just the new ones if any!!

Thanks,

Dan

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, IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED") AS Expr3
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 ((IIf([dly_sls_dt]>[Comp],"Contact Store","Store is
ALIGNED")) Like "Contact Store"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC ,
IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED");
 
J

JohnFol

Sounds like you need to "flag" the records as viewed so that if you left it
say 3 days you'd get those from 9th through to 12th March. That's a bit
more complex. What you could do is just add a filter on the date column as
being



D said:
Hi John:

Thanks! the Dly_sls_dt; if today for the period of 1-7 March 2005 I have 5
Invalid MI, tomorrow for the period of 1-8 I need just the new ones, I do
not
want to repeat the first 5.

Thanks,

Dan

JohnFol said:
What flags a record as being new as opposed to old?


D said:
Hi:

I have a report based on the below SQL; is there any way to display
just
the
new Invalid MI? what I mean is for example today I got 4 Invalid MI;
what
I
would like is that tomorrow to display just the new ones if any!!

Thanks,

Dan

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, IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED") AS Expr3
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 ((IIf([dly_sls_dt]>[Comp],"Contact Store","Store is
ALIGNED")) Like "Contact Store"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC ,
IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED");
 
D

D

Thanks John!

Dan

JohnFol said:
Sounds like you need to "flag" the records as viewed so that if you left it
say 3 days you'd get those from 9th through to 12th March. That's a bit
more complex. What you could do is just add a filter on the date column as
being



D said:
Hi John:

Thanks! the Dly_sls_dt; if today for the period of 1-7 March 2005 I have 5
Invalid MI, tomorrow for the period of 1-8 I need just the new ones, I do
not
want to repeat the first 5.

Thanks,

Dan

JohnFol said:
What flags a record as being new as opposed to old?


Hi:

I have a report based on the below SQL; is there any way to display
just
the
new Invalid MI? what I mean is for example today I got 4 Invalid MI;
what
I
would like is that tomorrow to display just the new ones if any!!

Thanks,

Dan

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, IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED") AS Expr3
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 ((IIf([dly_sls_dt]>[Comp],"Contact Store","Store is
ALIGNED")) Like "Contact Store"))
ORDER BY ODSDBA_WATS5MIX.DLY_SLS_DT DESC ,
IIf([dly_sls_dt]>[Comp],"Contact
Store","Store is ALIGNED");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Filter - Repost 1
New records 2
What will be the function? 2
Error: Too few paramenters 7
Croossab Query 5

Top