Database quarry returning few rows. I want to capture last r

Posted by Admin on 11-May-2010 14:41

Hi All,

I need to develop a process to capture last record in the DB process where a quarry return multiple rows.

Example :

Select * from enp where join_Date > '10-02-2009'

it return 5 rows.

I wanted to capture last row from the result.

Please let me know any automatic process there in progress_SONIC_7.5.6


Swaroop Kunduru.

All Replies

Posted by tsteinbo on 12-May-2010 04:17

My SQL is a bit rusty but cant you change the sql to use an order by and the last() function? Then you would get what you need from the sql and don't need post-process it.

Posted by Thomas Mercer-Hursh on 12-May-2010 11:39

Reverse the order of the query and use TOP to limit the number of records returned.

This thread is closed