Subject View, filter or ... ?
Author Cristian Ivan
Sorry for the "Subject" of the original mail, I was in a hurry :)

Hi !

I wonder if somebody here on the list has a better idea for the
following problem I have:

1. I have a table with a "month,year,somedata" fields.

2. When the user starts the program he is asked about the month and
year he wants to work with and then the whole program only works with
that "somedata".

3. I've "solved" the problem by creating a view after he selects the
month and data, something like
create view curent_table as select * from table where (month=%d) and (year=%d)',
After that in the whole program I'm only reffering to the "curent"
view. I've done this because I find easier to use "select from
curent_table ... " than appending to all
queries something like 'where month=... and year=..." (select from
table where (condition) AND month=... and year=...".

Note: the problem with this is that only one user could use the
database at one time...or more users using only the selected month and
year. In fact this is way I'm trying to find an alternative :)

4. There is another way of solving this by using filters, but
it's almost the same as the last statement.

Could there be an another way of working with a subset of the data,
as described above ?


Best regards,
Cristian mailto:cris@...