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.
datanibbler
Esteemed Contributor

Duplicate a single field without RESIDENT LOADing the entire table


Hi,

my question is pretty much summed up in the title:

=> I have a table in which there is one field I need to both

     - rename

     - duplicate (with yet another name)

The background is that this field is a keyfield, but I need a duplicate of it that won't be linked so I can properly count it - which doesn't work with keyfields.

Is there any way I can do that without RESIDENT LOADing the entire table?

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions

Re: Duplicate a single field without RESIDENT LOADing the entire table

In the same table you can the fields twice rite?

Load

Key,

Key as Count_key,

Key as Test

.....

from

table

3 Replies

Re: Duplicate a single field without RESIDENT LOADing the entire table

Perhaps I don't understand your question, but I'm thinking:

LOAD

     Key,

     autonumber(Key) as CountKey,

     ...other fields...

FROM

Or perhaps even simpler:

LOAD

     Key,

     1 as Counter,

     ...other fields...

FROM


talk is cheap, supply exceeds demand

Re: Duplicate a single field without RESIDENT LOADing the entire table

In the same table you can the fields twice rite?

Load

Key,

Key as Count_key,

Key as Test

.....

from

table

jochem_zw
Contributor II

Re: Duplicate a single field without RESIDENT LOADing the entire table

‌you can define the field twice and give it a different name.

load

  sample as Key,

  sample as Key2

from ............;

Community Browser