Re: [SQL] Query tuning

2008-05-16 Thread Moiz Kothari
Hi kapil, Here you have specified 3 tables, does JOB_TYPE_FIRST and JOB_TYPE_SECOND both contain all the JOBID in the third table? Maybe i can help you if you elaborate your problem a bit more. Regards, Moiz Kothari On Thu, May 15, 2008 at 11:30 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > > > >

[SQL] Find all instances of a column in the entire database.

2008-05-16 Thread Gavin 'Beau' Baumanis
Hi Everyone, I am hoping that you might be able to give me some assistance with the following task! I have a database with nearly 200 tables and I need to find all tables that contain a column of myColumnName. I was hoping there might be a built-in function for this task, but I have been

Re: [SQL] Find all instances of a column in the entire database.

2008-05-16 Thread hubert depesz lubaczewski
On Fri, May 16, 2008 at 11:51:20PM +1000, Gavin 'Beau' Baumanis wrote: > I am hoping that you might be able to give me some assistance with the > following task! > I have a database with nearly 200 tables and I need to find all tables > that contain a column of myColumnName. select * from info

Re: [SQL] Find all instances of a column in the entire database.

2008-05-16 Thread Gavin 'Beau' Baumanis
Hi depesz, Thanks very much! That works wonderfully well... Is this listed in the manual anywhere? because after two hours of reading, I didn't find it anywhere! None the less - thanks again. - Beau On 16/05/2008, at 11:56 PM, hubert depesz lubaczewski wrote: On Fri, May 16, 2008 at 11

Re: [SQL] Find all instances of a column in the entire database.

2008-05-16 Thread A. Kretschmer
am Sat, dem 17.05.2008, um 0:04:05 +1000 mailte Gavin 'Beau' Baumanis folgendes: > Hi depesz, > > Thanks very much! > That works wonderfully well... > > Is this listed in the manual anywhere? because after two hours of > reading, I didn't find it anywhere! Of course, the whole information

Re: [SQL] Query tuning

2008-05-16 Thread Scott Marlowe
On Thu, May 15, 2008 at 12:00 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > select count(distinct(j.JOBID)) as jobCount > from JOB_TYPE_FIRST a, JOB_TYPE_SECOND b, JOB_ALLOCATION_WORKLIST j > where (( a.JOBID = j.JOBID) > and (a.BOOK_ID = :bookId)) > or ((b.JOBID = j.JOBID) > and (b.BOOK_ID = :bookId)

Re: [SQL] Query tuning

2008-05-16 Thread Simon Riggs
On Fri, 2008-05-16 at 09:21 -0600, Scott Marlowe wrote: > On Thu, May 15, 2008 at 12:00 AM, <[EMAIL PROTECTED]> wrote: > > Hi, > > > > select count(distinct(j.JOBID)) as jobCount > > from JOB_TYPE_FIRST a, JOB_TYPE_SECOND b, JOB_ALLOCATION_WORKLIST j > > where (( a.JOBID = j.JOBID) > > and (a.BO

Re: [SQL] Find all instances of a column in the entire database.

2008-05-16 Thread Chris Browne
[EMAIL PROTECTED] ("Gavin 'Beau' Baumanis") writes: > I am hoping that you might be able to give me some assistance with the > following task! > I have a database with nearly 200 tables and I need to find all tables > that contain a column of myColumnName. > > I was hoping there might be a built-in