Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

script logic

I have two tables Table 1 and Table 2:

Table 1
    AY
2010
2011
2012
2013

Table 2
       CY
2010
2011
2012
2013

I want out put table using these 2 tables :

  

OUT PUT Table
                    AY             CY
20102010
20102011
20102012
20102013
20112011
20112012
20112013
20122012
20122013
20132013
4 Replies
Not applicable
Author

Maybe:

[Table 1]:

LOAD * Inline [

AY

2010

2011

2012

2013

];

[Table 2]:

LOAD * Inline [

CY

2010

2011

2012

2013

];

Table_output:

LOAD * ,RowNo() as Linha Resident [Table 1]; DROP Table [Table 1];

Join(Table_output)

LOAD * , RowNo() as Linha Resident [Table 2]; DROP Table [Table 2];

sunny_talwar

May be like this:

Table:

LOAD * INLINE [

      AY

    2010

    2011

    2012

    2013

];

Left Join (Table)

LOAD * INLINE [

  CY

    2010

    2011

    2012

    2013

];

FinalTable:

NoConcatenate

LOAD AY,

  CY

Where Flag = 1;

LOAD AY,

  CY,

  If(CY >= AY, 1, 0) as Flag

Resident Table;

DROP Table Table;

Not applicable
Author

if you got a correct answer to check that the community be organized thanks!

Not applicable
Author

Only do have to use Outer join

[Table 1]:

LOAD * Inline [

AY

2010

2011

2012

2013

];

Outer Join

[Table 2]:

LOAD * Inline [

CY

2010

2011

2012

2013

];


And will you obtain this table: