Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
rustyfishbones
Honored Contributor II

Peek Function on Field with spaces or Chars

Hi All,

I have a SQL SELECT Statement and I want to use peek to get the last record loaded

My field is called booking-no, so I need to use "", but the peek function does not like the double quotes.

How can I get around this for the first parameter in the peek function

2015-05-05_1232.png

1 Solution

Accepted Solutions
Not applicable

Re: Peek Function on Field with spaces or Chars

use only single quote.

let booking = peek('booking-no ',-1,'booking ');

6 Replies
Not applicable

Re: Peek Function on Field with spaces or Chars

use only single quote.

let booking = peek('booking-no ',-1,'booking ');

rustyfishbones
Honored Contributor II

Re: Peek Function on Field with spaces or Chars

Hi radha,

I tried that originally and I got no result so assumed that it was because of the - between booking-no

It seems to be working with just the single quotes but definetly was not earlier today

Thanks

Regards

Alan

Not applicable

Re: Peek Function on Field with spaces or Chars

you are done table ascending order before use peek function.

Re: Peek Function on Field with spaces or Chars

and I would not leave any spaces after booking-no just to make sure I am not leaving any loose ends:

LET booking - peek('booking-no', -1, 'Booking');

Not applicable

Re: Peek Function on Field with spaces or Chars

load * resident <table name> order by <field name> asc

here now aplly peek function.

rustyfishbones
Honored Contributor II

Re: Peek Function on Field with spaces or Chars

thanks radha,

I have created a tmptable for sorting and dropped the table

Regards

Alan