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: 
martyn_birzys
Creator
Creator

Join tables on id

odd image.PNG.png

I have a particular structure in the Agenda table, where I need to transform the date into another field.

I was expecting outer join to link on id, but I'm getting duplicate id rows and date field not linked to appropriate record.

Please see file attached.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

not sure to understand

1.png

SET LongMonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;October;Nov;Dec';

Agenda:

LOAD * INLINE [

    id, City

    1, Tuesday 21st October 2014

    2, Paris,

    3, New York,

    4, Wednesday 22nd October 2014,

    5, London,

    6, Tokyo

];

tmp:

load

  id, City,

  MeetingDate,

  Date(Date#(

  left(subfield(MeetingDate, ' ', 2), len(subfield(MeetingDate, ' ', 2))-2)

  & '-' & subfield(MeetingDate, ' ', 3)

  & '-' & subfield(MeetingDate, ' ', 4),

  'DD-MMMM-YYYY'))  as NewMeetingDate;

NoConcatenate

load *,

if(WildMatch(City, '*2014*'), City, peek(MeetingDate)) as MeetingDate

Resident Agenda

order by id;

DROP Table Agenda;

View solution in original post

2 Replies
maxgro
MVP
MVP

not sure to understand

1.png

SET LongMonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;October;Nov;Dec';

Agenda:

LOAD * INLINE [

    id, City

    1, Tuesday 21st October 2014

    2, Paris,

    3, New York,

    4, Wednesday 22nd October 2014,

    5, London,

    6, Tokyo

];

tmp:

load

  id, City,

  MeetingDate,

  Date(Date#(

  left(subfield(MeetingDate, ' ', 2), len(subfield(MeetingDate, ' ', 2))-2)

  & '-' & subfield(MeetingDate, ' ', 3)

  & '-' & subfield(MeetingDate, ' ', 4),

  'DD-MMMM-YYYY'))  as NewMeetingDate;

NoConcatenate

load *,

if(WildMatch(City, '*2014*'), City, peek(MeetingDate)) as MeetingDate

Resident Agenda

order by id;

DROP Table Agenda;

martyn_birzys
Creator
Creator
Author

Thanks very much, peek() does the job. I was trying previous(), which is very similar, but was getting error.