Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shivamkedia
Partner - Contributor II
Partner - Contributor II

delimiters

i have a data like this:

COLUMNNAME1

s|H|I|V|A|M

 

i want like this

columnname1

s

h

i

v

a

m

(i want s,h,i,v,a,m in diferent rows.)

1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi,

This solves your problem:

source:
CROSSTABLE ([source.Attribute field],[source.Data field],1)
LOAD
	[C1],
	[one],
	[two],
	[three]
;
Load
 Subfield(C1,'|',1) as one,
 Subfield(C1,'|',2) as two,
 Subfield(C1,'|',3) as three,
 C1
;
load * inline [
C1
shivam|anurag|ayush
Tanuj|mohit|aryan
]
;

FinalTable:
Load
	[source.Data field] as C1
Resident source;

Drop table source;

Paste this in your script and run a test.

Jordy

Climber

Work smarter, not harder

View solution in original post

3 Replies
JordyWegman
Partner - Master
Partner - Master

Hi,

What is the source of this, CSV?

If it is CSV, then you can load it with delimiter the piping symbol. Then do a  generic load (see link

Jordy

Climber

Work smarter, not harder
shivamkedia
Partner - Contributor II
Partner - Contributor II
Author

source:
load * inline [
c1
shivam|anurag|ayush
Tanuj|mohit|aryan
]

want solution like this:
shivam
anurag
ayush
tanuj
mohit
JordyWegman
Partner - Master
Partner - Master

Hi,

This solves your problem:

source:
CROSSTABLE ([source.Attribute field],[source.Data field],1)
LOAD
	[C1],
	[one],
	[two],
	[three]
;
Load
 Subfield(C1,'|',1) as one,
 Subfield(C1,'|',2) as two,
 Subfield(C1,'|',3) as three,
 C1
;
load * inline [
C1
shivam|anurag|ayush
Tanuj|mohit|aryan
]
;

FinalTable:
Load
	[source.Data field] as C1
Resident source;

Drop table source;

Paste this in your script and run a test.

Jordy

Climber

Work smarter, not harder