Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasgupta
Creator
Creator

Table join

Hi Everyone

we wants to join Loc Master to transaction table table name is Loc and Txnd we required two field from loc master LocCd (location code) and ( location Type) LocTyp and Loc master is already join in our data model so we are doing Left join of required field . Our SQL expression is the following:-

join loc on (LocCd=TdFrRmLoc or LocCd=TdtoRmLoc) 
We are using following QlikView script :-

Left Join
load
     LocCd As TdFrRmLoc,
     LocTyp as  TdFrLocTyp
FROM
[..\QVD\LocationMaster.Qvd]
(qvd);

Left  Join
load
   LocCd As TdToRmLoc,
   LocTyp as  TdToLocTyp

FROM
[..\QVD\LocationMaster.Qvd]
(qvd);

We run SQL script join loc on (LocCd=TdFrRmLoc or LocCd=TdtoRmLoc) in SQL server we are getting  2222624 records in Qlikview we are getting 2659256 records.

The original  no. of records in TXND table is 2659256 and in Loc master 63 records .

Thanks

Vikas Gupta

3 Replies
sujeetsingh
Master III
Master III

Try it with LOAD DISTINCT

vikasgupta
Creator
Creator
Author

Hi

I tried with load distinct but still i am getting  same number of record .I just wants to apply  this SQL script

join loc on (LocCd=TdFrRmLoc or LocCd=TdtoRmLoc)  in Qlikview script .

Thanks

Vikas Gupta

sujeetsingh
Master III
Master III

Vikas ,

we do not join like sql ...

yes if you want to join two tables on basis of TdtoRmloc...

Join (table1)

Load 

TdtoRmloc

----

----

resident Table2;

But yes note that Table one and Table2 should have only  TdtoRmloc as coomman field nothing else...

If there are some comman fields RENAME them.