Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
hic
Former Employee
Former Employee

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

View solution in original post

2 Replies
hic
Former Employee
Former Employee

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
Author

Thank you for the help! It works!