Re: Strange Query help
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 05/06/04
- Next message: Hugo Kornelis: "Re: Please help with aggregate sequel statements."
- Previous message: Shawn: "Domain error in SQl Server"
- In reply to: Ken Briscoe: "Strange Query help"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 06 May 2004 20:13:05 +0200
On Thu, 6 May 2004 13:39:12 -0400, Ken Briscoe wrote:
>Hello,
> I'm looking for a way to get a list of all the tables in my database which
>contain a field named UserFld1. Of course, in different tables, UserFld1
>represents different things. But I'm trying to put together a list of all
>the tables that can (and are) customized with these "user fields". Anyone
>know of a way to query the entire database and return a list of tables that
>meet this requirement? Thanks.
Hi Ken,
Aneesh' suggestion will probably work, but querying the system tables
is not the recommended solution for this type of query.
Instead, try:
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'UserFld1'
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Next message: Hugo Kornelis: "Re: Please help with aggregate sequel statements."
- Previous message: Shawn: "Domain error in SQl Server"
- In reply to: Ken Briscoe: "Strange Query help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|