Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting * a table based on only the Year?
Message
From
23/03/2010 13:28:56
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01456639
Message ID:
01456653
Views:
34
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform