Re: need help with a query, please

From: Jacques Desmazieres <nospam.jacques.desmazieres_at_is2france.com>
Date: 2000/07/19
Message-ID: <41cd5.400$3a2.741506_at_nnrp6.proxad.net>#1/1


Joe,

Why don't you create a view containing all of your tables, adding for instance a key that reflects the name of the table the data comes from. This would be a huge view this should solve your problem as you will only have to search in a single object. Moreover this would be flexible enough to allow you adding / removing tables without changing your code, only need to amend the view

Jacques

"Joe Driscoll" <joed_at_icoms.com> wrote in message news:39747826.9B158BFE_at_icoms.com...
>
> I have some 250 tables that have the same structure and I need to search
> each one for a specific entry. here is the query that I have to check
> just one table:
>
> select orderid, tracenumber, username
> from sp236_transaction
> where orderid = '963262260741'
>
> the sp236 is the only thing that changes in the table name and this
> query. Is there a way I can loop through all 250 tables?
>
> TIA
>
> Joe
>
>
Received on Wed Jul 19 2000 - 00:00:00 CEST

Original text of this message