Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare two tables & pick values

hi experts,

     i have a table with selective partno, description, date for a particular sales with specific dates.

     i have another table with all partnos(not selective), different dates for return of sales.

     Now, the return of sales table should compare with the previous sales table & display the partnos of return which are available in       

     sales table alone. how can i do this.

    pls help me out in this regard as soon as possible

10 Replies
giakoum
Partner - Master II
Partner - Master II

you should inner join the tables based on partno

Not applicable
Author

thanku ioannis giakoumakis.

i hav tried inner join. its not working.

too many records. so system hanging.

what actually i need is, the second table should compare the partnos with first table & second table should display the matching partnos alone.

any suggestions please

giakoum
Partner - Master II
Partner - Master II

what about using the exists function on the second table?

Not applicable
Author

no. exists function is also not working

sunny_talwar

Have you tried using Left Keep or Left Join?

If you have some dummy data, it would be easier to do it in a sample qvw file

Best,

S

giakoum
Partner - Master II
Partner - Master II

join and exists are typical QV functions. They are working if applied correctly. Maybe a sample application would help.

Anonymous
Not applicable
Author

I believe where exists or look up function should work in your case.

Not applicable
Author

my tables are

FSSALE:

LOAD Week,

    StartDate,

    EndDate,

    PNO,

    DESC

FROM

QVD\FSSALE.qvd

(qvd);

FSSALE_2:

LOAD SALEDATE,

    PNO

FROM

QVD\FSSALE_2.qvd

(qvd);

Credit:

LOAD branch as BRCODE,

    Date(datelastedited,'DD/MM/YYYY') as CredDate,

    pno,

    pgcode,

    SL_qty,

    CR_qty

FROM

QVD\Credit.qvd

(qvd);

FSSALE is my first table. i hav got some loopings for first table to form the table FSSALE_2.

my next table is credit. the pno field from credit table is having records for all sales. it should get matched with PNO in the FSSALE table. & second table(credit) pno should display only the matching values with PNO in

sunny_talwar

Try this:

FSSALE:

LOAD Week,

    StartDate,

    EndDate,

    PNO,

    DESC

FROM

QVD\FSSALE.qvd

(qvd);

FSSALE_2:

LOAD SALEDATE,

    PNO

FROM

QVD\FSSALE_2.qvd

(qvd);

Credit:

Left Keep (FSSALE)

LOAD branch as BRCODE,

    Date(datelastedited,'DD/MM/YYYY') as CredDate,

    pno as PNO,

    pgcode,

    SL_qty,

    CR_qty

FROM

QVD\Credit.qvd

(qvd);

Please note the parts which are bold.

Implement this and see if this works for you.

Best,

S