Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

Create new table

Hi Guys

I have a task , while evaluating students Grades  .

I get a table with those columns    ID, Seminar, grade

like this

ID, Seminar, grade

100,210,85

101,210,95

100,205,75

101,205,92

very long data lines .

I need to create the seminar  as a columns name  and the garde as data

should look like this

ID,205,210

100,75,85

101,92,95

enclosed is a file  of data  .

any idea how to do it ,  the seminars varies every year  .

thanks

gidon

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can re-join your tab.* tables into a single table named "Final" like this:

// Collect the ID field in a new table

Final:

LOAD Distinct ID

FROM (biff, embedded labels, table is DATA$);


FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));

  IF WildMatch('$(vTable)', 'tab.*') THEN

    LEFT JOIN (Final) LOAD * RESIDENT [$(vTable)];

    DROP TABLE  [$(vTable)];

  ENDIF

NEXT i

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

5 Replies
marcus_sommer

Within the script you could transform your table per The Generic Load into your descriped data-structure. But it might not always necessary to do this - maybe a pivot-chart within the gui will be sufficient for it.

- Marcus

Anonymous
Not applicable

Hi David,

I guess use Genaric prefix of Load.

genaric is used for kind of genaric databases.

Regards

Pavan

gidon500
Creator II
Creator II
Author

Hi thanks

I did this

tab:

Generic LOAD ID,  Seminar,     Grade

FROM (biff, embedded labels, table is DATA$);

I got many tables

  

$Table
tab.311116
tab.311117
tab.311126
tab.311131
tab.311301
tab.311119
tab.311125
tab.311128
tab.311132
tab.311302

I need to concatenate them with the ID  , How can I do it  ?

when I do not know the exact no. of tables the function will create and the names ?

any Idea

thanks

gidon

Anonymous
Not applicable

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can re-join your tab.* tables into a single table named "Final" like this:

// Collect the ID field in a new table

Final:

LOAD Distinct ID

FROM (biff, embedded labels, table is DATA$);


FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));

  IF WildMatch('$(vTable)', 'tab.*') THEN

    LEFT JOIN (Final) LOAD * RESIDENT [$(vTable)];

    DROP TABLE  [$(vTable)];

  ENDIF

NEXT i

-Rob

http://masterssummit.com

http://qlikviewcookbook.com