Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Pulkit_Thukral
Partner - Creator II
Partner - Creator II

Intersection among 2 different excels

Hi ,

Requirement is that i have list of tickets (overall) and then i have a list of excluded tickets (Both in xls files) that is to be deleted from overall tickets by creating a custom flag in load script.

Example - i have 20 tickets in total .

               Among 20, 5 are to be excluded from calculation .

               In load script i want to create a flag (Ex. Exception_Ticket=1) that tells which are those 5 tickets among 20.

How can this be achieved?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

ExcludedTickets:

LOAD

     TicketID as ExcludeID

FROM

     Exceptions.xlsx (ooxml, ...etc)

     ;

Tickets:

LOAD

     TicketID,

     ...other fields...

FROM

     AllTickets.xlsx (ooxml, ...etc)

WHERE

     NOT Exist(ExcludeID, TicketID)

;

DROP TABLE ExcludedTickets;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

ExcludedTickets:

LOAD

     TicketID as ExcludeID

FROM

     Exceptions.xlsx (ooxml, ...etc)

     ;

Tickets:

LOAD

     TicketID,

     ...other fields...

FROM

     AllTickets.xlsx (ooxml, ...etc)

WHERE

     NOT Exist(ExcludeID, TicketID)

;

DROP TABLE ExcludedTickets;


talk is cheap, supply exceeds demand
Kushal_Chawda

TotalTicket:

LOAD *

FROM Totalticket.xlsx;

// Join the table on Ticket no or relevant ID between Two Table

left join(TotalTicket)

LOAD *,

         1 as Exception_Ticket1

FROM Excludeticket.xlsx;

Final:

noconcatenate

LOAD *,

         if(isnull(Exception_Ticket1),0,Exception_Ticket1) as Exception_Ticket

Resident TotalTicket;

drop table TotalTicket;

Now you can select the value from Exception_Ticket . 1 means excluded