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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

If statement in loadscript

I have the following situation. I have a field "City" in a Database. In my load script i want load the city in 1of 2 ways.

1. When city has a 'comma'  in the name Qlikview must read the field  till the 'comma'

2. When city has no 'comma' i wanna have the whole field.

How can i dot this with QV ? I hope someone can help

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

see the attched file

it is based on : instead of comma but you can change : with comma in your application.

and modify accoding to sample in ur application

please see the attached file

hope this help

Sunil Chauhan

View solution in original post

2 Replies
its_anandrjs
Champion III
Champion III

Hi,

Load your data some think like

Load

City,

Subfield(City, ' , ' , 1 )  as WithoutComaCity

From Data

It will exclude ' , ' from the City table

Rgds

Anand

SunilChauhan
Champion II
Champion II

see the attched file

it is based on : instead of comma but you can change : with comma in your application.

and modify accoding to sample in ur application

please see the attached file

hope this help

Sunil Chauhan