Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
juan_patrick
Creator
Creator

Join tables

Hi! I put the problem in the attached file, and in it its what I need:

There is a table that have events, thats events has owner but only I can see it when the event is "TRANSFERIR"

In the excel its clearly; thank you!!

5 Replies
Marcio_Campestrini
Specialist
Specialist

Hi Juan

Read this:

How to populate a sparsely populated field

Márcio

Márcio Rodrigo Campestrini
juan_patrick
Creator
Creator
Author

Márcio, the problem is tha i dont have the first and last value for each ticket!

anbu1984
Master III
Master III

Try this

Initial:

Load ticket,actividad,fechainicio,fechafin,

If( IsNull(grupodesde) Or grupodesde = '',If(Previous(grupohasta) = '',Peek(grupoactual),Previous(grupohasta)),

grupodesde) As grupoactual, RowNo() As RowNo;

Load * Inline [

ticket,actividad,fechainicio,fechafin,grupodesde,grupohasta

1,inicio,1/20/2010,1/20/2010,,

1,adjunta,1/20/2010,1/20/2010,,

1,transferir,1/21/2010,1/22/2010,g1,g2

1,actualiza,1/22/2010,1/22/2010,,

1,resuelto,1/22/2010,1/22/2010,,

1,transferir,1/22/2010,1/22/2010,g2,g3

1,reanudar,1/22/2010,1/22/2010,,

1,resuelto,1/22/2010,1/22/2010,, ];

NoConcatenate

Final:

Load ticket,actividad,fechainicio,fechafin,

If( IsNull(grupoactual) Or grupoactual = '',Peek(grupoactual),grupoactual) As grupoactual Resident Initial Order by RowNo desc;

Drop table Initial;

juan_patrick
Creator
Creator
Author

Its nearest!

Please see the attached file (example2), the NSD = HD398723, the data correct is the column OK

anbu1984
Master III
Master III

Try this

Initial:

Load ACTIVIDAD,

     NSD,

     TIEMPO_TOTAL,

     FechaInicio,

     FechaRes,

     If( NSD <> Previous(NSD),GRUPODESDE,

If( IsNull(GRUPODESDE) Or GRUPODESDE = '',If( IsNull(Previous(GRUPOHASTA)) Or Previous(GRUPOHASTA) = '',Peek(grupoactual),Previous(GRUPOHASTA)),

GRUPODESDE)) As grupoactual, RowNo() As RowNo;

LOAD ACTIVIDAD,

     NSD,

     TIEMPO_TOTAL,

     FechaInicio,

     FechaRes,

     GRUPODESDE,

     GRUPOHASTA,

     GRUPO_ACTUAL,

     FLAGT,

     OK

FROM

(biff, embedded labels);

NoConcatenate

Final:

Load ACTIVIDAD,

     NSD,

     TIEMPO_TOTAL,

     FechaInicio,

     FechaRes,

If( IsNull(grupoactual) Or grupoactual = '',Peek(grupoactual),grupoactual) As grupoactual,

RowNo Resident Initial Order by RowNo desc;

Drop table Initial;