Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
>From: Class Planning Yard <jps@nns.navy.mil>
>Date: Fri, 29 Aug 1997 12:13:49 -0400
>X-Informix-List-Id: <list.16259>
>
>Does anyone know how to perform a query without knowing the table name?
>I know the attribute I am looking for but do not know the table name.
There isn't a way to avoid naming the table in the query which fetches the
data, so you need the answer to a different question: how do I find out
which table or tables contain a named attribute? The answer is via the
system catalogue:
SELECT T.TabName
FROM 'informix'.SysTables T, 'informix'.SysColumns C
WHERE C.Tabid = T.Tabid
AND C.ColName = 'known_attribute_name';
That query should work on any Informix database from 4.00 upwards,
and regardless of whether it is a MODE ANSI database or not.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
PS: Warning I do not reply to messages with anti-spam in the return path.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.