Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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