Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have two Tables:
1:QPGT
//[QPGT]: // Code group texts
[MANDT] as [Client_MANDT],
[KATALOGART] as CatalogType,
[CODEGRUPPE] as [Code group_FEGRP],
[CODE] as CODE,
[SPRACHE] as [Language_SPRACHE],
[KURZTEXT] as [Short text_KURZTEXT],
[GELOESCHT] as [Deleted record_GELOESCHT],
[INAKTIV] as [Record inactive_INAKTIV],
[LTEXTV] as [Long Text_LTEXTV];
2:VIQMFE
// Generated Table for View VIQMFE
Load
[MANDT] as [Client_MANDT],
[QMNUM] as [Notification_QMNUM],
[FEGRP] as [Code group_FEGRP],
[FECOD] as CODE,
[FEKAT] as CatalogType,
FETXT AS Text_FETXT,
[OTKAT] as [Catalog type_OTKATq],
[OTGRP] as [Code group_OTGRPq],
[OTEIL] as [ObjectPartCode_OTEILq];
Which Join must I use and Why ? If I need a comprehensive set of this data in one table.
Hi,
you need to explain what data you need from both the tables & also decide which key field/fields make ur data unique.
1) i see multiple fields with same names in the two tables. do you really want to join on all these fields ?
2) if you want all the records from 1st table & only the matching ones from 2nd table--use left join
if you want all the records from 2nd table & only the matching ones from 1st table--use right join
if you want exactly the matching records from the two tables --use inner join
it depends
Hi,
What is the Transaction table in this? Use Left Join to the Transaction table, if you need only the matching records then use inner join.
Regards,
Jagan.
In essence the table you declare first will be the primary based on a join. So by using the following:
1. Inner Join - matches all IDs in both tables
2. Left Join - retrieves all data from the primary table (left side) even if the secondary table (right side) doesn't have the matching IDs
3. Right Join - retrieves all data from the secondary table (right side) even if the primary table (left side) doesn't have the matching IDs
Hi,
Thanks for ur reply.
You mean to say:
If I want only matching records(IDs are same in both tables) and their relevant data,I must use Inner Join?
Regards,
Rochelle
No problem.
Yes, that's correct. Joins are very similar to SQL Server, DB2, etc. However, QlikView creates a single table based on joins whereas SQL Server for example does a table mapping and creates relationships.
Ok ..
Thanks Guys..