1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| SELECT splus.project_definition.pd_name ,
splus.project_schedule_hypothesis.psh_startdate ,
splus.project_schedule_hypothesis.psh_quantity ,
splus.article_bom_schedule.abs_leadtime ,
splus.leadtime_expose(splus.project_definition.pd_index,
splus.project_definition.pd_name,
splus.project_schedule_hypothesis.psh_startdate,
splus.project_schedule_hypothesis.psh_quantity,
splus.article_bom_schedule.abs_leadtime) as ca,
case when abs_leadtime=null then 'Unknow' else 'Know' end as unknow
FROM splus.article_bom_schedule ,
splus.project_definition ,
splus.currency_list currency_list_a ,
splus.currency_list currency_list_b ,
splus.project_schedule_hypothesis
WHERE ( splus.project_definition.pd_index = splus.article_bom_schedule.abs_projectid ) and ( splus.project_definition.pd_name = splus.article_bom_schedule.abs_projectname ) and ( splus.project_definition.pd_index = splus.project_schedule_hypothesis.psh_projectid ) and ( splus.project_definition.pd_name = splus.project_schedule_hypothesis.psh_projectname ) and ( splus.project_definition.pd_currency = currency_list_b.dl_symbol ) and ( splus.article_bom_schedule.abs_currency = currency_list_a.dl_symbol ) and ( splus.project_schedule_hypothesis.psh_startdate = splus.article_bom_schedule.abs_scheduledate ) and ( splus.project_schedule_hypothesis.psh_quantity = splus.article_bom_schedule.abs_scheduleqty ) and ( ( splus.project_definition.pd_index =45 ) and ( splus.project_definition.pd_name = 'Volvo carte tuner' ) )
GROUP BY "splus"."project_definition"."pd_name" ,
"splus"."project_definition"."pd_index" ,
"splus"."project_schedule_hypothesis"."psh_startdate" ,
"splus"."project_schedule_hypothesis"."psh_quantity" ,
"splus"."article_bom_schedule"."abs_leadtime"
ORDER BY splus.article_bom_schedule.abs_leadtime DESC |
Partager