Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

loosen table script

Hi community!!

I´m studing some doubts I have and its apllications. Currently, I have a problem with qlikview reference manual´s loosen table statement example:

I mix exampple on page 160 with statement explined on page 326, but something is wrong and I do´t know what what it should be. Here you are my
senteces on the script.

LOAD YEAR,
DATE
FROM (biff, embedded labels, table is Hoja1$);

LOAD DATE,
PROD,
AMOUNT
FROM (biff, embedded labels, table is Hoja2$);

LOAD PROD,
PRODGRP
FROM (biff, embedded labels, table is Hoja3$);

Hoja2$:
SELECT *
FROM (biff, embedded labels, table is Hoja2$);
LOOSEN TABLE Hoja2$;


I hope someone could help me.

Thanks, Fiber9906

15 Replies
Not applicable
Author

Hi Roland and thanks for you answer, but something is wrong in my code because if I use LOAD instead of SELECT, the result is:

YEAR PRODGRP SUM(AMOUNT)
1999X108
Y108
Z108
Total324
2000X108
Y108
Z108
Total324
Total648


And this is a wrong result. Could you modified script on the attached document and send it? I think it will be the only way to understand what I am wrong.

Thanks for your help, Fiber9906

tresesco
MVP
MVP

but i am getting different output with your excel data ! please check the attached application. and yes, the data is doubled because the 2nd file is loaded twice and so they are concatenated (2nd one to the 1st one).

if this does not clear your doubt, please tell where exactly you are having doubts, what you expect the output to come. is it something, your doubts are with LOOSEN TABLE?

Regards, tresesco

Not applicable
Author

Hi (again) Tresesco,

I´ve understood write LOAD instead of SELECT statement and I´ve also understood the data is doubled. That´s ok.

It doesn´t matter (because is an example) if numeric data are diferent, my only problem is that I´m trying to repeat an exercise of Reference Manual (page 161) to know which are tables behaviour and how to do the script.

After I´ve done all things you said to me, I still have no idea why it doesn´t work. I think this is a very simple exercise... but not for me (jajajaja)

I appreciate any idea, Fiber9906

PS. I attach manual´s images and look the way to declare LOOSEN TABLE. You call first Tab1: select * from Trans; loosen table Tab1;

Which is table´s name? Tab1 or Trans?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Fiber9906,

I'm not sure what you are trying to accomplish, but let me tell you that "Loosely coupled tables" is a very shaky ground and is very rarely the best solution of most common problems. In most cases, they add to confusion and increase problems instead of solving them.

Unless you know well what you are doing, I'd recommend to stay away from loosely coupled tables.

cheers,

Not applicable
Author

Hi fiber,

attached find your application with two textboxes containing an image of tablestructure. The usual case is linking tables with same fieldnames (left image). This is a very common features of QV and I like it very much. If you don't want to link tables with same fieldnames, rename the fields or qualify the tables.

Sometimes you don't want to link two table, but keep the fieldnames. Then you can loosen these tables. But as Oleg mentioned above this is a very unusual situation in QV and I personally never had this before. So it is more a theoretical think to know but not to use.

Note: During testing I had some troubles with relinking the tables after recomment the loose-statement. Seems to be a bug: to relink successfully you have to change the loading order of the tables.

RR

Not applicable
Author

Thank you both (Oleg and Roland) for spending your time helping me. I am posting since august and you solve me a lot of problems, so I just want to study by myself the manual to increase my knowlegde about qlikview and try to get things more complicated.

When I read that part of manual, it seems to me very interesting but I couldn´t do it by myself. After your answers, is good to know that you never used it. I forget LOOSEN TABLE.

I am really appreciated, Fiber9906