on ‎2014 Jan 08 8:29 PM
Good Evening
I'm looking for either a parser or the grammar description in (e)bnf for Sybase IQ T-SQL. I'm tinkering around with a small project for my colleagues and for this I need the possibility to check any block of Sybase IQ T-SQL for correctness.
Could somebody please give me a hint? I spent the best of this Afternoon searching the web but without finding something useful.
Thank you very much.
Best regards
Alex
Request clarification before answering.
Hi Alex,
I think that you looking for the EBNF to use it as a sort of exercise? I dont know any source where to get it from but, be aware if you speak about IQ ist not nessecerly T-SQL but might be WATCOM SQL (hope this ist still true, haven't used IQ a while?)
but for TSQl use http://msdn.microsoft.com/en-us/library/ff848766.aspx as a start because SQL-Server is pretty close to ASE, so you have to find only the diffrences betwen MS and SAP then.
HTH
dj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good evening
First, thanks to all of you for your suggestions. I think I'll try it with the TSQL- or Watcom-Grammar. I thought it would be nice to build a tool for my colleagues to lower their workload. We're running a lot of really big lists of statements and I'm looking for a way, to parameterize the blocks of SQL code, so you can use them like lego-bricks...
Best regards
Alex
I don't know of any parser that is available externally. One option would be to download the IQ Express Edition. It is a free version of IQ, with limitations like no support, but you could use that to check the SQL. For instance, if you run the code into IQ via the dbisql utility you can specify the -n option to have it just check syntax but not run anything.
The Express Edition is available here: SAP Sybase IQ free downloads: Choose the right fit for you
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alexander,
Although I am not aware, such BNF documents might be considered proprietary. You could however start with one of the BNF files related to the standards SQL-99, SQL-2003, etc and alter it as necessary.
Documentation on differences between the SQL used in IQ and other SQL dialects can be found at:
Differences from Other SQL Dialects
in the IQ docs.
In addition, IQ provides a system procedure 'sa_ansi_standard_packages' that can be used to deterimine how a specific SQL statement varies from the standard. Using this you might be able to manually alter a base BNF definition.
HTH
Chris
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.