Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Splitting data from one table into three distinct tables fails to use all three assigned labels - Is this a label bug?

Sometimes the simplest thing to do seems to be the one you fall over.  My goal is to merely split data into three distinct tables inside of QlikView from one single source.  So, of course all data is the same structure and have exactly the same column names.  The source table of each line of code is the exact same table thorough an Oracle OLEDB connection.  QlikView says, "well, let me help you out here and I will put it all into one table for you.  Forget those other two labels you assigned here, you wont be needing them".  In the table viewer it put all data into a table it I named "NEWLABEL_A".  Tables NEWTABLE_B and NEWTABLE_C have absolutely no representation in the table viewer At all.  Just a single table named NEWLABEL_A exists containing the data from the remaining two queries as well.

I would expect three tables represented in the table viewer if I give them a different label.

NEWLABEL_A:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'A';

NEWTABLE_B:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'B';

NEWTABLE_C:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'C';

I suppose I would need to alias every column name of each of the three sets as well so they are not joined by QlikView?

Is this a label bug?  I wonder why naming these other two labels is not enough.  Know any tricks?

Thanks,

Les

Tags (3)
4 Replies
vishsaggi
Esteemed Contributor III

Re: Splitting data from one table into three distinct tables fails to use all three assigned labels - Is this a label bug?

Try this? As auto concatenation is happening here it is putting in single table. Using Qualify to identify the Fields of different tables loaded and will help to remove synthetic keys.

QUALIFY *;

NEWLABEL_A:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'A';

QUALIFY *;

NoConcatenate
NEWTABLE_B:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'B';


QUALIFY *;

NoConcatenate

NEWTABLE_C:   SELECT * from SAME_ORACLE_TABLE WHERE COL1 = 'C';

Re: Splitting data from one table into three distinct tables fails to use all three assigned labels - Is this a label bug?

Hi,

your tables are AutoConcatenated due to their common structure.


As already suggested, NoConcatenate will prevent the autoconcatenation.


Can you explain why you need those tables be separated?

Maybe there is another option.


thanks


regards


Marco

Not applicable

Re: Splitting data from one table into three distinct tables fails to use all three assigned labels - Is this a label bug?

Thanks Marco!

Before leaving work I aliased all column names as this is only a proof of concept to create a data entry form to do maintenance on  an Oracle table.  That worked perfectly but I most certainly want to try out what you said.  I'm sure it would have been less brutal.  All values are being set to temp variables and used in an insert statement to populate the table.  This project has me populating data different data from a template table for QA and PROD simultaneously.  So far I expect will work and the inserts also work directly from an OLEDB connection.

Thanks once again for your reply.

rahulpawarb
Valued Contributor III

Re: Splitting data from one table into three distinct tables fails to use all three assigned labels - Is this a label bug?

Hello Vishwarath,

I agree with your solution that QUALIFY *; coupled with NoConcatenate will solve this problem. However, QUALIFY *; at the beginning is sufficient enough (No need to write it for every single load as well as NoConcatenate keyword).

Using only NoConcatenate will create three separate tables along with synthetic key (as the field names of three tables are same).

Hope this makes sense.

Thank you!

Rahul

Community Browser