Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting * a table based on only the Year?
Message
 
 
À
23/03/2010 13:40:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01456639
Message ID:
01456670
Vues:
30
>>>>>
>>>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform