Re: Lookup specific string in all-tables
- From: Keith <keith.wingate@xxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 04:00:10 -0800 (PST)
On Dec 12, 8:15 am, David Kerber
<ns_dkerber@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In article <f5a755b8-feed-4c2b-a53c-
44e02086b...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, wkfung.e...@xxxxxxxxx
says...
Hi I am new to sybase,
May I know how I can find a specific string (filename in one of the
column in one of the table) in a database in which the table's name is
unknown?
I've read a simular article, saying that the only way to do this is to
open a cursor and run through the sysobjects table.
That's pretty much it. Get a list of the user tables and check each of
them for the piece of data you're looking for. If you don't know the
field name either, then you'll also need to scan through the fields list
for each table.
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Depending on the size of the database it may be easier to:
1) Dump your data to flat files using, e.g. dbschema.pl & bcp.
2) "grep" / "find" the search string in the dumped data.
Keith
.
- Follow-Ups:
- Re: Lookup specific string in all-tables
- From: Eric Fung
- Re: Lookup specific string in all-tables
- References:
- Lookup specific string in all-tables
- From: wkfung . eric
- Re: Lookup specific string in all-tables
- From: David Kerber
- Lookup specific string in all-tables
- Prev by Date: Re: Lookup specific string in all-tables
- Next by Date: Re: Lookup specific string in all-tables
- Previous by thread: Re: Lookup specific string in all-tables
- Next by thread: Re: Lookup specific string in all-tables
- Index(es):
Relevant Pages
|
|