Anoop kumar V <mailto:[EMAIL PROTECTED]> wrote:

> 1. It returns data about only one id_secr_rqst - I want it to return
> data about every id_secr_rqst in the table.

So, if I understand you correctly (sorry, having a bad day), you want all
records for the past two days?

Assuming this, you could use something like:

SELECT t1.id_secr_rqst, t2.name_rec_type, t1.dt_aud_rec 
FROM isr2_aud_log t1, isr2_aud_log t2
WHERE t1.id_secr_rqst = t2.id_secr_rqst
AND t1.name_rec_type='Exception Resource' 
AND dt_aud_rec > CURDATE() - 2;
ORDER  by t1.dt_aud_rec DESC;

> 2. Limit IMO is mysql specific (I hope I am wrong) is there something
> generic so I dont need to bother about which database I am running it
> against.

As far as I know it is MySql specific. SQL Server's equivalent is SELECT TOP
2 or something.

Peter Normann


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to