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

Loading Specific records from a table

Good afternoon

I have 2 tables that I want to load, one is a table of medical claims and one is a list of registered pharmacies, the common field is Pharmacy registration numbern which is assigned to each claims line in the claims file and is part of the record for each registered pharmacy. . I want to load all claims from the claims file for Pharmacies that are not registered, so do not have a record in the list of registered pharmacies. The fields in the claims file are - Registration number, date, amount charged, amount paid, member and the fields in the registered pharmacies list are - Registration number, Pharmacy name, State where Pharmacy resides. I won't to just load the records in the first table where the regustration number os not found int he second table.

Regards

Neil

2 Replies
MK_QSL
MVP
MVP

Claims:

Load *, [Pharmacy Registration Number] as TempPRN From ClaimsTable;

Pharmacies:

Load * From PharmaciesTable Where Not Exists(TempPRN ,[Pharmacy Registration Number]);

Drop Field TempPRN;

avinashelite

Hi,

Load the first table then use Exist function in the second table and load only needed data.

Table1:

LOAD * INLINE [

    Num

    1

    2

    3

];

Right Join

Table2:

LOAD * INLINE [

    Num

    1

    2

    3

    4

    5

    6

    7

] Where not Exists(Num);