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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String insert

Hi,

   a)  I want to sufix  '_c'  to a field:

      1)  script side

       2)  Expression

  b)  I want to reomve the sufix '_c' to a filed

  1)script

  2) expression

ex:

Filed:   ID

          68

898

566

99

21

100000

987776

Thanks

6 Replies
petter
Partner - Champion III
Partner - Champion III

Simply:

RENAME FIELD ID TO ID_c_;

RENAME FIELD ID_c TO ID;

RENAME FIELD ID_c_ TO ID_c;

Not applicable
Author

i want the output to be

68_c

98776_c

not 'name field_c'

sunny_talwar

Then try this:

LOAD

ID & '_c' as ID

Qrishna
Master
Master

Suffix '_c' to a field name:  possible only in script

As petter mentioned:

RENAME FIELD ID TO ID_c_;

RENAME FIELD ID_c TO ID;

RENAME FIELD ID_c_ TO ID_c;

or simply use 'AS' key word eg    ID as ID_c_ :

if you want to suffix '_c' to the data of the field ID:

ID & '_c'  AS ID_new.



To remove:


PurgeChar (ID_new, '_c') AS ID_purged

Not applicable
Author

not working ...

I guess

integer  to string..  issue

MarcoWedel

to purge the trailing _c you could use:

If(ID like '*_c',Left(ID,Len(ID)-2),ID)

hope this helps

regards

Marco