我现在需要些一个sql语句的解析算法,如果完全的写一个sql的语法分析器,很麻烦。我现在只需要分析select语句。如:
select catalog_item_id,
       catalog_id,
       band_id,
       to_date(eff_date,'yyyy-mm-dd mm:hh:ss') eff_date
        from catalog_item a 
        where catalog_id = :catalog_id  
             and band_id = :band_id 
             and catalog_item_type = :catalog_item_type
这样的sql语句,分别分析出select参数,catalog_item_id,catalog_id,band_id,eff_date;
where后面的参数catalog_id,band_id,catalog_item_type。
大家多多帮忙。
大家可以给点源代码,什么语言的都可以。