Steve,

Rather than assuming FME will be run exactly every week, you should  
set up so that all records since the *last run* are pulled.  As a  
side effect, this makes constructing your query easier too (no date  
math required).

Have an include file which has something like

MACRO START_DATE 20060101

in it.  Construct your SQL using a [date] > $(START_DATE) and [date]  
< $(END_DATE) where you generate END_DATE off the system clock.

Finally, the coup de grace.  At the end of your script, run a little  
TCL routine that overwrites your include file with a new include  
file, that has the current time (END_DATE) in the START_DATE.

Now you can run your script weekly, hourly, daily, monthly, whatever,  
and it will always pull all outstanding records.

P

On Mar 20, 2006, at 12:52 PM, Steve Nelson wrote:

> Anyone have some advice on how to tackle the following....
>
> I'm querying an Access database, I have an FME set up that makes some
> selections based on certain factors, etc.. but what I'd like to do is
> have this FMW run every week, but when it runs, to only spit out
> records that were entered that week.
> So if I set the FME to run every Monday morning, I'd like it to only
> output records entered from the previous Monday, until the day before
> (Sunday).  Is there a way to query or test and filter date fields in
> FME?
> My original thinking was to use the date stamper and then just
> subtract 7 days from the stamped date, but not really sure what to do
> if the FME runs on say, Monday January 2nd (20060102).  How do I get
> it to select records entered between December 26th 2005(20051225) and
> january 1st 2006 (20060101)??
>
> Any suggestions on how to get started are appreciated.
> Steve
>
>
>
>
>
>
>
>
> Get the maximum benefit from your FME, FME Objects, or  
> SpatialDirect via our Professional Services team.  Visit  
> www.safe.com/services for details.
> Yahoo! Groups Links
>
>
>
>
>
>
>






Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our 
Professional Services team.  Visit www.safe.com/services for details. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to