Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Circular References- Join

Hi

In order to resolve a circular reference issue I'm expecting to use the JOIN statement;

My problem is that I want to copy a field (FECHA_COBRO) from table1 to table2 BUT ONLY IF there's a correspondence in a field (CO_COBRO). Example:

Table 1: CO_COBRO, FECHA_COBRO

1, 01/01/2009;

2, 09/08/2009;

Table 2:

where CO_COBRO= 1, FECHA_COBRO= 01/01/2009

where CO_COBRO= 2, FECHA_COBRO= 09/08/2009

So, I've this first table:

TABLE1:
QUALIFY *;
UNQUALIFY CO_COBRO, FECHA_COBRO;
LOAD cob_num,
fec_cob,
fec_cob AS FECHA_COBRO,

.....

// CO_ENTERPRISE
autonumber(cob_num&'-'&CO_ENTERPRISE) AS CO_COBRO
FROM QvD\VCOBROS.QVD (qvd);

and then I've this other one:

TABLE2:
QUALIFY *;
UNQUALIFY CO_COBRO, fact_num;
LOAD //cob_num,
.......
//CO_ENTERPRISE
autonumber(cob_num&'-'&CO_ENTERPRISE) as CO_COBRO
FROM QvD\VRENG_COB.QVD (qvd);

I want then, add to table2, FECHA_COBRO field from table1 but just while CO_COBRO field has the same value.

I've read about joins and tried already, but I still dont know how to make a conditional with CO_COBRO field.

Thanks in advance!

1 Reply
Not applicable
Author

I'd tried already this on table2:

table2:
QUALIFY *;
UNQUALIFY CO_COBRO, fact_num;
LEFT join (table1)
LOAD //cob_num,
//CO_ENTERPRISE
autonumber(cob_num&'-'&CO_ENTERPRISE) as CO_COBRO,
FECHA_COBRO
FROM QvD\VRENG_COB.QVD (qvd);

but It gave me an error:

File not found- <FECHA_COBRO>

LEFT JOIN (table1) ..

...

I guess it's because of CO_COBRO field, but i'm not sure about that.

Have anyone idea how can I resolve this?

Thxs!