Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL 6.5 - DATEADD(day, -90, getdate())
Message
 
 
To
19/02/2008 09:53:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01293761
Message ID:
01293766
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform