Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting * a table based on only the Year?
Message
De
23/03/2010 13:28:56
 
 
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:
01456653
Vues:
35
>>hello!
>>i have this table and my date field gets populated by the date a client was added
>>supposed i wanna select all my clients based on the year.
>>i have a spinner. that gets the year.
>>
>>im trying to select all from my table where the year = the selected year in the spinner
>>
>>so i tried
>>
>>select * from mytable where clients.date_Add=thisform.spinner1.value;&& i think i saved that value 2 a variable
>>into cursor kem
>>browse
>>
>>i wasnt expecting it 2 work and it didnt data type mismatch.
>>
>>can i use the year separately ? or do i hav to enter a start date and end and query in between those two. that ive done before
>
>What 2 means? 2002?
>
>select * from mytable 
>where clients.date_Add >= date(2000 + thisform.Spinner1.value,1,1)
> and Clients.Date_Add < date(2000 + 1 + thisform.Spinner1.value, 1,1)
>into cursor kem nofilter
lol forgive my lazy internet lingo i meant to work. you're using the year 2000 i really didnt wanna hard code a year
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform