Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match to a list of accounts in a separate list

Just wanted to know if there's an easy way ( Im guessing a map ) to do the folllowing :

So I have for instance

Date, Account_No , Salesperson

Now I have a separate list of 'Account_No' in an excel sheet. And it is only these account nos that should be picked up.

Manually I can do this by taking the list and concatenating with a comma at the end of each line and adding this to a where match clause in the script. Can this be done better ?

1 Solution

Accepted Solutions
avinashelite

Try like this

Excel_Data:

LOAD Account_No

from excel

Date_Base:

LOAD Date,

          Account_No ,

          Salesperson

from data_base

where exists(Account_No,Account_No);

View solution in original post

4 Replies
Digvijay_Singh

May be I think first you should load the valid account excel. Next, you load the Date, Account_No , Salesperson file and use Where clause as 'Where Exists(Account_No)'

avinashelite

Try like this

Excel_Data:

LOAD Account_No

from excel

Date_Base:

LOAD Date,

          Account_No ,

          Salesperson

from data_base

where exists(Account_No,Account_No);

Not applicable
Author

Thanks Avinash - this works excellent

avinashelite

Cool...Happy to hear that