Subject | Setting Up SQL Properties |
---|---|
Author | Jeff Kreider |
Post date | 2001-01-18T03:56:03Z |
I am having problems understanding when to use the KeyLinks,
JoinLinks, etc. properties of a TIB_Query. Would someone please tell
me what parts of the SQL statement below should go into what
properties and why? Thanks! Should I or should I not use table
aliases. I'm also in the midst of learning SQL and I was trying to
use table aliases for all 3 tables. However, when I did, I got 1000's
of rows instead of 4.
SELECT PREFIX , FIRSTNAME, FAMILY.LASTNAME MAINLASTNAME
, FM.LASTNAME OTHERLASTNAME, SUFFIX, MARITALSTATUS
, BIRTHDAY, MEMBERTYPE_ID, GRADUATIONYEAR, GENDER
FROM FAMILYMEMBER FM
INNER JOIN FAMILY2MEMBER
ON (FM.FAMILYMEMBER_ID = FAMILY2MEMBER.FAMILYMEMBER_ID)
INNER JOIN FAMILY
ON (FAMILY2MEMBER.FAMILY_ID = FAMILY.FAMILY_ID)
WHERE FAMILY2MEMBER.FAMILY_ID = :familyid
ORDER BY FIRSTNAME
TIA for your help.
Jeff Kreider
JoinLinks, etc. properties of a TIB_Query. Would someone please tell
me what parts of the SQL statement below should go into what
properties and why? Thanks! Should I or should I not use table
aliases. I'm also in the midst of learning SQL and I was trying to
use table aliases for all 3 tables. However, when I did, I got 1000's
of rows instead of 4.
SELECT PREFIX , FIRSTNAME, FAMILY.LASTNAME MAINLASTNAME
, FM.LASTNAME OTHERLASTNAME, SUFFIX, MARITALSTATUS
, BIRTHDAY, MEMBERTYPE_ID, GRADUATIONYEAR, GENDER
FROM FAMILYMEMBER FM
INNER JOIN FAMILY2MEMBER
ON (FM.FAMILYMEMBER_ID = FAMILY2MEMBER.FAMILYMEMBER_ID)
INNER JOIN FAMILY
ON (FAMILY2MEMBER.FAMILY_ID = FAMILY.FAMILY_ID)
WHERE FAMILY2MEMBER.FAMILY_ID = :familyid
ORDER BY FIRSTNAME
TIA for your help.
Jeff Kreider