windows-1252?Q52=65=3A=48=65=6C=70=20=66=69=6E=64=
Posted in 2007
Topics: SQL Development & Query Writing, Versions, Editions & End-of-Life
select tabname
from systables as st
left outer join sysconstraints as sc
on st.tabid = sc.tabid and st.tabid >= 100 {No system catalog tables}
and sc.constrtype = 'P'
WHERE sc.constrid is NULL;
Art S. Kagel
----- Original Message -----
From: Jonathan Smaby <ids@iiug.org>
To: ids@iiug.org
At: 10/26 13:14:03
Good morning,
I have IDS 10.00.FC5 under HPUX 11.23. If there is a way to query sysmaste=
r
/ data-dictionary to identify tables that don=B9t have a Primary Key, I would
be eternally grateful for any assistance.
Merci =E0 l'avance
Jonathan B. Smaby
DBSA
Pomona College, ITS-AISO Office
jonathan.smaby@pomona.edu
Web. http://www.pomona.edu
--
"In theory, there is no difference between theory and practice. But, in
practice, there is."
~ Jan L. A. Van de Snepscheut (1953-1994)
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
=0D
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Thank-you Art for the SQL. I ran this and I've picket up several false-positives. One of my tables, acadsum_table has following schema index/key: index unique acadsum_prim on (id, prog, sess, yr) acadsum_key on (prog, sess, yr) acadsum_key2 on (yr, sess, id) acadsum_id on (id) Any suggestions? Thanks again for your help, I'm much close than before. Merci =E0 l'avance Jonathan B. Smaby DBSA Pomona College, ITS-AISO Office jonathan.smaby@pomona.edu Tel. (909) 621-8506 Web. http://aiso.pomona.edu -- =B3Experience is something you don't get until just after you need it.=B2 ~Steven Wright -----Original Message----- > From: "ART KAGEL, BLOOMBERG/ 731 LEXIN" <kagel@bloomberg.net> > Reply-To: <ids@iiug.org> > Date: Fri, 26 Oct 2007 13:33:31 -0400 (EDT) > To: <ids@iiug.org> > Subject: windows-1252?Q52=3D65=3D3A=3D48=3D65=3D6C=3D70=3D20=3D66=3D69=3D6E.... [10274] >=20 > select tabname=20 > from systables as st > left outer join sysconstraints as sc > on st.tabid =3D sc.tabid and st.tabid >=3D 100 {No system catalog tables} > and sc.constrtype =3D 'P' > WHERE sc.constrid is NULL; >=20 > Art S. Kagel=20 >=20 > ----- Original Message ----- > From: Jonathan Smaby <ids@iiug.org> > To: ids@iiug.org=20 > At: 10/26 13:14:03 >=20 > Good morning,=20 >=20 > I have IDS 10.00.FC5 under HPUX 11.23. If there is a way to query sysmast= e=3D > r=20 > / data-dictionary to identify tables that don=3DB9t have a Primary Key, I w= ould > be eternally grateful for any assistance. >=20 > Merci =3DE0 l'avance >=20 > Jonathan B. Smaby > DBSA=20 > Pomona College, ITS-AISO Office > jonathan.smaby@pomona.edu > Web. http://www.pomona.edu >=20 > --=20 > "In theory, there is no difference between theory and practice. But, in > practice, there is." > ~ Jan L. A. Van de Snepscheut (1953-1994) >=20 > ------------------------------------------------------------- > This message has been scanned by Postini anti-virus software. > =3D0D=20 >=20 >=20 > *************************************************************************= ***** > *=20 > Forum Note: Use "Reply" to post a response in the discussion forum. >=20 >=20 > *************************************************************************= ***** > *=20 > Forum Note: Use "Reply" to post a response in the discussion forum.=20 ------------------------------------------------------------- This message has been scanned by Postini anti-virus software. =0D
Hi,
It seems this is not a primary key but a unique index. So it should be
correct that Arts query did report this table. For unique indexes,
search sysindexes.
select tabname from sysindexes
where tabid >= 100
and not exists (select idxname from systables
where sysindexes.tabid = systables.tabid
and idxtype = "U")
(primary keys are also present there as unique index)
Marcus
-----Original Message-----
From: Jonathan Smaby [mailto:Jonathan.Smaby@pomona.edu]
Sent: Friday, October 26, 2007 8:27 PM
To: ids@iiug.org
Subject: Re: windows-1252?Q52=65=3A=48=65=6C=70=20=66=6.... [10275]
Thank-you Art for the SQL.
I ran this and I've picket up several false-positives. One of my tables,
acadsum_table has following schema index/key:
index
unique acadsum_prim on (id, prog, sess, yr)
acadsum_key on (prog, sess, yr)
acadsum_key2 on (yr, sess, id)
acadsum_id on (id)
Any suggestions?
Thanks again for your help, I'm much close than before.
Merci =E0 l'avance
Jonathan B. Smaby
DBSA
Pomona College, ITS-AISO Office
jonathan.smaby@pomona.edu
Tel. (909) 621-8506
Web. http://aiso.pomona.edu
--
=B3Experience is something you don't get until just after you need
it.=B2
~Steven Wright
-----Original Message-----
> From: "ART KAGEL, BLOOMBERG/ 731 LEXIN" <kagel@bloomberg.net>
> Reply-To: <ids@iiug.org>
> Date: Fri, 26 Oct 2007 13:33:31 -0400 (EDT)
> To: <ids@iiug.org>
> Subject:
windows-1252?Q52=3D65=3D3A=3D48=3D65=3D6C=3D70=3D20=3D66=3D69=3D6E....
[10274]
>=20
> select tabname=20
> from systables as st
> left outer join sysconstraints as sc
> on st.tabid =3D sc.tabid and st.tabid >=3D 100 {No system catalog
>tables} and sc.constrtype =3D 'P'
> WHERE sc.constrid is NULL;
>=20
> Art S. Kagel=20
>=20
> ----- Original Message -----
> From: Jonathan Smaby <ids@iiug.org>
> To: ids@iiug.org=20
> At: 10/26 13:14:03
>=20
> Good morning,=20
>=20
> I have IDS 10.00.FC5 under HPUX 11.23. If there is a way to query
>sysmast=
e=3D
> r=20
> / data-dictionary to identify tables that don=3DB9t have a Primary
> Key, I w=
ould
> be eternally grateful for any assistance.
>=20
> Merci =3DE0 l'avance
>=20
> Jonathan B. Smaby
> DBSA=20
> Pomona College, ITS-AISO Office
> jonathan.smaby@pomona.edu
> Web. http://www.pomona.edu
>=20
> --=20
> "In theory, there is no difference between theory and practice. But,
>in practice, there is."
> ~ Jan L. A. Van de Snepscheut (1953-1994) =20
> -------------------------------------------------------------
> This message has been scanned by Postini anti-virus software.
> =3D0D=20
>=20
>=20
>
>***********************************************************************
>**=
*****
> *=20
> Forum Note: Use "Reply" to post a response in the discussion forum.
>=20
>=20
>
>***********************************************************************
>**=
*****
> *=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
=0D
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
Thank-you Marcus for pointing that out, and for the SQL.
I appreciate yours and Art's help very much.
Sincerely,
Jonathan B. Smaby
Pomona College
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Marcus Haarmann
Sent: Saturday, October 27, 2007 12:46 PM
To: ids@iiug.org
Subject: RE: Re: windows-1252?Q52=65=3A=48=65=6C=70=20=.... [10279]
Hi,
It seems this is not a primary key but a unique index. So it should be
correct that Arts query did report this table. For unique indexes,
search sysindexes.
select tabname from sysindexes
where tabid >= 100
and not exists (select idxname from systables
where sysindexes.tabid = systables.tabid
and idxtype = "U")
(primary keys are also present there as unique index)
Marcus
-----Original Message-----
From: Jonathan Smaby [mailto:Jonathan.Smaby@pomona.edu]
Sent: Friday, October 26, 2007 8:27 PM
To: ids@iiug.org
Subject: Re: windows-1252?Q52=65=3A=48=65=6C=70=20=66=6.... [10275]
Thank-you Art for the SQL.
I ran this and I've picket up several false-positives. One of my tables,
acadsum_table has following schema index/key:
index
unique acadsum_prim on (id, prog, sess, yr)
acadsum_key on (prog, sess, yr)
acadsum_key2 on (yr, sess, id)
acadsum_id on (id)
Any suggestions?
Thanks again for your help, I'm much close than before.
Merci =E0 l'avance
Jonathan B. Smaby
DBSA
Pomona College, ITS-AISO Office
jonathan.smaby@pomona.edu
Tel. (909) 621-8506
Web. http://aiso.pomona.edu
--
=B3Experience is something you don't get until just after you need
it.=B2
~Steven Wright
-----Original Message-----
> From: "ART KAGEL, BLOOMBERG/ 731 LEXIN" <kagel@bloomberg.net>
> Reply-To: <ids@iiug.org>
> Date: Fri, 26 Oct 2007 13:33:31 -0400 (EDT)
> To: <ids@iiug.org>
> Subject:
windows-1252?Q52=3D65=3D3A=3D48=3D65=3D6C=3D70=3D20=3D66=3D69=3D6E....
[10274]
>=20
> select tabname=20
> from systables as st
> left outer join sysconstraints as sc
> on st.tabid =3D sc.tabid and st.tabid >=3D 100 {No system catalog
>tables} and sc.constrtype =3D 'P'
> WHERE sc.constrid is NULL;
>=20
> Art S. Kagel=20
>=20
> ----- Original Message -----
> From: Jonathan Smaby <ids@iiug.org>
> To: ids@iiug.org=20
> At: 10/26 13:14:03
>=20
> Good morning,=20
>=20
> I have IDS 10.00.FC5 under HPUX 11.23. If there is a way to query
>sysmast=
e=3D
> r=20
> / data-dictionary to identify tables that don=3DB9t have a Primary
> Key, I w=
ould
> be eternally grateful for any assistance.
>=20
> Merci =3DE0 l'avance
>=20
> Jonathan B. Smaby
> DBSA=20
> Pomona College, ITS-AISO Office
> jonathan.smaby@pomona.edu
> Web. http://www.pomona.edu
>=20
> --=20
> "In theory, there is no difference between theory and practice. But,
>in practice, there is."
> ~ Jan L. A. Van de Snepscheut (1953-1994) =20
> -------------------------------------------------------------
> This message has been scanned by Postini anti-virus software.
> =3D0D=20
>=20
>=20
>
>***********************************************************************
>**=
*****
> *=20
> Forum Note: Use "Reply" to post a response in the discussion forum.
>=20
>=20
>
>***********************************************************************
>**=
*****
> *=20
> Forum Note: Use "Reply" to post a response in the discussion forum.=20
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
=0D
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.