dbTalk Databases Forums  

LIMIT does not work here

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss LIMIT does not work here in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Baur
 
Posts: n/a

Default LIMIT does not work here - 07-15-2010 , 09:45 AM






Hi

Using SQ 120.0 2483 trying LIMIT on select. Table was SA11 un-/reloaded into new SA 12 DB.

Trying to tun those two in ISQL

---
SELECT top 20 start at 10 *
FROM "DBA"."ticket"
order by ticket_id desc;

SELECT *
FROM "DBA"."ticket"
order by ticket_id desc
limit 10, 20;
---

in ALL variants of the second statements ISQL generates SQLCODE -131 on the line with limit regardless where the limit keyowrd is.

Either the help or the code is faulty.

Martin

Reply With Quote
  #2  
Old   
Glenn Paulley [Sybase iAnywhere]
 
Posts: n/a

Default Re: LIMIT does not work here - 07-15-2010 , 09:51 AM






The 12.0.0 help (in the SELECT statement syntax) reads

"The LIMIT keyword is disabled by default. Use the reserved_keywords
option to enable the LIMIT keyword. See reserved_keywords option. "

Did you enable the LIMIT keyword?

Glenn

Martin Baur wrote:
Quote:
Hi

Using SQ 120.0 2483 trying LIMIT on select. Table was SA11 un-/reloaded into new SA 12 DB.

Trying to tun those two in ISQL

---
SELECT top 20 start at 10 *
FROM "DBA"."ticket"
order by ticket_id desc;

SELECT *
FROM "DBA"."ticket"
order by ticket_id desc
limit 10, 20;
---

in ALL variants of the second statements ISQL generates SQLCODE -131 on the line with limit regardless where the limit keyowrd is.

Either the help or the code is faulty.

Martin
--
Glenn Paulley
Director, Engineering (Query Processing)
Sybase iAnywhere

Blog: http://iablog.sybase.com/paulley

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://case-express.sybase.com

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the
Sybase iAnywhere pages at
http://www.sybase.com/products/datab...chnicalsupport

Reply With Quote
  #3  
Old   
Martin Baur
 
Posts: n/a

Default Re: LIMIT does not work here - 07-15-2010 , 10:25 AM



In article <4c3f2075$1@forums-1-dub>, you say...
Quote:
The 12.0.0 help (in the SELECT statement syntax) reads

"The LIMIT keyword is disabled by default. Use the reserved_keywords
option to enable the LIMIT keyword. See reserved_keywords option. "

Did you enable the LIMIT keyword?

Yes. But I forgot that I have to close ISQL first before I see the effect even if made permanent. After closing and reopening, it worked.

I was just exploring the new stuff of SA 12 in an ISQL window.

Thank you.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.