Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

harleen_singh
Contributor III

Snytax Error missing /misplaced

I am fetching the data from Excel sheet and i get following Error. I don't know is there is any problem with column names?



Syntax error, missing/misplaced FROM:

LOAD [# of Recordable Medical Treatment (no lost workday)   [A1]]] as [KPI 1],

     [# of Restricted Work Activity Cases (no lost workday)  [B1]]] as [KPI 2]

thanks

Lavi

1 Solution

Accepted Solutions

Re: Snytax Error missing /misplaced

Hi

Try like this

LOAD "# of Recordable Medical Treatment (no lost workday)   [A1]" as [KPI 1],

     "# of Restricted Work Activity Cases (no lost workday)  [B1]" as [KPI 2]

7 Replies
MVP
MVP

Re: Snytax Error missing /misplaced

Lavi

As the error message says, you have not included a FROM statement:

LOAD [# of Recordable Medical Treatment (no lost workday)   [A1]]] as [KPI 1],

     [# of Restricted Work Activity Cases (no lost workday)  [B1]]] as [KPI 2]

FROM myExcelWOrksheet.xlsx (ooxml, ....)


I assume that [# of Recordable Medical Treatment (no lost workday)   [A1]]] is a column in your spreadsheet.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

Re: Snytax Error missing /misplaced

Hi

Try like this

LOAD "# of Recordable Medical Treatment (no lost workday)   [A1]" as [KPI 1],

     "# of Restricted Work Activity Cases (no lost workday)  [B1]" as [KPI 2]

Not applicable

Re: Snytax Error missing /misplaced

Hi Lavi,

Two points:

1. In your field names, one  ']' is extra after A1 and B1, it should be:

     LOAD

     [# of Recordable Medical Treatment (no lost workday)   [A1]] as [KPI 1],

     [# of Restricted Work Activity Cases (no lost workday)  [B1]] as [KPI 2]

2. "From" is missing in your statement, after

LOAD

----

----

From (Name of the excel file from where you are pulling the data)

Hope this helps!

harleen_singh
Contributor III

Re: Snytax Error missing /misplaced

Thanks Mayil it worked

Re: Snytax Error missing /misplaced

Hi

Can you close the thread?

harleen_singh
Contributor III

Re: Snytax Error missing /misplaced

Mayil,

            i don't see any option of closing thread here. This new forum is really tough to understand can u help me?

Not applicable

Re: Snytax Error missing /misplaced

Below every answer, you will get an option to mark that answer as correct or helpful. Once you do that the thread will be marked Answered.


Community Browser