Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I am a little confuse with this code, I know basic thing like IF(condition, true, else) and wildmatch to look some letters, please can someone give an explanation, I really apreciated.
if(PrimeraNoMonitoreo>SegundaNoMonitoreo,SegundaNoMonitoreo-[Submit Date]
,if([Submit Date]>PrimeraNoMonitoreo or [Submit Date]>SegundaNoMonitoreo,0
,if(isnull(PrimeraNoMonitoreo),SegundaNoMonitoreo-[Submit Date],PrimeraNoMonitoreo-[Submit Date]))) as T_TTN,
//Cambio
if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX' or [Assigned Group]='NOC Monitoreo')
and [Service Type]='Infrastructure Event','No Aplica'
,if(wildmatch(Submitter,'NAE*')>0 and isnull([PrimeraIntervencionHumana])=0,[PrimeraIntervencionHumana]-[Submit Date]
,if([Service Type]='Infrastructure Restoration' and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraIntervencionHumana-[Submit Date]
// ,if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX')
// and [Service Type]='Infrastructure Restoration' and wildmatch(Submitter,'NAE*')>0, //[PrimeraIntervencionHumana]-[Submit Date]
,if(isnull(PrimeraNoMonitoreo) and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraIntervencionHumana-[Submit Date]
,if(isnull(PrimeraNoMonitoreo)=0 and (Submitter='AOR_USER' or Submitter='UserAppPdg'),PrimeraNoMonitoreo-[Submit Date]
,'No Aplica'))))) as TTTN_new,
if(([Assigned Group]='NOC Monitoreo CORE' or [Assigned Group]='NOC Monitoreo TX')
and [Service Type]='Infrastructure Event' and IsNull(PrimeraIntervencionHumana)=0,'Sin hora de Notificacion'
,if(isnull(PrimeraNoMonitoreo)=0 and (Submitter='AOR_USER' or Submitter='UserAppPdg')
,PrimeraNoMonitoreo&'-'&[Submit Date]
,PrimeraIntervencionHumana&'-'&[Submit Date])) as TTTN_new_texto,
if(PrimeraNoMonitoreo>SegundaNoMonitoreo,'SegundaNoMonitoreo-[Submit Date]'
,if(isnull(PrimeraNoMonitoreo),'SegundaNoMonitoreo-[Submit Date]','PrimeraNoMonitoreo-[Submit Date]')) as T_TTN_formula,
It's a nested if
The else is another if, evaluates in order