Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Load command in script syntax

I am pulling all fields from a table in Access, and I tried to add a Load command to the script to create an additional field.

The table has Code1, Code2, etc. thru Code6, and if any of these begins with an "M" I want a boolean field to be True.

QlikScript.bmp

When I run this script I get the fields from the table, but not the additional field Flagged.  Can anyone tell me what I need to add? I could do it in the Access table first, but I'd like to learn how to do it here, since this field would be used for a chart.

Tags (2)
1 Solution

Accepted Solutions

Re: Load command in script syntax

Hi

Use 'True' as string like this.

For ex:

Load *,if(left(Code2,1)='M','True');

Select * from tablename;

Hope it helps

8 Replies
Not applicable

Re: Load command in script syntax

Hi,

Put the load statement on top of the select statement.

change it so it will look as follows:

Load *,  //that way you load all data from the SQL statement

       if(.........) AS flagged;

Select *

from 'table'   ;

Goodluck

Not applicable

Re: Load command in script syntax

It still doesn’t like it.  It’s a syntax problem - it’s looking for True as a field, not as a value.  Field not found - <True>

Not applicable

Re: Load command in script syntax

It still doesn’t like it.  It’s a syntax problem - it’s looking for True as a field, not as a value.  Field not found - True

Not applicable

Re: Load command in script syntax

It still doesn’t like it.  It’s a syntax problem - it’s looking for True as a field, not as a value.  Field not found - True

Re: Load command in script syntax

Hi

Use 'True' as string like this.

For ex:

Load *,if(left(Code2,1)='M','True');

Select * from tablename;

Hope it helps

Not applicable

Re: Load command in script syntax

You can use it with 'True' so it will be a string or either put 1 instead,

If (condition,1, else..)

Hilla Peled

ב-14 בדצמ 2012, בשעה 00:24, "Bill Ritzel" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>> כתב/ה:

QlikCommunity<http://community.qlik.com/index.jspa>

Re: Load command in script syntax

created by Bill Ritzel<http://community.qlik.com/people/billritz> in New to QlikView - View the full discussion<http://community.qlik.com/message/291492#291492>

Not applicable

Re: Load command in script syntax

Worked! Thanks.

Bill Ritzel

Reliability Data Analyst

Allegiant Travel Company

8360 S. Durango Drive, Las Vegas, NV 89113

Direct: 702-589-8062 | Ext: 3641 Bill.Ritzel@allegiantair.com<mailto:Bill.Ritzel@allegiantair.com> | www.allegiant.com<http://www.allegiant.com/>

Re: Load command in script syntax

HI

Please close the post by marked as assumed answer or correct answer, it helps others to know the answer for similar issue.