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

Resident Anomoly

I have an interresting thing happening when I load a table (FACT_Temp) and left join another a table (STATUS). What I want to do is Resident Load a table (FACT) from FACT_Temp. The problem is it works perfectly when only the original fields from FACT_Temp are used. When I try to Resident Load it with the field added by the Left Join (from STATUS) the table (FACT) does not load. Anyone got an idea why that would be? I have attached a sample of what I mean.

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

Let try this script:

"Fact_Temp":

LOAD * INLINE [

    CODE, DESCRIPTION

    1, First

    2, Second

    3, Third

    4, Fourth

];

Left Join (Fact_Temp)

LOAD * INLINE [

    CODE, STATUS

    1, Active

    2, Inactive

    3, Active

    4, Active

];

"Fact":

LOAD

    CODE AS [Code2], DESCRIPTION, STATUS

    //When STATUS is left out, the table FACT is shown

Resident

    Fact_Temp;

Drop Table Fact_Temp;

Just rename one field in resident load (Ex. CODE AS [Code2])

Regards,

Sokkorn

View solution in original post

6 Replies
Sokkorn
Master
Master

Hi,

Let try this script:

"Fact_Temp":

LOAD * INLINE [

    CODE, DESCRIPTION

    1, First

    2, Second

    3, Third

    4, Fourth

];

Left Join (Fact_Temp)

LOAD * INLINE [

    CODE, STATUS

    1, Active

    2, Inactive

    3, Active

    4, Active

];

"Fact":

LOAD

    CODE AS [Code2], DESCRIPTION, STATUS

    //When STATUS is left out, the table FACT is shown

Resident

    Fact_Temp;

Drop Table Fact_Temp;

Just rename one field in resident load (Ex. CODE AS [Code2])

Regards,

Sokkorn

Not applicable
Author

Hi Sokkorn,
That worked, thank you very much. Is there a logical reason why you have to rename a field before you can do that or is that a work-around you figured out?

Sokkorn
Master
Master

Hi,

I face the same issue since last year. Can find solution, but still don't know the root cause.

Regards,

Sokkorn

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think its because of two tables gets concatenated because QV automatically concatenates two tables which has same number of fields with same field names.NoConcatenate will help you.

Check with this

     "Fact_Temp":
LOAD * INLINE [
    CODE, DESCRIPTION
    1, First
    2, Second
    3, Third
    4, Fourth
];


Left Join (Fact_Temp)
LOAD * INLINE [
    CODE, STATUS
    1, Active
    2, Inactive
    3, Active
    4, Active
];

NoConcatenate
"Fact":
LOAD
    CODE, DESCRIPTION, STATUS
    //When STATUS is left out, the table FACT is shown
Resident
    Fact_Temp;

Drop Table Fact_Temp;

Celambarasan

Not applicable
Author

I thought so too initially - that is why I put in the drop satement (for the temp table) but with the same result. I am going to log it with QlikTech support and see whether it is a bug. Will let you know!

hic
Former Employee
Former Employee

Celambarasan is right. It is not a bug - it is a feature. QlikView concatenates the tables unless you have different sets of fields. The drop statement does not affect anything since it happens after the final load statement.

Use NoConcatenate or add a dummy field in the temp table, e.g.: 'dummy' as DummyField.

/HIC