Re: Need help in basic query

2005-06-03 Thread Anoop kumar V
well - that was what I tried first - but that does not work because that returns the latest date for which the task_id has a record as Assignment. (It is like it picks up the max date from all records that have name_rec_type as Assignment) But I wanted was if the date corresponding to the name_

Re: Need help in basic query

2005-06-02 Thread mfatene
Hi, Try just : SELECT id_secr_rqst task_id, MAX(dt_aud_rec) AS latest FROM isr2_aud_log WHERE name_rec_type = 'Assignment' AND id_secr_rqst ='TASK23C6054B9D416C08:1284FD4:103FB047DF1:-7ECF' GROUP BY id_secr_rqst ; ++-+ | task_id

Re: Need help in basic query

2005-06-02 Thread Anoop kumar V
SOLVED: I changed my query to include max(t1.dt_aud_rec) instead of t1.dt_aud_rec. I had guessed that it required just a tweak here and there... Does anybody have any other suggestions apart from this?? Thanks, Anoop On 6/2/05, Anoop kumar V <[EMAIL PROTECTED]> wrote: > > OK - I have found th

Re: Need help in basic query

2005-06-02 Thread Anoop kumar V
OK - I have found the cause of the inconsistency - Whenever I have more than one record which has name_rec_type as 'Assignment' I do not get any results (I get an empty result) But if I have only one Assignment record then it returns the correct row. Question is: How can I overcome this - I jus

Need help in basic query

2005-06-02 Thread Anoop kumar V
Hi mysql-ers, I need help in a basic query: I have this table: select * from isr2_aud_log where id_secr_rqst IN ('TASK23C6054B9D416C08:1284FD4:103FB047DF1:-7ECF') --and name_rec_type = 'Assignment' order by id_secr_rqst, dt_aud_rec ++--