Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Question about joins.

Hi Guys,

Can anyone out there help me solve this issue I have?

Please see below

A:

LOAD * INLINE [

Name, ID

abc123Abandoned Cart_xiyudhu289192, 58973

asdasd234Abandoned Cart_xihu282392, 58975

xsasdass293tBrowers_dhu23432, 56456

];

B:

LOAD * INLINE [

CampaignName, Cost, Date

Abandoned Cart, 3108, 41468

Browers, 827, 41468

];

Result Needed

1 Table That looks like

Name

ID

Cost

Date

abc123Abandoned Cart_xiyudhu289192

58973

3108

41468

asdasd234Abandoned Cart_xihu282392

58973

3108

41468

xsasdass293tBrowers_dhu23432

56456

827

41468

I can't seem to join the two tables where i need to do some sort of dyname string match. 

Please help!

Thanks.

1 Solution

Accepted Solutions
msheraton
Contributor III

Re: Question about joins.

See the attached file.

6 Replies
msheraton
Contributor III

Re: Question about joins.

See the attached file.

MVP
MVP

Re: Question about joins.

Almost the same approach as Mark, using substringcount and creating a final table:

A:

LOAD * INLINE [

Name, ID

abc123Abandoned Cart_xiyudhu289192, 58973

asdasd234Abandoned Cart_xihu282392, 58975

xsasdass293tBrowers_dhu23432, 56456

];

B:

JOIN (A) LOAD * INLINE [

CampaignName, Cost, Date

Abandoned Cart, 3108, 41468

Browers, 827, 41468

];

RESULT:

LOAD Name,ID,Cost,Date

RESIDENT A

where substringcount(Name,CampaignName);

drop table A;

Not applicable

Re: Question about joins.

I understand that if the 2 tables I create and wish to join works, but if the 2 tables are huge, this may cause a problem.  Is there another way you guys can suggest or is this the best possible way?  Thanks.

msheraton
Contributor III

Re: Question about joins.

Well it's good practice to use numbers for the key fields.  So I've done this in my revised version (attached).

I would just give it ago and see what happes...

Not applicable

Re: Question about joins.

Appreciate this could you take a look at my follow up question thanks a lot.

Not applicable

Re: Question about joins.

This is great thanks Mark!