From: | "Bob Powell" <Bob(at)hotchkiss(dot)org> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Aliias names in select criteria |
Date: | 2002-06-04 16:49:35 |
Message-ID: | scfcb766.069@grpwise.hotchkiss.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
To whom it may concern:
The following selection criteria causes my box to start a process that gives no result.
SELECT P.Last_Name, P.First_Name, S.Status, S.Entry_Year, S.Graduation_Year, S.Former_School, S.Day_or_Board, S.Admissions_Id, P.Participant_Id, P.Birthday, P.Modification_Date
FROM Participants P, Students S
WHERE Participant.Participant_Id = Students.Participant_Id
It also throws the linux box into a process that has to be killed even though I've exited the client.
I found the problem to be the non-use of the alias after the WHERE clause If I rerun this as below without the full table name and using the alias it works. Is this a normal occurrence. Other systems I have used work either way.
SELECT P.Last_Name, P.First_Name, S.Status, S.Entry_Year, S.Graduation_Year, S.Former_School, S.Day_or_Board, S.Admissions_Id, P.Participant_Id, P.Birthday, P.Modification_Date
FROM Participants P, Students S
WHERE P.Participant_Id = S.Participant_Id
Bob Powell
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Maxwell | 2002-06-04 17:04:38 | How do I get a Digest subscription? |
Previous Message | Doug Fields | 2002-06-04 16:19:35 | Re: return true / false instead of int4 value |