Sunday, 17 April 2011

Query: Find scheduled or on hold concurrent requests


Query: Find scheduled or on hold concurrent requests

I've noticed a number of requests for finding scheduled concurrent requests via a single query. But there are various combinations of phase_code, status_code, hold_flag, requested_start_date, etc on the fnd_concurrent_requests table and others that determine the "real" Phase and Status as displayed in the View Requests form.
No worries, here's how we find the Scheduled Requests:
select request_id
from   fnd_concurrent_requests
where  status_code in ('Q','I')
and    requested_start_date > SYSDATE
and    hold_flag = 'N';
How about an all in one query? Note: this may not be complete, so any comments welcome! Also we limit to those requests submitted in the last hour.
select fcr.request_id
,      decode(fcr.phase_code
             ,'P',decode(fcr.hold_flag
                        ,'Y','Inactive'
                        ,fl_p.meaning
                        )
             ,fl_p.meaning
             ) phase
,      decode(fcr.phase_code
             ,'P',decode(fcr.hold_flag
                        ,'Y','On Hold'
                        ,decode(sign(fcr.requested_start_date - sysdate)
                               ,1,'Scheduled'
                               ,fl_s.meaning)
                  )
             ,fl_s.meaning
             ) status
from   fnd_concurrent_requests fcr
,      fnd_lookups fl_p
,      fnd_lookups fl_s
where  1=1
and    fcr.phase_code = fl_p.lookup_code
and    fl_p.lookup_type = 'CP_PHASE_CODE'
and    fcr.status_code = fl_s.lookup_code
and    fl_s.lookup_type = 'CP_STATUS_CODE'
and    fcr.request_date > sysdate - 60/1440
order by fcr.request_id desc;

36 comments:

Anonymous said...

This paragraph will assist the internet viewers for building up new
weblog or even a weblog from start to end.


Here is my blog; Abercrombie Fitch Belgique

Anonymous said...

Good day! This is my 1st comment here so I just wanted to give a quick shout out and tell you I
really enjoy reading through your articles. Can you suggest any other blogs/websites/forums that deal with the
same subjects? Appreciate it!

My blog - Evgeni Malkin Authentic Jersey

Anonymous said...

Hey I know this is off topic but I was wondering if you knew of any widgets
I could add to my blog that automatically tweet my newest twitter updates.
I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Also visit my blog post Air Jordan Pas Cher

Anonymous said...

Attractive part of content. I just stumbled upon your blog and in accession capital to claim that I acquire actually loved
account your blog posts. Anyway I'll be subscribing for your feeds or even I fulfillment you get entry to consistently rapidly.

Take a look at my website Mario Lemieux Authentic Jersey

Anonymous said...

I feel this is one of the so much significant information for me.
And i am glad studying your article. But want to statement on few
normal things, The website style is ideal, the articles is in reality nice :
D. Good process, cheers

Here is my web blog ... Michael Kors

Anonymous said...

of course like your website however you have to test the spelling on
several of your posts. Many of them are rife with spelling issues and I find it very troublesome to
tell the truth however I'll definitely come again again.

Also visit my webpage ... NFL Jerseys Wholesale

Anonymous said...

I was recommended this web site by my cousin.
I am not sure whether this post is written
by him as nobody else know such detailed about my problem.

You're amazing! Thanks!

Here is my site: Cheap NFL Jerseys

Anonymous said...

Wonderful beat ! I would like to apprentice while you amend your
site, how could i subscribe for a blog website? The account helped me a acceptable deal.
I had been a little bit acquainted of this your
broadcast provided bright clear concept

Feel free to visit my web blog: Wealthwayonline.com

Anonymous said...

I am regular visitor, how are you everybody? This post posted
at this site is actually nice.

Have a look at my web-site - Louis Vuitton Bags

Anonymous said...

This is very interesting, You're a very skilled blogger. I've joined your feed and look forward to seeking more of
your wonderful post. Also, I've shared your site in my social networks!

Here is my web-site explorethecapabilities.com

Anonymous said...

Excellent weblog here! Also your website loads up very fast!
What host are you the use of? Can I am getting your associate hyperlink for
your host? I desire my site loaded up as fast as yours lol

Feel free to surf to my web site Sidney Crosby Black Jersey

Anonymous said...

You have made some decent points there. I looked on the internet for
more information about the issue and found most individuals will go along with your views on
this website.

Also visit my site ... nfl jerseys cheap

Anonymous said...

Hey there! Someone in my Myspace group shared this site with us so I came to give it a look.
I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers!
Terrific blog and brilliant design and style.

Feel free to visit my homepage - www.wsmisports.com

Anonymous said...

Your style is very unique in comparison to other folks I have read stuff from.

Thank you for posting when you have the opportunity, Guess I'll just bookmark this site.

My webpage wealthwayonline.com

Anonymous said...

Post writing is also a fun, if you be acquainted with after that you
can write or else it is complex to write.

Here is my webpage ... nike air max

Anonymous said...

Hi to all, how is all, I think every one is getting more from this web page,
and your views are good designed for new visitors.


My web-site: Cheap NFL Jerseys

Anonymous said...

Hey there! Do you use Twitter? I'd like to follow you if that would be okay. I'm definitely enjoying your blog and look forward to new
updates.

my web blog - Louis Vuitton Handbags

Anonymous said...

It's actually very difficult in this busy life to listen news on Television, so I only use internet for that purpose, and get the most recent information.

Here is my web-site; Air Jordan

Anonymous said...

Hello there, just became alert to your blog through Google, and found that
it is really informative. I am gonna watch out for brussels.
I'll be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!

my web site - Abercrombie France

Anonymous said...

I do consider all of the concepts you have offered on your post.
They're very convincing and can definitely work. Nonetheless, the posts are very short for starters. May just you please extend them a bit from subsequent time? Thank you for the post.

My blog post; Michael Kors Outlet

Anonymous said...

Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you!
By the way, how can we communicate?

Check out my blog post; Air Jordan

Anonymous said...

It is truly a great and helpful piece of information.

I'm happy that you simply shared this helpful info with us. Please stay us informed like this. Thank you for sharing.

my blog; www.explorethecapabilities.com

Anonymous said...

Thanks for finally talking about > "Query: Find scheduled or on hold concurrent requests" < Loved it!

Feel free to visit my site :: wealthwayonline.
com

Anonymous said...

Howdy! Quick question that's totally off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone4. I'm trying to find a theme or plugin that might be able to correct this problem.
If you have any recommendations, please share. Cheers!

Feel free to surf to my web blog Louis Vuitton Outlet

Anonymous said...

Hello everybody, here every person is sharing these familiarity, therefore it's pleasant to read this weblog, and I used to pay a quick visit this webpage daily.

Here is my homepage: Abercrombie Pas Cher

Anonymous said...

Thanks for one's marvelous posting! I really enjoyed reading it, you might be a great author. I will remember to bookmark your blog and may come back later on. I want to encourage one to continue your great writing, have a nice day!

Here is my web page: Montre Guess

Anonymous said...

This article is really a fastidious one it assists new the web
viewers, who are wishing for blogging.

Here is my blog post ... Oakley Frogskins

Anonymous said...

Excellent post. I used to be checking constantly
this weblog and I am inspired! Very useful info particularly the final part :) I take
care of such information a lot. I was seeking this certain info for a very lengthy time.
Thank you and best of luck.

My site ... Sac A Main Louis Vuitton

Anonymous said...

Hey! I know this is sort of off-topic but I had to ask.
Does building a well-established website like yours require a large amount of work?
I am brand new to running a blog but I do write in my diary everyday.

I'd like to start a blog so I can share my own experience and feelings online. Please let me know if you have any kind of recommendations or tips for new aspiring bloggers. Thankyou!

Also visit my blog - Chaussure De Foot

Anonymous said...

Heya i'm for the primary time here. I came across this board and I to find It truly useful & it helped me out much. I hope to provide one thing back and aid others like you helped me.

Feel free to visit my webpage :: read More

Anonymous said...

When I originally commented I clicked the "Notify me when new comments are added" checkbox
and now each time a comment is added I get four e-mails with the
same comment. Is there any way you can remove me
from that service? Appreciate it!

Here is my site - Oakley Frogskins

Anonymous said...

Hi to every one, since I am truly keen of reading this blog's post to be updated regularly. It includes pleasant stuff.

my blog: Wholesale NFL Jerseys

Anonymous said...

My family always say that I am wasting my time here at web, however I know I am getting
familiarity everyday by reading thes nice articles or reviews.


Stop by my homepage; http://www.tedxyse.com/

Anonymous said...

Oh my goodness! Impressive article dude! Many thanks, However I am
experiencing difficulties with your RSS. I don't know why I can't join it.
Is there anyone else getting identical RSS issues?

Anyone that knows the solution can you kindly respond?
Thanx!!

Review my website website

Anonymous said...

Thanks for finally writing about > "Query: Find scheduled or on hold concurrent requests" < Liked it!

Here is my web page: Air Max

Anonymous said...

I am sure this piece of writing has touched all the internet users, its really really good paragraph on building up new web site.


Also visit my site: More hints