Skip to content

Instantly share code, notes, and snippets.

@dijxtra
Created October 22, 2014 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dijxtra/5c38c68eacf30c11fde0 to your computer and use it in GitHub Desktop.
Save dijxtra/5c38c68eacf30c11fde0 to your computer and use it in GitHub Desktop.
sprememba selecta za P6 actualse
select
proj_short_name, task_code, act_start_date, act_end_date
from actvtype join actvcode
on actvtype.actv_code_type_id = actvcode.actv_code_type_id
join taskactv
on taskactv.actv_code_id = actvcode.actv_code_id
join task
on task.task_id = taskactv.task_id
join project
on task.proj_id = project.proj_id
left outer join (
select
fk_id, proj_id, udf_text, udfvalue.delete_date delete_date
from udfvalue join udftype
on udfvalue.udf_type_id = udftype.udf_type_id
where udf_type_label = 'Ref DN'
) udf
on udf.fk_id = task.task_id
and udf.proj_id = task.proj_id
and udf.delete_date is null
where actv_code_type = 'Vrsta aktivnosti'
and (actv_code_name = 'Delovni nalog' or actv_code_name = 'Operacija DN')
and proj_short_name = 'RE13'
and act_start_date is not null
and udf_text is null
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment