Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP DATE() vs. SQL GETDATE()
Message
 
 
To
23/04/2006 22:47:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01115333
Message ID:
01115866
Views:
11
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform