Dr.Ruud wrote:
Colin Wetherbee schreef:
(As an aside, how do you guys quote your queries? I find that for
anything longer than about 60 characters, q() and '' and everything
else start to look horribly inelegant.)
my $sql = <<'SQL';
SELECT
jo.departure_date AS departure
, eq.name AS equipment
, dp.full_city AS departure_city
, ap.full_city AS arrival_city
, ca.name AS carrier_name
, jo.number
FROM
jsjourneys AS jo
FULL OUTER JOIN
jscarriers AS ca
ON jo.carrier = ca.id
FULL OUTER JOIN
jsequipment AS eq
ON jo.equipment = eq.id
JOIN
jsports AS dp
ON jo.departure_port = dp.id
JOIN
jsports AS ap
ON jo.arrival_port = ap.id
ORDER BY
departure
SQL
(why aren't these "FULL OUTER JOIN"s not just "JOIN"s?)
They capture NULL values on both sides of the JOIN.
BTW, some editors recognize certain heredoc-delimiters (like SQL) and
switch language for color coding, autocompletion, etc.
I'd like to see nedit do that. I'd imagine vim supports that
functionality, but I prefer to use graphical editors unless I'm just
hacking something together quickly. What do you use that can do that?
Colin