Is there any way to send two parameters:
PARAMETER_dateFrom
PARAMETER_dateTo
into my view (see below) called from outside?
I expect query like this:
select * from v_customFieldString where bug.id = XXXX and send in some way PARAMETER_dateFrom, PARAMETER_dateTo
create or replace view v_customFieldString as
select bug.id
,histold.bug_id as bugId
,bug.project_id as projectId
,histold.date_modified as date
,histold.old_value as oldvalue
,histnew.new_value as newvalue
from mantis_bug_table bug
left
join mantis_bug_history_table histold
on histold.bug_id = bug.id
and histold.date_modified =
(select min(date_modified )
from mantis_bug_history_table where bug_id=bug.id and field_name='Duration' and date_modified >= PARAMETER_date FROM and date_modified<= PARAMETER_dateTo )
and histold.field_name='Duration'
left
join mantis_bug_history_table histnew
on histnew.bug_id = bug.id
and histnew.date_modified =
(select max(date_modified )
from mantis_bug_history_table where bug_id=bug.id and field_name='Duration' and date_modified >= PARAMETER_date FROM and date_modified<= PARAMETER_dateTo)
and histnew.field_name='Duration'
PARAMETER_dateFrom
PARAMETER_dateTo
into my view (see below) called from outside?
I expect query like this:
select * from v_customFieldString where bug.id = XXXX and send in some way PARAMETER_dateFrom, PARAMETER_dateTo
create or replace view v_customFieldString as
select bug.id
,histold.bug_id as bugId
,bug.project_id as projectId
,histold.date_modified as date
,histold.old_value as oldvalue
,histnew.new_value as newvalue
from mantis_bug_table bug
left
join mantis_bug_history_table histold
on histold.bug_id = bug.id
and histold.date_modified =
(select min(date_modified )
from mantis_bug_history_table where bug_id=bug.id and field_name='Duration' and date_modified >= PARAMETER_date FROM and date_modified<= PARAMETER_dateTo )
and histold.field_name='Duration'
left
join mantis_bug_history_table histnew
on histnew.bug_id = bug.id
and histnew.date_modified =
(select max(date_modified )
from mantis_bug_history_table where bug_id=bug.id and field_name='Duration' and date_modified >= PARAMETER_date FROM and date_modified<= PARAMETER_dateTo)
and histnew.field_name='Duration'