Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Split table in two under a condition

Hi,

I have a table (attached) called 'Table_All' with two fieds, 'A' and 'B'.

I would need to get a new table from resident 'Table_All' which includes al the rows where where 'B' is different than all the values in 'A'.

That is the resulting table should have only values of 'B' differents than all the values in 'A'.

Obviously " RESIDENT Table_All WHERE 'B'<>'A' " did not work.

I would appreciate any idea.

Thanks

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

The script for this kind of loads usually follows this way:

TableAll:

LOAD A AS OriginalA,

     B AS OriginalB

FROM File.qvd (qvd);

OnlyBDifferentThanA:

NOCONCATENATE LOAD A,

     B

FROM File.qvd (qvd)

WHERE NOT EXISTS(OriginalA, B);

DROP TABLE TableAll;

Hope that helps.

Miguel

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hi,

The script for this kind of loads usually follows this way:

TableAll:

LOAD A AS OriginalA,

     B AS OriginalB

FROM File.qvd (qvd);

OnlyBDifferentThanA:

NOCONCATENATE LOAD A,

     B

FROM File.qvd (qvd)

WHERE NOT EXISTS(OriginalA, B);

DROP TABLE TableAll;

Hope that helps.

Miguel