Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to join two tables by avoiding Duplicate

hi all,

i have two tables i want combine that two tables

with out any duplication in records

i have attached the two sample files

plz help

7 Replies
Not applicable
Author

Hi,

you can join these 2 tables on currency code

LOAD CurrencyCode as %C, *  from table 1

join

LOAD CurrencyCode as %C, *  from table 2

If you need to join on currency+date you must take only date format without minutes

best regards

chris

Not applicable
Author

i tried that one but it is creating duplicates

yes we can ignore Modified date from any one

but i want Currency name from table 2 to table 1

salto
Specialist II
Specialist II

Then you need to change the join order:

LOAD CurrencyCode as %C, *  from table 2

join

LOAD CurrencyCode as %C, *  from table 1

HTH.

Not applicable
Author

i didn't get u

would u please try this on my data set and provide me a QVW

Not applicable
Author

Except EURO and US i can't see no dupplicates.

If you want only 1 line for EURO and US you must add where not exists

best regards

Chris

salto
Specialist II
Specialist II

Hi,

I did a left join from S1 to S2. This means that it will hold  records from S1 that have a corresponding CurrencyCode on S2 are in the final table.

If you want all records, just delete the left and leave it as a natural join. Or if you only want the currencies in S2, replace the left for right.

Hope this helps.

kaushalview
Partner - Creator II
Partner - Creator II

Hi,

if u dont want the duplicate records in your application then use Left keep between two table for joining.

Regards

Kaushal Mehta