MySQL Forums
Forum List  »  Stored Procedures

Re: Function Does Not Exists -Yet it truly does
Posted by: Terri Smith
Date: June 21, 2019 01:28PM

This is one of many procedures that fail... the fail on this one is cl.table_updated() does not exist. SO we have many like this that just start failing … and then 5 minutes later do not fail...

CREATE procedure rbt.notifications(in_isTest boolean ) /* returns result set */
comment 'returns notifications to be sent'

BEGIN
DECLARE var_limit datetime;
DECLARE const_margin int default 60;
SET var_limit = cl.table_updated_at("rbt.totes")+ interval const_margin minute;

SELECT
notificationNbr
,notification_type as email_subject
,group_concat(notification_email_address) as email_addresses
,notification_message
from rbt.notifications
join rbt.notifications_destinations
on
(find_in_set(notification_type,notification_types)
or find_in_set('All',notification_types)
)
and if(
in_isTest
,find_in_set('test',notification_types)
,not find_in_set('test only',notification_types)

)
where
detected_at > now() - interval const_margin minute
and
ifnull(detected_at >sent_at+interval const_margin minute,true)
and
(now()<var_limit OR in_isTest)


group by notificationNbr;


END

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Function Does Not Exists -Yet it truly does
807
June 21, 2019 01:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.