partial name of a column

partial name of a column

Post by news.att.net.i » Thu, 26 Dec 2002 22:41:39



How do you "select" data from a specific column when you know only part/not
sure of the column name? (using %...)
 
 
 

partial name of a column

Post by BP Margoli » Fri, 27 Dec 2002 00:07:12


The LIKE function is designed for data, not column names.

From a logical viewpoint, your request doesn't make sense. If you don't know
the name of the column, then you aren't familiar with the database, and that
would imply that you are a hacker, rather than an authorized user of the
database.

However, assuming you at least know the name of the table, you can get
information about the table, including the column names, via the sp_help
system stored procedure. Documentation on the sp_help system stored
procedure is available in the SQL Server Books Online.

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:> How do you "select" data from a specific column when you know only
part/not
> sure of the column name? (using %...)


 
 
 

partial name of a column

Post by Kama » Fri, 27 Dec 2002 13:06:38


You can go for select * from......

All the best
Kamal Arora

 
 
 

partial name of a column

Post by Stride » Sat, 28 Dec 2002 00:54:17



Quote:> You can go for select * from......

What I'll do sometimes is select top 0 * from FOO in query analyzer.  I get
back just the column names.
Quote:

> All the best
> Kamal Arora

 
 
 

1. AutoLoading from Partial Names

I am using databases. I am cataloging movies. If I started typing "Arma" how
can I get it to finish typing in "geddon" for me?

Also. I am getting an error that says that the Dataset is not in Insert or
Edit mode, and a Key Access Violation Error? I am using Delphi 3 on a
Windows 95 system. Can anyone offer any ideas on why I am getting this and
what I can do about it?


Thanks

2. 17313-TX-DALLAS-SQL-SAS-C-C++-IBM Mainframe-TSO-Informix-SPS Knowledge-Informix

3. Partial name reference on Progress

4. SQL Novice: Query required to list all records added to a table in the last week.

5. Partial String substitution for complete column

6. DTS Step Run Status

7. Partial column index

8. Purify / file table problem while compiling on HP-UX - urgent - p

9. Partial Indices vs. mixing columns and functions

10. sql - partial column matching

11. Search for partial Value in Column

12. Column Name Naming.

13. HHHHelp (Table Names and Column Names)