2012/03/01 19:56 -0800, Don Wieland
I do not get the same results. Am I missing something? Hopefully
something simple ;-)
O, you are. You do not want GROUP_CONCAT in the subquery. It gives you the
comma-separated string whereto you referred, which, as far as the IN goes, is
o
Appreciate a little guidance here:
Background: I have an invoicing system. Invoices are generated and
(invoice and Invoice Items) and Payments are generated (Payments and
Payment Items). Payment items are amount of the Payment Total
allocated to payoff open invoices. So I may have 3 open in
Yes it is possible and you only need to use LEFT join if you need all of
the records from "issues" whether there are records in users that match or
not.
Just JOIN the users table TWICE and assign each one it's own alias, like
this:
SELECT
FROM issues i
INNER JOIN users u1
on u1.id
I have a table called issues and other table called users. Issues contains
two fields that are in effect userids that reference the users table. I
want to produce a report with a single query that grabs the names of both
users referenced in the issues table. Is this possible?
I knwo how to do t
That works perfectly. I did not know that you could alias a table name
multiple times to get multiple distinct selects out of it.
Simple yet elegant. Thanks.
> Hi.
>
> Presuming you have the team names in a seperate table, you could write
> something like:
>
> SELECT home.name, away.name, winn
Hi.
Presuming you have the team names in a seperate table, you could write
something like:
SELECT home.name, away.name, winner.name
FROM games, teams AS home, teams AS away, teams AS winner
WHERE home.id = games.homeid AND
away.id = games.awayid AND
winner.id = games.winnderid A
I'm sort of new/rusty to SQL and I was trying to figure out the best way to
do this problem. I'm creating a database for tracking a football pool. I'm
kind of stuck on displaying the Games database. The Games database has a
home team ID and an away team ID as well as the winning team ID. Thus I ne