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:

[SQL] Update query by joining multiple tables.

2007-01-17 Thread Moiz Kothari
Guys, on page this http://www.postgresql.org/docs/8.1/interactive/sql-update.html, it is not specified if a join can be done between multiple tables to update a table, i tried and it worked just fine for me. Something like this : Infact update can work between multiple tables to... do something

Re: [SQL] Add calculated fields from one table to other table

2006-10-30 Thread Moiz Kothari
Roopa,Why dont you try putting in some case or decode with your first field, so incase if nothing is returned you explicitly make it 'A' kinds. Regards,Moiz Kothari On 10/31/06, roopa perumalraja <[EMAIL PROTECTED]> wrote: Hi   Thanks a lot for your help. The query which you sugg

Re: [SQL] Add calculated fields from one table to other table

2006-10-29 Thread Moiz Kothari
Hi Roopa,If your timeseries table has records for all minutes, then you should outer join both tables so as to get the desired results you are looking for... try doing this.select tk.ric, tm.timeseries_time , count(tk.*), avg(tk.price),sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume)from tick