Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bernhard2760
Partner - Contributor III
Partner - Contributor III

Problem concatenating

Dear Qlik community,

I am new to Qlik and have a problem with a caption. Basically I want to to delete a zero in the column costobject of one specific data record. Therefore I made a scrpit which obviously does not work. I am pretty sure you know why in an instance. I thought Qlik would auto concatenate but after droping the source file and renaming the concatenated one the desired table is not there. Please let me know what I did wrong.

Thanks and kind regards

Bernhard

Temp1:

LOAD

*,

S_KoTraeger

where %S_KoTraeger_KEY <> '100-11';

Temp2:

LOAD

%S_KoTraeger_Key,

%S_KoTraeger_DELETED,

Replace(CostObject, '0','') as CostObject,

CostObjectArt,

CostObjectSelection,

CostObjectSuchbegriff,

CostObjectEndTermin,

CostObjectStartTermin,

CostObjectVerantwortlicher,

CostObjectDescription,

CostObjectDesc,

S_KoTraeger

where %S_KoTraeger_KEY = '100-11'

;

Drop Table S_KoTraeger;

Rename Table Temp1 to S_KoTraeger;

6 Replies
sunny_talwar

What is the source of these two tables? Same qvd? and why do you have LOAD * + a field name for your Temp1? What is the reason to do this

Temp1:

LOAD

*,

S_KoTraeger

where %S_KoTraeger_KEY <> '100-11';

oscar_ortiz
Partner - Specialist
Partner - Specialist

What is your end goal here? 

Are you trying to remove the lead in zeros from the CostObject field? 

Are you trying to not load records that have a zero value in the CostObject field?

bernhard2760
Partner - Contributor III
Partner - Contributor III
Author

I am trying to erase the zero from the data record with the Key 100-11 only. Therefore I select this particular record and replace the zero with nothing and then I would like to concatenate the same table excluding this particular record to get all of my records and the particular one modified.

Is it more clear now?

oscar_ortiz
Partner - Specialist
Partner - Specialist

So I believe you are trying to accomplish the removal of lead in zeros for this particular record.

265885.PNG

I've loaded you table for all rows except the one in question:

LOAD

  *

FROM

S_KoTraeger.qvd

(qvd)

Where

  %S_KoTraeger_KEY <> '100-11'

;

Then I concatenate the row in question and transform the field in question:

Concatenate

LOAD

  %S_KoTraeger_KEY,

  %S_KoTraeger_DELETED,

  Text(Num(CostObject)) as CostObject,

  CostObjektArt,

  CostObjectSelektion,

  CostObjectSuchbegriff,

  CostObjectEndTermin,

  CostObjectStartTermin,

  CostObjectVerantwortlicher,

  CostObjectDescription

FROM

S_KoTraeger.qvd

(qvd)

Where

  %S_KoTraeger_KEY = '100-11'

;

Good luck

Oscar

bernhard2760
Partner - Contributor III
Partner - Contributor III
Author

works thanks!

oscar_ortiz
Partner - Specialist
Partner - Specialist

Bernhard,

If you've found the advice helpful or correct please close the post.

Qlik Community Tip: Marking Replies as Correct or Helpful

Thanks

Oscar