in reply to Help SQL::Tidy
While I won't be using this module (because I already write my SQL in a nicely formatted form), I should point out that one thing you need to figure out how to format is a CASE statement. I say this because I frequently write things like this:
and the expressions within the CASE statement can get surprisingly complicated...SELECT e.eventid , SUM(c.revenue) as total_revenue , SUM( CASE WHEN c.cart_type = 'ST' THEN c.revenue END ) as standard_revenue FROM event e JOIN cart c ON e.eventid = c.eventid GROUP BY e.eventid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help SQL::Tidy
by eric256 (Parson) on Feb 19, 2008 at 22:02 UTC | |
by Anonymous Monk on Nov 20, 2008 at 19:21 UTC |