Want to join three views..Please help me

Dear Dude,
I have created three views. I have to join these three views. Please help me in this regard.
First view
CREATE OR REPLACE FORCE VIEW KPR
AS
(SELECT distinct CUREPRESS,
PRODUCTIONCODE,
SUM(SCHEDULE1+SCHEDULE2+SCHEDULE3) AS QTY
FROM ORGCURESCHEDULEDAY
GROUP BY CUREPRESS,
PRODUCTIONCODE
second view
create or replace view orgstartdt_vw as (
SELECT distinct A.CUREPRESS, A.PRODUCTIONCODE, B.QTY,MIN(A.YYYYMMDD) AS STARTDATE,
CASE
WHEN A.SCHEDULE1 = 0 AND A.SCHEDULE2 = 0 AND A.SCHEDULE3 >0 AND ROUND(30-A.SCHEDULE3/A.CURECAPACITY*24,0)>24 THEN
          ROUND(30-(A.SCHEDULE3/A.CURECAPACITY*24),0)-24
WHEN A.SCHEDULE1 = 0 AND A.SCHEDULE2 = 0 AND A.SCHEDULE3 >0 AND ROUND(30-A.SCHEDULE3/A.CURECAPACITY*24,0)<=24 THEN
          ROUND(30-A.SCHEDULE3/A.CURECAPACITY*24,0)
WHEN A.SCHEDULE1 = 0 AND A.SCHEDULE2 >0 AND A.SCHEDULE3 >0 THEN
ROUND(22-A.SCHEDULE2/A.CURECAPACITY*24,0)
WHEN A.SCHEDULE1 > 0 AND A.SCHEDULE2 >0 AND A.SCHEDULE3 >0 THEN
ROUND(14-A.SCHEDULE1/A.CURECAPACITY*24,0)
END startdate1
FROM ORGCURESCHEDULEDAY A,KPR B
WHERE A.PRODUCTIONCODE=B.PRODUCTIONCODE
AND A.CUREPRESS=B.CUREPRESS
GROUP BY A.CUREPRESS,A.PRODUCTIONCODE,B.QTY,A.SCHEDULE1,A.SCHEDULE2,A.SCHEDULE3,A.CURECAPACITY)
ORDER BY MIN(A.YYYYMMDD)
Third view
CREATE OR REPLACE VIEW ORGENDDT_VW AS (
SELECT distinct A.CUREPRESS, A.PRODUCTIONCODE, B.QTY,MAX(A.YYYYMMDD) AS ENDDATE,
CASE
WHEN SCHEDULE1> 0 AND SCHEDULE2> 0 AND SCHEDULE3>0 AND ROUND(22+SCHEDULE3/CURECAPACITY*24,0)>24 THEN
          ROUND(22+(SCHEDULE3/CURECAPACITY*24)-24,0) --(INCREMENT DATE BY 1)
WHEN SCHEDULE1 = 0 AND SCHEDULE2= 0 AND SCHEDULE3>0 AND ROUND(22+SCHEDULE3/CURECAPACITY*24,0)<=24 THEN
          ROUND(22+SCHEDULE3/CURECAPACITY*24,0)
WHEN SCHEDULE1> 0 AND SCHEDULE2>0 AND SCHEDULE3=0 THEN
ROUND(14+SCHEDULE2/CURECAPACITY*24,0)
WHEN SCHEDULE1> 0 AND SCHEDULE2=0 AND SCHEDULE3=0 THEN
ROUND(6+(SCHEDULE1/CURECAPACITY*24),0)
END ENDDATE1
FROM ORGCURESCHEDULEDAY A,KPR B
WHERE A.PRODUCTIONCODE=B.PRODUCTIONCODE
AND A.CUREPRESS=B.CUREPRESS
GROUP BY A.CUREPRESS,A.PRODUCTIONCODE,B.QTY,A.SCHEDULE1,A.SCHEDULE2,A.SCHEDULE3,A.CURECAPACITY)
ORDER BY MAX(A.YYYYMMDD) desc
Please help me in this regard..!!
Regards
KPR

Hi Balaji,
Thanks for your prompt reply. The exact scenario is ..!!
I have curepress, productioncode,date (in yyyymmdd format).
1. I have to find out total qty for each productioncode,curepress. total qty means sch1 + sch2 + sch3. I have these columns also.
2. I have to findout startdate (min. date) for every curepress,productioncode.
3. I have to findout enddate (max. date) for every curepress,productioncode.
Based on these scenarios, I have implemented three views. But I am not getting proper result. because, first view having 501 rows. So, I have to get 501 start date rows, 501 enddate rows also. but second and third views are giving more rows.
please help me...!!
regards
KPR

Similar Messages

  • I want to cancel my subscription, please help me!

    I Want to cancel my subscription because it didnt do what I expected to do, please some help me!

    Oh ok. I tried doing so, but i couldn't, is there anyway you can explain me how to do it? A link or a video where It's explained. Thank anyways
    Att: Jhordy Alberto Garcia Díaz
    El 19/08/2014, a las 18:32, "Sara.Forsberg" <[email protected]> escribió:
    I want to cancel my subscription, please help me!
    created by Sara.Forsberg in Adobe ExportPDF - View the full discussion
    Hi Jhordy,
    Oh, I see! You purchased your subscription through the App store, that's why Adobe doesn't have record of it. You need to go through the App store to cancel/refund your subscription.
    I apologize for the inconvenience.
    Best,
    Sara
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6656327#6656327
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe ExportPDF by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • I have forgotten my password for iPod Touch 4G and it is now disabled. I tried connecting to iTunes but i haven't synced before and i need to enter the password before i can back it up so i can restore it. I don't want to lose pictures so please help!

    I have forgotten my password for iPod Touch 4G and it is now disabled. I tried connecting to iTunes but i haven't synced before and i need to enter the password before i can back it up so i can restore it. I don't want to lose pictures so please HELP!

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased. That is how it works
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • My ipod touch is in DFU mode 5g I need help, do not want to lose my data, please help in Spanish

    I need help, do not want to lose my data, PLEASE HELP IN SPANISH

    Una vez que el dispositivo está pidiendo ser restaurado con iTunes ... ya es demasiado tarde para salvar nada ... y usted debe continuar con la recuperación de ...
    Vea aquí> http://support.apple.com/kb/HT1808
    Es posible que tenga que probar más de una vez ... Asegúrese de seguir todos los pasos ...
    Tómese su tiempo ... Preste especial atención a los pasos 3 y 4.
    Para minimizar la pérdida ...
    Después de haber recuperado su dispositivo ...
    Re-sincronizar su contenido o restauración de la última copia de seguridad ...
    Restaurar desde copia de seguridad> http://support.apple.com/kb/ht1766
    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    To minimise loss...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • In iOS 5 on the iphone 3gs, how does one disable voice control, not voice dailing.  I have never wanted or used voice control please help me disable it.

    In iOS 5 on the iphone 3gs, how does one disable voice control, not voice dailing.  I have never wanted or used voice control please help me disable it. 

    are you talking about voiceover where the phone is reading things out loud to you? you have to double tap things in voiceover in order to select them. you'll need to go to settings > general > accessibility > and turn off voiceover there

  • I want to delete my account, please help me!

    I want to delete my account, please help me!

    Hi Céliine,
    It looks like you are all set! Your account has been canceled.
    If not, just let me know.
    Kind regards, Stacy

  • Hello am using mac book pro ,recently i updated  my computer to OS X MAVERICKS ,where my launch pad in my dock is slow,when i move the track pad to next page in launch pad ,it is very slow ,it takes two to three swipes ,please help me

    hello am using mac book pro ,recently i updated  my computer to OS X MAVERICKS ,where my launch pad in my dock is slow,when i move the track pad to next page in launch pad ,it is very slow ,it takes two to three swipes ,please help me

    Hey rajafromind!
    I have an article here that can help you troubleshoot this issue:
    OS X Mavericks: If graphics-intensive tasks slow down your Mac
    http://support.apple.com/kb/PH13952
    The following article may also have some helpful information for you:
    OS X Mavericks: If your Mac runs slowly
    http://support.apple.com/kb/PH13895
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?, What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?

    What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?, What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?

    What are you talking about? What is annemen? Clarify.

  • HT204411 you have rentals that have not expired. what does that meen?i just want to change the country please help

    you have rentals that have not expired. what does that meen?i just want to change the country please help

    I have the same problem

  • When i use the mail on my i phone and outlook simultaneousaly, the outlook does not download emails and says "account already being accessed", i want both to work together, please help.

    when i use the mail on my i phone and outlook simultaneousaly, the outlook does not download emails and says "account already being accessed", i want both to work together, please help.

    This is the ipod touch forum

  • Have used firefox for 3 years, have a new computer now and every time I go into my normal places I get a warning about encrypted page and third party viewing, please help!

    I have used Mozilla Firefox for 3 years with no issues. I have now purchased a new laptop (Samsung) and cannot access my regular sites (like Windows Live or my banking, most everything) without getting a Yellow waring arrow stating that I am going into an encrypted page and third parties are able to see what I am doing. I am very concerned if others are having access. My bank says it has nothing to do with them...it is an https secure site. I still have major concerns, please help!

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

  • Can't join group calls, please help.

    The subject, whenever I try to join group calls I get my friends' names, profile pictures, and a loading/connecting sort of animation shown in the attachment, and then I don't even join the call, it just closes and skype stops showing the people in the call. I can call my friends individually just fine, but whenever I try to join the group call, it doesn't even let me in for a second.
    Attachments:
    ss (2014-07-22 at 04.40.17).jpg ‏1 KB

    Nice how this was already known 5 months ago (and maybe more, I didn't search)
    community.skype.com/t5/Windows-desktop-client/Skyp​e-does-not-want-to-join-group-calls-at-all/m-p/396​...
    AND YOU DIDN'T MOVE A FINGER TO FIX THIS FU CKING ANNOYING BUG.
    As I've said in that post, your ridiculous fix didn't work, and I have to ask call creator to close call for everyone and create a new one everytime I need to rejoin it.
    Do the work you're paid for, please.

  • How to display grid lines in list view please help

    Hello,
    What should I do if I would like do display grid lines in list view. I've read related topics but I stil don't know how to do it. I use Sharepoint Designer. Please help
    Regards

    Hi,
    You need to modify default XSLT of listview webpart. Open your page in designer and use below jquery.
    <!–ADJUST TABLE COLUMN WIDTH–>
    <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js“></script>
    <script>
    $(function(){
    $(“tr.ms-viewheadertr th:contains(‘Title’)”, “#MSO_ContentTable”).css(“width”, “50px”);
    $(“tr.ms-viewheadertr th:contains(‘Assigned To’)”, “#MSO_ContentTable”).css(“width”, “300px”);
    </script>
    Check this for more info about steps:
    http://jshidell.com/2010/09/19/adjusting-sharepoint-list-columns-using-jquery/
    You can also look into this MSDN article for more customization:
    http://msdn.microsoft.com/en-us/library/ff630941.aspx#odc_sp14_qn_UsingSharePointDesigner2010WorkwithWebParts_CreateXSLTListViewWebPart.
    Hope it could help
    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

  • It shows me that I need to install missing plugins when I click on it it shows that I don't have any missing plugins i reinstalled it three times please help me

    I had a problem opening tumblr so i reinstalled firefox and now whenever open a website it show a bar says additional plugins are required to display all the media on this page then i click on the button next to it that says install missing plugins and it says no suitable plugins are found please please please help me as soon as you can i love firefox but now using it is too hard .

    Hi abudardaa, I can only think of one plugin that nearly every page requires...
    Do you have the Flash player installed and enabled? You can test on Adobe's page here:
    http://www.adobe.com/software/flash/about/
    Could you also try Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode" (''not'' Reset)
    Any difference?

  • I don't want any themes!! please help me.

    is there a way to not have any theme and let the dvd start directly from the content(movie) when inserted to a dvd player by using idvd?
    to prevent confusion(run-on sentence):
    1. dvd inserted to a dvd player.
    2. movie is starting.
    * no theme, no title screen, no separate button pressing for play and arrows, but just the movie.*
    if it is a possible task in idvd, please teach me.
    if not, please tell me the software that allows this(freeware the better).
    postscript, i'm not trying to be a weirdo. i need to do this for a theater work.
    please help me.

    Hi Kim
    In iDVD 5 this was simple. I tried in iDVD 6 and got a DVD that plays OK
    in my Mac but not on stand alone DVD players.
    The way in iDVD 5 was to make a fake like this.
    way 1. You must have a theme so I made a black photo and selected a theme
      with no background music.
    ◊   Drop the black photo into the box for background
    ◊   Delete all button and text's.
    ◊   go to the button under the theme window with small line connected boxes
    ◊   now You have two boxes connected with a line in the theme window'
    ◊   drop Your movie (project icon) into the upper left on.
    ◊   Ready to test, make a disk image and burn
    way 2. Record back Your movie to a new miniDV tape.
    ◊   Start iDVD and make a OneStep DVD.
    Probably this works for iDVD 6 too but when I tested way 1 (without doing
    a black menu) it didn't as I intended.
    Yours Bengt W

Maybe you are looking for