[top-posting damage repaired manually -dM]

>>>> SELECT u.Name, txn.Field, txn.ReferenceType, txn.NewReference, t.id
>>>> tid FROM Tickets t JOIN Transactions txn ON txn.Type = 'AddWatcher'
>>>> AND txn.ObjectType = 'RT::Ticket' AND txn.ObjectId = t.id LEFT JOIN
>>>> Users u ON u.id = txn.NewValue WHERE t.id = XXXXX;
>>> This query has me confused.  There are lowercase letters placed by
>>> themselves in locations I'm not used to seeing criteria placed.
>> I'm jsut trying to help you figure out [...]
> I know.  I just didn't understand the SQL syntax.

Then it would help to say *what* lowercase letters are puzzling you;
there are lots of lowercase letters in that query, and without knowing
which ones have you baffled, we're left guessing.

I'm going to guess that the ones that are baffling you are the alias
names, like "t" in "Tickets t" and "txn" in "Transactions txn" or "u"
in "Users u".  These are an alternative syntax for what you may know as
"Tickets AS t" or "Transaction AS txn" or "Users AS u": providing an
alternative name for referring to something elsewhere in the query (in
this case presumably for brevity, but there are cases, such as using
the same table multiple times, where this is actually necessary).

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML               [EMAIL PROTECTED]
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to