i have an quary
select we.wip_entity_n ame job_number,
wmt.transaction _date,
bd.department_c ode,
wmt.TRANSACTION _QUANTITY
From wip_move_transa ctions wmt,
wip_entities we,
bom_departments bd
where wmt.wip_entity_ id = we.wip_entity_i d
AND wmt.organizatio n_id = we.organization _id
AND wmt.fm_departme nt_id = bd.department_i d
AND we.wip_entity_n ame = '24E/125914'
output result is
JOB_NUMBER TRANSACTION_DAT E DEPARTMENT_CODE TRANSACTION_QUA NTITY
24E/125914 5/5/2011 17:36 FAB 14
24E/125914 4/23/2011 15:35 FAB 10
24E/125914 9/9/2011 12:35 FAB 1
now i want to add parameter using TRANSACTION_dat e, if i will pass 5/5/2011 TRANSACTION_QUA NTITY will return sum of 10+14 = 24 according job_number
select we.wip_entity_n ame job_number,
wmt.transaction _date,
bd.department_c ode,
wmt.TRANSACTION _QUANTITY
From wip_move_transa ctions wmt,
wip_entities we,
bom_departments bd
where wmt.wip_entity_ id = we.wip_entity_i d
AND wmt.organizatio n_id = we.organization _id
AND wmt.fm_departme nt_id = bd.department_i d
AND we.wip_entity_n ame = '24E/125914'
output result is
JOB_NUMBER TRANSACTION_DAT E DEPARTMENT_CODE TRANSACTION_QUA NTITY
24E/125914 5/5/2011 17:36 FAB 14
24E/125914 4/23/2011 15:35 FAB 10
24E/125914 9/9/2011 12:35 FAB 1
now i want to add parameter using TRANSACTION_dat e, if i will pass 5/5/2011 TRANSACTION_QUA NTITY will return sum of 10+14 = 24 according job_number
Comment