473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Search many tables

Hi,

I need to search all tables and all records in a large database (v. 7.2) for
at text string.

Are there any _easy_ ways of doing this?

TIA!

Jakob
Nov 12 '05 #1
2 7672
"Teknik & System" <te****@0725.dk> wrote in message
news:3f***********************@dread16.news.tele.d k...
Hi,

I need to search all tables and all records in a large database (v. 7.2) for at text string.

Are there any _easy_ ways of doing this?


How easy do you want?

SELECT 'SELECT * FROM ' || TABSCHEMA || '.' || TABNAME
|| ' WHERE ' || COLNAME || ' LIKE ''%your_search_value%'';'
FROM SYSCAT.VIEWS
WHERE TYPENAME IN ('CHAR','VARCHAR','CLOB','LONG VARCHAR','CHARACTER')

Regards
Paul Vernon
Business Intelligence, IBM Global Services
Nov 12 '05 #2
Paul Vernon schrieb:
"Teknik & System" <te****@0725.dk> wrote in message
news:3f***********************@dread16.news.tele.d k...
Hi,

I need to search all tables and all records in a large database (v. 7.2)
for
at text string.

Are there any _easy_ ways of doing this?

How easy do you want?

SELECT 'SELECT * FROM ' || TABSCHEMA || '.' || TABNAME
|| ' WHERE ' || COLNAME || ' LIKE ''%your_search_value%'';'
FROM SYSCAT.VIEWS


FROM SYSCAT.COLUMNS :-)
WHERE TYPENAME IN ('CHAR','VARCHAR','CLOB','LONG VARCHAR','CHARACTER')


.... and you get tons of select statements!

Regards,
--
Burkhard Schultheis
Tele Data Electronic, Wagnerstr. 10, D-76448 Durmersheim
Email: sc********@tde-online.de
Phone: +49-7245-9287-21, Fax: +49-7245-9287-30
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: LRW | last post by:
Well, I have another question that's hard to ask, so I may end up over explaining the question. I have about 40 tables, all with a similar column structure. I want to be able to search through...
3
by: Job Lot | last post by:
My DataGrid is bound to DataSet which contains relationship between two tables as follows: SqlHelper.FillDataset(strConn, CommandType.StoredProcedure, "spSelectClientApplicant", ds, New String()...
2
by: Sorce | last post by:
I'm working on search query for a troubleticket system. There are two tables I want to search, the description in the tickets table and the corresponding notes in the notes table. The problem is...
0
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). ...
2
by: TH | last post by:
I am (still :) working on a recipe database. Now I am trying to figure out how to set it up for an ingredient search. What I want it to be able to do is to search by one ingredient, sometimes by...
4
by: Gobi | last post by:
Hello, I have a Database with lists of Clients in each. Every year a new tables is created with the naming convention "CloseYear" ie close1999, close2000 There are tables from this year back to...
1
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and...
8
by: ignatova | last post by:
Hello, I have been using IBM Net Search Extender to perform full text searches on text columns in relational tables in DB2 without any problems until now. However it doesn't seam to function...
1
by: atl10spro | last post by:
Hello Everyone, I am new to MS Access and although I have created several different databases I lack the VB knowledge to code a search function. I am turning to your expertise for assistance. ...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.