Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP DATE() vs. SQL GETDATE()
Message
 
 
À
23/04/2006 22:47:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01115333
Message ID:
01115866
Vues:
12
Try
WHERE YEAR(Pickdetail.EditDate) = 2006
>I've been working with DATEADD & DATEPART but I'm still having problems. My skills in writing SQL is limited, therefore, I use the Query Designer almost exclusively. Using the Query Designer, I've created a view that generates the following SQL:
>
>
>SELECT Pickdetail.Sku, Sku.DESCR, Pickdetail.Qty, Pickdetail.EditDate;
> FROM ;
>     dbo.PICKDETAIL Pickdetail ;
>    INNER JOIN dbo.SKU Sku ;
>   ON  Pickdetail.Sku = Sku.Sku ;
>   WHERE DATEPART(year, Pickdetail.EditDate) = 2006
>
>
>This code runs fine yielding the expected results while in the design mode but after I save it and try reopen it, I get the following error:
>
>"SQL: Column 'YEAR' is not found."
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform