Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to add two parameters into VIEW

Status
Not open for further replies.

ziziak

Programmer
Jul 13, 2007
11
SK
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'
 
I created tmp_table whre I am writng parameters...

anyway thnax for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top