Subject | Re: RES: [firebird-support] How to make queries to a temporary result set |
---|---|
Author | HECTOR RIOS |
Post date | 2012-09-22T00:41:14Z |
Hi Fabiano,
I was thinking more like this:
1. User wants bills from client x and program makes a
select * from clients where name= x
2. Program displays x bills in some grid.
3. Later on, user wants x bills from march and I would like to make a query in program like this
select * from lastResultSet where moth(bill_date) = 'march'
of course, in this particular example, I could have made a query like
select * from clients where name= x and month(bill_date)= 'march'
but sometimes the second query is not added so easily, you would have to make some parsing to mix both queries.
It would be a lot easier if there were some temporary result set and apply filters to this temporary.
Regards,
Hector Rios
________________________________
From: Fabiano <fabianoaspro@...>
To: firebird-support@yahoogroups.com
Sent: Friday, September 21, 2012 1:26 PM
Subject: RES: [firebird-support] How to make queries to a temporary result set
Maybe:
Select * from
(
select * from table where field1 = 1
) as FILTER
Where FILTER.field2 = 2
Fabiano.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
I was thinking more like this:
1. User wants bills from client x and program makes a
select * from clients where name= x
2. Program displays x bills in some grid.
3. Later on, user wants x bills from march and I would like to make a query in program like this
select * from lastResultSet where moth(bill_date) = 'march'
of course, in this particular example, I could have made a query like
select * from clients where name= x and month(bill_date)= 'march'
but sometimes the second query is not added so easily, you would have to make some parsing to mix both queries.
It would be a lot easier if there were some temporary result set and apply filters to this temporary.
Regards,
Hector Rios
________________________________
From: Fabiano <fabianoaspro@...>
To: firebird-support@yahoogroups.com
Sent: Friday, September 21, 2012 1:26 PM
Subject: RES: [firebird-support] How to make queries to a temporary result set
Maybe:
Select * from
(
select * from table where field1 = 1
) as FILTER
Where FILTER.field2 = 2
Fabiano.
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]