我道歉,这可能是一个愚蠢的问题! 我创建了一个维护并运行一系列过程/函数的过程。 如果在任何过程中发生错误,则会向我发送电子邮件,并且设置了自动刷新参数,其中过程名称失败。 单个表包含所有过程(名称为varchar2)以自上而下的顺序运行并具有循环结构。 如何跳过使用select语句失败的过程以及获取失败的过程下的所有其他过程? 基本上我希望程序从它停止的地方开始,并继续运行所有其他程序的过程。 我会感激任何想法,因为我只是在学习。
UPDATE
对于那些困惑。 我需要一个SELECT语句,它根据where跳过行,并抓取第一行下面的所有其他行。 下面的基本伪代码...
SELECT procedure_name FROM table_whatever SKIP ROWS that procedure_status <> 'completed' AND grab all rows underneath WHILST keeping rows in proper order id procedure status 15 table_insert failed 16 table_update In Queue 17 email_completion In Queue我需要抓住失败的程序以及下面的所有内容。
有任何想法吗?
先感谢您!
I apologize, this may be a stupid question! I have created a procedure that maintains, and runs a series of procedures/functions. If error occurs on any procedure an email is sent to me, and an automatic refresh parameter is set with procedure name that failed. Single table houses all procedures (exact names as varchar2) to run in top-down order with looping structure. How can I skip to procedure that has failed with select statement along with grabbing all other procedures underneath procedure that has failed? Basically I would like the procedure to start where it has stopped, and continue the process of running all other procedures. I will appreciate any idea, because I am just learning.
UPDATE
For those confused. I need a SELECT statement that skips rows based on a where and grabs all other rows underneath first row. Basic psuedocode below ...
SELECT procedure_name FROM table_whatever SKIP ROWS that procedure_status <> 'completed' AND grab all rows underneath WHILST keeping rows in proper order id procedure status 15 table_insert failed 16 table_update In Queue 17 email_completion In QueueI need to grab failed procedure along with everything underneath.
Any ideas?
Thank you in advance!
最满意答案
我会咬,哎呀。 根据您上面的数据,假设只有一行的状态为“failed”,并假定过程采用“id”顺序:
SELECT procedure FROM table_whatever WHERE id >= (SELECT ID FROM table_whatever where status = 'failed') ORDER by id;I'll bite, what the heck. Based on your data above which assumes there can be only one row with a status of 'failed', and assumes procedures are in 'id' order:
SELECT procedure FROM table_whatever WHERE id >= (SELECT ID FROM table_whatever where status = 'failed') ORDER by id;SQL SELECT语句根据WHERE语句跳过行(SQL SELECT statement skips rows based on WHERE statement)我道歉,这可能是一个愚蠢的问题! 我创建了一个维护并运行一系列过程/函数的过程。 如果在任何过程中发生错误,则会向我发送电子邮件,并且设置了自动刷新参数,其中过程名称失败。 单个表包含所有过程(名称为varchar2)以自上而下的顺序运行并具有循环结构。 如何跳过使用select语句失败的过程以及获取失败的过程下的所有其他过程? 基本上我希望程序从它停止的地方开始,并继续运行所有其他程序的过程。 我会感激任何想法,因为我只是在学习。
UPDATE
对于那些困惑。 我需要一个SELECT语句,它根据where跳过行,并抓取第一行下面的所有其他行。 下面的基本伪代码...
SELECT procedure_name FROM table_whatever SKIP ROWS that procedure_status <> 'completed' AND grab all rows underneath WHILST keeping rows in proper order id procedure status 15 table_insert failed 16 table_update In Queue 17 email_completion In Queue我需要抓住失败的程序以及下面的所有内容。
有任何想法吗?
先感谢您!
I apologize, this may be a stupid question! I have created a procedure that maintains, and runs a series of procedures/functions. If error occurs on any procedure an email is sent to me, and an automatic refresh parameter is set with procedure name that failed. Single table houses all procedures (exact names as varchar2) to run in top-down order with looping structure. How can I skip to procedure that has failed with select statement along with grabbing all other procedures underneath procedure that has failed? Basically I would like the procedure to start where it has stopped, and continue the process of running all other procedures. I will appreciate any idea, because I am just learning.
UPDATE
For those confused. I need a SELECT statement that skips rows based on a where and grabs all other rows underneath first row. Basic psuedocode below ...
SELECT procedure_name FROM table_whatever SKIP ROWS that procedure_status <> 'completed' AND grab all rows underneath WHILST keeping rows in proper order id procedure status 15 table_insert failed 16 table_update In Queue 17 email_completion In QueueI need to grab failed procedure along with everything underneath.
Any ideas?
Thank you in advance!
最满意答案
我会咬,哎呀。 根据您上面的数据,假设只有一行的状态为“failed”,并假定过程采用“id”顺序:
SELECT procedure FROM table_whatever WHERE id >= (SELECT ID FROM table_whatever where status = 'failed') ORDER by id;I'll bite, what the heck. Based on your data above which assumes there can be only one row with a status of 'failed', and assumes procedures are in 'id' order:
SELECT procedure FROM table_whatever WHERE id >= (SELECT ID FROM table_whatever where status = 'failed') ORDER by id;
发布评论