Torque does that, at least for DDL purposes. I don't know about Q and DML.

----- Original Message ----- 
From: "Meikel Bisping" <[EMAIL PROTECTED]>
To: <velocity-user@jakarta.apache.org>
Sent: Saturday, February 12, 2005 9:33 PM
Subject: Are there macros for generating SQL-dialects?


> Hello,
> 
> has anyone created macros for generating SQL-dialects?
> I'm thinking about using Velocity to write SQL queries which can be
> processed to Postgres or Informix dialect.
> 
> e.g.
> #macro( date $val )
>  #if ( $database == "Informix") date('$val')
>  #end
>  #if ( $database == "Postgres") date_val('$val')
>  #end
> #end
> 
> select .. from .. where entry_date>#date('2005-01-01')
> 
> Cheers,
> 
> Meikel Bisping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to