Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting * a table based on only the Year?
Message
 
 
To
23/03/2010 13:40:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01456639
Message ID:
01456670
Views:
29
>>>>>
>>>>>lol forgive my lazy internet lingo i meant to work. you're using the year 2000 i really didnt wanna hard code a year
>>>>
>>>>Alternative solution would be
>>>>
>>>>year(date) = thisform.Spinner1.value
>>>>
>>>>this solution is worse if you have an index on date field. Otherwise it doesn't matter and shorter to use.
>>>
>>>
>>>would i hav to write it like (1,1,year) if im using the british date in my tableS?
>>
>>date function accepts year, month, day parameters. Check Help.
>
>yea i kno...but im wondering why its selecting nothing not even if i hard code a year

Try first
select * from myTable where datefield >=date(2002,1,1) and datefiled < (2003,1,1) 
Does it bring you records? If not, in means all records are deleted or don't exists for the year 2002.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform