# SQL Parser

**URL:** <https://www.ruby-forum.com/t/sql-parser/108147>\
**Category:** Ruby\
**Created:** [June 29, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/sql-parser/108147 "2007-06-29T13:13:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkogler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba9def/32.png) [@gkogler](https://www.ruby-forum.com/u/gkogler)\
**Post date:** [June 29, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/sql-parser/108147/1 "2007-06-29T13:13:56Z")

</div>

Hi

I’m looking for a SQL parser written in Ruby. The parser should handle  
the full SQL92 spec, including subselects and the like. I’m only  
interested in SELECT-Statements though.

The parser should deliver at least

- a collection of column expressions including the alias, if specified
- the main from clause (including subselects, if any)
- the main where clause (including subselects, if any)
- the order clause

Does anybody know about such a parser? Any help is appreciated!

Best regards  
Gernot

---

<div class="post-metadata">

**Author:** ![gkogler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba9def/32.png) [@gkogler](https://www.ruby-forum.com/u/gkogler)\
**Post date:** [June 29, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/sql-parser/108147/2 "2007-06-29T14:26:21Z")

</div>

Hello

Search for Language Parser Toolkit at Rubyforge.  
I don’t know if it handles all SQL92 features (I didn’t have time to  
test it yet), but you could take a look.

Gernot K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) escreveu: Hi

I’m looking for a SQL parser written in Ruby. The parser should handle  
the full SQL92 spec, including subselects and the like. I’m only  
interested in SELECT-Statements though.

The parser should deliver at least

- a collection of column expressions including the alias, if specified
- the main from clause (including subselects, if any)
- the main where clause (including subselects, if any)
- the order clause

Does anybody know about such a parser? Any help is appreciated!

Best regards  
Gernot

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
