Join style old conversion to the new style a to

Hello
I have a query when multiple tables are join in the old style. If I know equivalents I find difficult to interpret query containing joins of old style. Could someone please ehelp convert me the following part of the new style join query?


SELECT AP. REGCODE,
AP.ID,
TYPEP. TYPENAME,
CASE
WHEN MAN. SUM6 = 0
THEN AP. SUMP1 * AP. PPER / 100
WHEN MAN. SUM6 = - 1
THEN AP. SUMP1 NVL (indx.indx, 1) AP. PPER / 100
WHEN MAN. SUM6 = - 2
THEN AP. SUMP1 * NVL (exp (SUM (ln (YIN. (IDX))), 1) * AP. PPER / 100
OF ANOTHER MAN. SUM6 * AP. PPER / 100
END AS SUMP1

ABONPEN AP,
TYPEMONTHS MAN,
TYPEPENS TYPEP,
YEARINDICES YIN,


(Indx SELECT NVL (EXP (SUM (Ln (IDX))), 1)
OF YEARINDICES
WHERE YEAR < 2012
) INDX

WHERE AP. REGCODE = "162".
AND AP.ID = '161853'
AND AP. TYPEID = TYPEP. TYPEID
AND AP. TYPEID = MAN. TYPEID
AND TYPE. YEAR = 2012
AND TYPE. MONTH = '01'
AND AP. BEGDATE < = TO_DATE ('01.01.2012 ',' DD.) MM YYYY')
AND (AP. ENDDATE > TO_DATE ('01.01.2012 ',' DD.)) MM YYYY')
OR ENDDATE IS NULL.)
AND YIN. Year (+) > = SUBSTR (TO_CHAR (AP. BEGDATE, 'dd.mm.yyyy'), 7, 4)
AND YIN. IDXYEAR (+) < '2012'


EDIT: I added the Select also part I think that if it is not necessary. I mean, old style join (+) and put all the join conditions in a WHERE clause. Is the new LEFT and RIGHT OUTER JOIN, INNER JOIN, FULL OUTER JOIN

Published by: Mikail February 13, 2012 23:18

Published by: Mikail February 14, 2012 12:08

Published by: Mikail February 14, 2012 00:09

Published by: Mikail February 14, 2012 00:09

Published by: Mikail February 14, 2012 12:10

Maybe something like this...

SELECT AP.REGCODE,
       AP.ID,
       TYPEP.TYPENAME,
       CASE
         WHEN TYPEM.SUM6 = 0  THEN AP.SUMP1 * AP.PPER / 100
         WHEN TYPEM.SUM6 = -1 THEN  AP.SUMP1 * NVL (indx.indx, 1) * AP.PPER / 100
         WHEN TYPEM.SUM6= -2  THEN AP.SUMP1 * NVL(exp(SUM(ln(YIN.IDX))), 1) * AP.PPER / 100
       ELSE TYPEM.SUM6 * AP.PPER / 100
       END AS SUMP1
FROM ABONPEN AP JOIN TYPEMONTHS TYPEM ON (AP.TYPEID  = TYPEM.TYPEID)
                JOIN TYPEPENS TYPEP ON (AP.TYPEID  = TYPEP.TYPEID)
          CROSS JOIN (SELECT NVL (EXP (SUM (Ln (IDX))), 1) indx
                      FROM YEARINDICES
                      WHERE YEAR < 2012
                     ) INDX
     LEFT OUTER JOIN YEARINDICES YIN ON (EXTRACT(YEAR FROM AP.BEGDATE) <= YIN.YEAR AND 2012 > YIN.IDXYEAR)
WHERE AP.REGCODE = '162'
AND   AP.ID      = '161853'
AND   TYP.YEAR   = 2012
AND   TYP.MONTHS = '01'
AND   AP.BEGDATE <= TO_DATE('01.01.2012','DD.MM.YYYY')
AND  (AP.ENDDATE > TO_DATE('01.01.2012','DD.MM.YYYY') OR AP.ENDDATE IS NULL)

I assumed that YIN. YEAR and YIN. IDXYEAR are numeric values.
You also don't seem to have any join condition for INDX, that is why it is a CROSS JOIN.

Tags: Database

Similar Questions

  • history of the conversations on the new computer

    Hello

    First of all, sorry for my bad English.

    I have a question about the history of the conversations in Skype.

    I joined Skype in 2009 from my old LAPTOP.

    I used Skype on laptop computer for all time.

    Today, I bought a new computer, I downloaded Skype and singed in.

    But I knew the history of the conversations did not save, and I want to see

    the story of my new computer, how can I do?

    Is there a way to copy the files of the conversation on my computer in the new Skype history?

    Thank you much, Noam.

    Hi, sahar5003, and welcome to the community!

    Courtesy of Ruwim and TheUberOverLord, please see this thread that explains in detail how to copy the data from your old computer to the new:

    http://community.Skype.com/T5/general-discussion/how-to-see-my-conversation-history-from-one-compute...

    Best regards

    Elaine

    __________________________________________________________________________________________________
    Your question has been answered? Please click on the link to accept as a Solutionfor everyone can quickly find what works! As a post or want to say, 'Thank You ' -? Click on the button of congratulations!
    Reliable information: Brian Krebs: 3 basic rules for online safety

  • Old iMac to the new iMac?

    I have posted before, but I am now ready to move from my 2007 24 ' iMac to a model of 5K of 2015. The old operating system is leopard (10.5.8) and the news is... most recent .the (Sierra). I was told to join the former backup disk, Time Machine USB 2.0 on my new computer before the first start and following the guests. Of course the software may not be compatible, but I would like to transfer as many files over the old machine to the new as possible so that I can remove the 24 ", or at least re - goal there.

    This is the best method. Should I add some steps of the process or do something else? I was aware of something special during this process? Please notify.

    Thank you!

    ~ Kort

    Congratulations Kort! Yes, that would be the best way. But this the first time you start your new Mac. After that, it will create a second home folder issue.

    Move your content to a new Mac - Apple Support

    BTW - I hate to disappoint you, but it will not come with Sierra, which is a beta version. It will come with El Capitan.

  • Impossible to copy old details in the new Firefox

    Long story short, I did not know Firefox Sync and my old installation of Windows is damaged due to a corruption of HD, and I reinstalled Windows on a new PC.

    I have Firefox installed on your new PC, and in the past I would just copy files as places.sqlite on the new profile and bookmarks would be restored, but that has not worked. In fact, I replaced each element (straight upward to copy and paste to replace the new files) of the old profile in the news, but when I reopen it firefox, this is still a new installation; no saved passwords, cookies, history, nothing.

    Any ideas?

    Have you tried to use the Profile Manager?

    • To start, press the Windows key + R
    • Type in firefox.exe - ProfileManager and click OK
    • Create a new profile and choose the folder that contains your backed up files
    • Close the Profile Manager and launch Firefox
  • Cannot move old profile to the new facility

    I need to move my FF profile for a new installation of FF on a new PC, but I can't get the profile to "stick".

    I tried to copy the files from the old profile into the new folder by default and the default editing the .ini to the game file, but it does not work. I tried to delete the new default profile and insert the old, but the default profile folder recreates itself. Where FF stores the new default profile number and how can I change it?

    I know that it is possible to move an existing to a new installation of FF profile, as I've done it before, but I can't make it work this time. What I am doing wrong?

    See the following articles:

    Check and tell if its working.

  • Firefox 8 ads make look it good with all the possibilities, but when installed it's like the old Firefox and the news is simply not there.

    Firefox 8 ads make it look good with all the possibilities. But when installed it's like the old Firefox and the news is simply not there. Why bother to install the most recent?

    Right-click the menu bar and uncheck the option menu bar.

  • reuse the license of Windows XP from the old office to the new office

    We have 4 old desktop computers with windows xp I want to reuse the license of Windows XP from the old office to the new office

    I bought a HP desktop computer and dell preinstalled with Windows XP. The office has not worked for a few years, he has the processor are P4 and slow work.

    I recently bought a desktop computer and wanted to know can I use the same license key to get Windows XP installed on my new desktop computer.

    Note: I have lost my original installation of windows CD but have the office and Windows XP product code is available to me.

    The old HP desktop and dell came with a license with the sticker on the side.

    Any PC which came with a sticker with a key to activate product on it has a license that is related to this PC (and only this PC) for ever. It is not legal to install on a PC using the key videos from another PC.

    If the PC you want to install XP on still has its sticker, then as much as you have a compatible installation XP CD, XP can be re-installed using the key on the sticker.

    Only commercial versions of XP can be moved from one PC to another. With the commercial versions, the activation key came with the media, not on a label stuck on the PC.

  • has got the biggest hard drive, can I transfer old install to the new drive?

    C: space too small

    My Windows XP Professional is installed on a 10 GB hard drive, there is little room left. I added an external drive more and would like to move the system to the largest disk. I don't have a installation disc. Can I transfer the system and applications to the new drive without losing any functionality and maybe use the old drive (C :) to store data.

    Its not so easy.  It is best to get rid of some of the files on the old drive and move the data files to the new drive.  Try to go first to start | Programs | Accessories | System Tools | Disk Cleanup.  Then you can move locations of various data, such as temporary Internet files (in Internet Explorer go to tools |) Internet Options | Settings and click the folder to move and which will move this place).  If you use OE, first back up your messages (see www.oehelp.com/OETips.aspx#6) and then put in place a new directory on the new drive to something like D:\OESTORE and then go to tools | Options | Advanced | Maintenance | Store the folder and click the button change and set it as the new location.  Then close and reopen OE (DO NOT MOVE MESSAGES yourself! as he will destroy them) and the location must be moved.

    For other space saver, try to do a backup on the new disk directory and copy all update backups that were made (the Blues subdirectories in the Windows directory) and the Windows\inf directory that you can completely roll over to the new drive for backup purposes and you may need to browse to it, if you install a new device , but which will save a lot of space. (the above two suggestions require that you go to control panel |) Folder options | View and activate display files and hidden folders, enable showing protected and OS files and disable the option Hide extensions of known file types).  Move also on other data such as images, documents, music to the new drive.

    So if you have lots of space on C, defrag it.

    But just copy through the old drive to the new and try to start on the new one is unlikely to work.

    Steve

  • Try to move the content from the old profile to the new profile of corrupt, but do not know what are the permissions to use

    I already followed the procedure to copy the files from the old profile to the new up to a certain point, but the "destination folder access denied" message for 9 elements.  When I go to change the permissions, I don't know which ones to use.  Any help would be much appreciated.  It took to run the computer all night and part of a day to get to this day it is so slow now.  Thank you.

    Discussions were merged.

    Duplicate deleted not.

    Kindly, don't start another pursuit of the Thread, you have already running on the same problem.

    ABSG dear,

    Welcome to the MSFT support community.

    Try to start your system in safe mode and disable/uninstall the game for now. If the uninstallation of this game is everything to normal, you will need to install it again. If this is not the case, try another solution.

    Create a new user profile and delete the two accounts as there is a high risk user accounts has been corrupted. Heads up here learn more on how you can fix a damaged user profile and create a new:

    http://Windows.Microsoft.com/en-us/Windows/fix-corrupted-user-profile

    Good luck!

  • How can I transfer my windows live mail FRO the old computer to the new?

    Original title: Live Mail

    I just bought a new computer, but I'm still using Windows 7. How can I transfer my old computer to the new Windows Live Mail?

    How import and export emails, contacts and calendars with Windows Live Mail?
    http://Windows.Microsoft.com/en-us/Windows-Live/Mail-import-backup-restore

  • I just bought a new computer and I was wondering that if I were to do something like unistall Creative Cloud/PS and LR to my old model to the new model I'd appreciate any help (real) Thanx Jimi

    I just bought a new computer and I was wondering that if I were to do something like unistall Creative Cloud/PS and LR to my old model to the new model I'd appreciate any help (real) Thanx Jimi

    Cloud license allows 2 activations http://www.adobe.com/legal/licenses-terms.html

    -Install on a 2nd computer http://forums.adobe.com/thread/1452292?tstart=0

    -Windows or Mac has no importance... 2 on the same operating system or 1 on each

    -Two activations may NOT be used at the same time (noted in the link above of the license)

    IF you won't use the old computer...

    Remove the license on a computer http://forums.adobe.com/thread/1442423?tstart=0 can help

    -read http://helpx.adobe.com/x-productkb/policy-pricing/error-maxium-acitvation-exceeded.html

    -or https://helpx.adobe.com/x-productkb/policy-pricing/activate-deactivate-products.html

  • transfer budget, fresh from the old project to the new project

    Hi all

    We cannot remove the subtasks that there are expenditures high on these tasks. IAM so plan to create a new project with budgetary imputation etc and transfer transactions from the old project to the new project.

    Can someone help me how to move the transactions from the old to the new.

    Thank you very much.

    OK thanks Neeta

  • I get to level my windows in Windows 7 PC.  My old PC had CS6, Bridge, and Lightroom installed 5.7.  I want to remove all three of the old and install the new.  How do I do that?

    I get to level my windows in Windows 7 PC.  My old PC had CS6, Bridge, and Lightroom installed 5.7.  I want to remove all three of the old and install the new.  How do I do that?

    First of all make sure you disable / disconnect in order to save the number of activations.

    Click the help menu, and then select disable / disconnect .

    Then you can uninstall in Control Panel uninstall process as normal.

    Later, you can download and install CS 6 app link below:

    Download Creative Suite 6 applications

  • I want to leave the old computer to the new computer. I have to do? (Ps + Lr)

    I want to leave the old computer to the new computer. I have to do? (Ps + Lr)

    It will be necessary to turn off Photoshop on your current computer to have your 2 licensed facilities. Lightroom is just a simple installation on the new computer. Here are the instructions on moving from Lightroom to a new computer:

    How can I move Lightroom to a new computer? Lightroom Queen

  • Can I install old Mac on the new iMac CS6 using apple migration Assistant

    Can I install old Mac on the new iMac CS6 using apple migration Assistant?

    You may be lucky, but you should expect problems if you do this.

    You must properly install your adobe software using the installation of adobe files.

    Downloads available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

Maybe you are looking for