Share

XMLToaster

Tracker: Bugs

5 Sql parser doesn't support some of the less obvious syntax - ID: 1870469
Last Update: Settings changed ( stevewdh )

1) "select top n" syntax not supported. I get a syntax error when using
"select top 100 x from y". This is valid mysql syntax but the xmltoaster
sql parser does not recognise it.

2) Expressions not recognised in "LIKE" clause of a select query.
Eg "select x from y where y.col LIKE LEFT(${param},1)"
You should be able to use "LIKE <string-expression>".


Blater ( blater ) - 2008-01-13 19:04

5

Closed

Fixed

Steve

None

None

Public


Comments ( 3 )




Date: 2008-01-22 15:51
Sender: blater


The fix works fine.
But... have just tried a select using the SQL-Server "cast" statement:

select 'rtsk/'+cast(r.empid as varchar) as taskCode
into xml:{result.tasklist.taskCode}

Unfortunately it bombs with SEVERE: Exception parsing the xmlselect
java.lang.NullPointerException
at com.inverse2.parser.SQLSelect.makeSQL(XMLSelect.java:3254)
at
com.inverse2.parser.XMLSelect.SelectStatement(XMLSelect.java:328)


Can you add "CAST(SQLexpression AS SQLtype)" to the list for the next
release?
Re-opening the SQL-Server syntax bug rather than creating a new one, as a
few more of these are likely to come out the woodwork.



Date: 2008-01-21 15:44
Sender: stevewdhProject Admin


Parser now supports the "top 999" syntax used by SQLServer. It does not
support "stop 99 PERCENT".
Parser now supports "like left(...)" syntax.



Date: 2008-01-21 14:43
Sender: blater


When I said "This is valid mysql syntax", hopefully you did not take it
literally.
Of course I meant it as a metaphore for sql-server.

Also number 2) may be because of the bug where the LEFT function is not
recognised because the parser is getting confused with the LEFT keyword
from "LEFT JOIN"...



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 7 )

Field Old Value Date By
status_id Open 2008-03-03 10:22 stevewdh
close_date - 2008-03-03 10:22 stevewdh
status_id Closed 2008-01-22 15:51 blater
close_date 2008-01-21 15:44 2008-01-22 15:51 blater
resolution_id None 2008-01-21 15:44 stevewdh
close_date - 2008-01-21 15:44 stevewdh
status_id Open 2008-01-21 15:44 stevewdh