>About a year or so ago I got bit by this same problem but I can't remember the work around.
>
>I've created a remote view against a MS SQL 6.5 database and I'm using this code in the query to retrieve records from the last 90 days.
>
>WHERE SomeDateField = DATEADD(day, -90, getdate())
>
>It works fine when I'm still in the View Designer but when I save the query and try to USE the view I get an error. When I try to reload the query in the View Designer, I get the error: "SQL: Column 'DAY' is not found"
>
>Is there another way to accomplish this in SQL 6.5?
>
>BTW .. I usually work with SQL 2000 and use the code below that works just fine in that version on SQL:
>
>WHERE SomeDateField = getdate()-90
>
>Thanks,
>Robert
Not sure if this would be on any help, but try dd or d instead of DAY. May be VFP becomes confused.
If it's not broken, fix it until it is.
My Blog