ca.portal.admin

Re: SQL question

Discussion created by ca.portal.admin on Oct 10, 2008
I have an idea, but it isn't pretty. SQL doesn't support sets. So to
make IDMS-SQL work, I believe they use a foreign key. Since each record
type is the equivalent of a table, could you do a table scan and select
the rows where the foreign key is null?

Lutz Petzold
TDM UDB/IDMS Support
401-782-2265
Page 860 366 0865 or Telalert
=20
=20

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna
"
IDMS 3rd-party providers forum
IDMSVENDOR-L@LISTSERV.IUASSN.COM
SMTP
IDMSVENDOR-L@LISTSERV.IUASSN.COM
IDMSVENDOR-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: SQL question
"Consider you have an owner (REC-A calc) and member (REC-B via SET-A-B)
and you want some columns from both. Something like this will get the
owner and all the members. SET-A-B is essentially the foreign key.

SELECT A.col1, A.col2, B.col1, B.col2, B.col3
FROM sqlschem.""REC-A"" A, sqlschem.""REC-B""
WHERE A.calckey = calckeyvalue
AND ""SET-A-B""

If you want REC-A data when SET-A-B is empty do this.

SELECT A.col1, A.col2, B.col1, B.col2, B.col3
FROM sqlschem.""REC-A"" A, sqlschem.""REC-B""
WHERE A.calckey = calckeyvalue
AND ""SET-A-B""
PRESERVE A

I hope I didn't misunderstand the original question.


Joe S Cates, Database Analyst II
Systems Architecture and Operations
Database Management/Unix Administration
Montgomery County Public Schools
Rockville, MD 20850
301-279-3697
joe_cates@mcpsmd.org

Outcomes