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

Drop Field if Match?

Hi,

I have two tables and the Key is C-ID. I haven't loaded in O-ID in table 1 yet but I want to make the connection between Table 1 and Table 2 with rows that have O-ID and drop the C-ID for those rows:

Table 1:

C-IDL-IDO-ID
1X
2Y222
3Z

Table 2:

C-IDO-ID2
1111
2222

How do I properly do that in the load script?

if([O-ID] = [O-ID2], DROP FIELD [C-ID])

Thanks!

Jason

2 Replies

Re: Drop Field if Match?

‌can you provide an extended example and the expected result?

regards

Marco

MVP
MVP

Re: Drop Field if Match?

expected result (from what I understand)

1.png

Table2:

load * inline [

C-ID, O-ID2

1, 111

2, 222

];

Table1:

load

  if(Exists([O-ID2], [O-ID]), null(), [C-ID]) as [C-ID],

  [L-ID],

  [O-ID]

inline [

C-ID, L-ID, O-ID

1, X,

2, Y, 222

3, Z, 

];