Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

SyntaxError: FROM is missing

Hi everybody,

I am new to QlikView and I hope that you can help me. The code looks like:

Temp:

Load * Inline [

F1

01.01.2014 13:00

02.01.2014 14:00

...

];

let test = date#(peek('F1', 1, Temp)); // it peeks the first date and turns it in other format ('numbers') !!hopefully

testtable:

load 1 + $(test) as Test

Autogenerate(5);

The debugger tells that everything is ok untill load in testtable: here appears SYNTAX ERROR : FROM IS MISSED/ wrong: testtable....

What can I do to make it work?

Thanks in advance for your help

1 Solution

Accepted Solutions
Employee
Employee

Re: SyntaxError: FROM is missing

You have several problems here...

  1. You need to quote the table label inside the Peek(): Peek('F1', 1, 'Temp')
  2. If you want the date of the first record, you should use 0 instead: Peek('F1', 0, 'Temp')
  3. If you want the variable 'test' to be displayed as a numeric, you should wrap the expression in Num(...): Num(Date#(...))
  4. The dollar expansion $(test) might expand the variable using decimal comma, which will cause an error. The simplest solution is to quote the dollar expansion: 1 + '$(test)' as Test

HIC

2 Replies
Employee
Employee

Re: SyntaxError: FROM is missing

You have several problems here...

  1. You need to quote the table label inside the Peek(): Peek('F1', 1, 'Temp')
  2. If you want the date of the first record, you should use 0 instead: Peek('F1', 0, 'Temp')
  3. If you want the variable 'test' to be displayed as a numeric, you should wrap the expression in Num(...): Num(Date#(...))
  4. The dollar expansion $(test) might expand the variable using decimal comma, which will cause an error. The simplest solution is to quote the dollar expansion: 1 + '$(test)' as Test

HIC

Not applicable

Re: SyntaxError: FROM is missing

Thank you for the help! It works!

Community Browser