Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master 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

use only single quote.

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

View solution in original post

6 Replies
Not applicable

use only single quote.

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

rustyfishbones
Master II
Master II
Author

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

you are done table ascending order before use peek function.

sunny_talwar

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

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

here now aplly peek function.

rustyfishbones
Master II
Master II
Author

thanks radha,

I have created a tmptable for sorting and dropped the table

Regards

Alan