Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 6.5 - DATEADD(day, -90, getdate())
Message
 
 
À
19/02/2008 09:53:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01293761
Message ID:
01293766
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform