title: How to test SQL dynamic queries?
body: <p>My applications are Spring/iBatis (2.3) based. I usually write a lot of dynamic queries in my sqlMaps and I'd like to test my generated SQL queries to avoid any syntax errors. For more precision, I want to:</p>
  
  <ol>
  <li>check the SQL syntax (depending on
  the sql dialect) of all my generated queries</li>
  <li>check if my queries work correctly
  with the actual database structure</li>
  </ol>
  
  <p>Does already exist a library that gives me the chance to check the SQL syntax (step 1), depending on the sql dialect (I'm actually using Oracle), without a database connection?</p>
  
  <p>Does already exist a sqlMap parser which could help me generating all potential queries, containing all combinations of dynamic parameters?</p>
  
  <p>Basically, I'm thinking about a way to avoid writing one (or more) unit test per query. I'd like to automate this step to be sure that my generated queries are always right. Any other suggestions?</p>