Subject The Last Record.......in Selects
Author Fernando Buitrago (Listas y Foros)
Hi

If I try to capture the last record, what is missing?

CREATE PROCEDURE SP_PRODUCT_PRECE (
P_ESTATION INTEGER,
P_PRODUCT CHAR (4))
RETURNS (
P_PRICE FLOAT)
AS
BEGIN
SELECT PRECIO_COMPRA
FROM PRODUCTS_PRICES
WHERE ID_ESTACION = :P_ESTACION AND
ID_PRODUCT = :P_PRODUCT
ORDER BY DATE_OF_CHANGE,
TIME_OF_CHANGE
INTO :P_PRICE
END

This Select returns multiple records, But I want just the last.

Regards

Fernando Buitrago



[Non-text portions of this message have been removed]