Hello,

I'm new on this forum.

I have following select's on trigger, but first one is not working correctly.
Difference gets it's value ok, but key is allways null.
Code:
SELECT INTO difference EXTRACT(DAY FROM (now() - date1)), key key_id FROM orders WHERE orders.order_id = NEW.order_id;
If I split it on two, it's works ok. Difference and key has correct values.
Code:
SELECT INTO difference EXTRACT(DAY FROM (now() - date1)) FROM orders WHERE orders.order_id = NEW.order_id;

SELECT INTO key key_id FROM orders WHERE orders.order_id = NEW.order_id;
Ideas?