Hello Regine,

I tried your example here - only difference being US-EN as the
language. The same result is returned for the two queries using 2.2 on
WinXP.

Also, you can do this with the query designer

I thought you could do it directly by adding the Personen table twice,
but that does not work, so what you do is use the Query-in-Query
feature to get this.
-- Create a query that simply selects all fields from Personen and
save it. ( qChef is what I used )
-- Now open a new query designer
-- Add the table Personen
-- Add the QUERY qChef
-- Add the join by dragging Personen.ChefID to qChef.ID
-- Add the fields with aliases as needed
-- Save

The result, for me using English, is identical to the your two SQL
statements here.

Drew

On 4/15/07, Regina Henschel <[EMAIL PROTECTED]> wrote:
Hello,

please make a table "Personen" in the embedded HSQL with this entries
ID      Name    hatChef
0       Kaiser
1       Müller  0
2       Schmidt 0
3       Klein   1
4       Groß    2
5       Schulte 1
6       Becker  2

Now define a query "reihung"
SELECT "mitarbeiter".*,"chef"."ID" AS "chefID","chef"."Name" AS
"chefName" FROM "Personen" AS "mitarbeiter", "Personen" AS "chef" WHERE
"mitarbeiter"."hatChef" = "chef"."ID"

and a query "crossjoin"
SELECT "mitarbeiter".*, "chef"."ID" AS "chefID","chef"."Name" AS
"chefName" FROM "Personen" AS "mitarbeiter" CROSS JOIN "Personen" AS
"chef" WHERE "mitarbeiter"."hatChef" = "chef"."ID"

Please use only sql-view. Design-view will not work! (Issues 73627, 76374)

I expect, that the queries have the same results, but they don't have.
What do I miss?

kind regards
Regina

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


Reply via email to