Checking my Pivot Code please

I'll never cope with the pivot. May you check this code please guys...:
select * from archivebilled
pivot ( sum([month charge]) for [element code] in ('august','september','october','december'))
Incorrect syntax near august

Leave out the As clause.  Put the as alias in the Select statement.
select
[august] as Ageste
, [september] as Septe
,[october] as Ottobered
,[november] as Nove
.[december] as Dicombero
, * from archivebilled
pivot ( sum([element charge]) for [element code] in ([august]
,[september]
,[october]
,[november]
,[december] ) as ele
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

Similar Messages

  • Please check the below Cursor Procedure and correct that code Please

    Hai Every One.
    Please check the below code I have two issues in that code
    1. Invalid cursor
    2. Record must be enter
    Please correct this code and send me pls its urgent.I cont understand where i done mistake
    PROCEDURE fetch_detail_PROC IS
    cursor c1 is select * from quota_mast where quota_mast.divn=:quota_mast.divn and quota_mast.QUOT_tyPE=:quota_mast.QUOT_tyPE and quota_mast.INQNO=:quota_mast.INQNO;
    cursor c6 is select * from quota_det
    where quota_det.divn=:quota_mast.divn AND quota_det.QUOT_TYPE=:quota_mast.QUOT_tyPE and quota_det.enq_num=:quota_mast.INQNO
    ORDER BY quota_det.quot_no;
    --cursor c5 is select * from acc_mst where cdp=:quota_mast.ccdp and divn=:quota_mast.divn;
    --vn acc_mst%rowtype;
    i quota_mast%rowtype;
    detail1 quota_det%rowtype;
    BEGIN
         GO_BLOCK('quota_mast');
    for i in c1 LOOP
              :quota_mast.INQNO:=i.INQNO;
                        :quota_mast.DIVN:=i.DIVN;
                   :quota_mast.QUOT_NO:=i.QUOT_NO;
                        :quota_mast.quot_type:=i.quot_type;
                        :quota_mast.CCDP:=i.CCDP;
                        select nm into :QUOTA_MAST.PARTY_NAME from acc_mst where acc_mst.DIVN=:QUOTA_MAST.DIVN AND acc_mst.cdp=:ccdp;
                        :quota_mast.pak_for:=i.pack_for_PER;
                        :quota_mast.exc_duty:=i.exc_duty_PER;
                        :quota_mast.vat:=i.vat_PER;
                        :quota_mast.cst:=i.cst_PER;
                        :quota_mast.wct:=i.wct_PER;
                        :quota_mast.ser_tax:=i.ser_tax_PER;
                        :quota_mast.insu:=i.insu_PER;
                        :quota_mast.tot_tax:=i.tot_tax;
                        :quota_mast.tot_val:=i.tot_val;
                   :quota_mast.value:=i.value;
                                  next_record;
    end loop;
         first_record;
    GO_BLOCK('quota_det');
                   for detail1 in c6
              loop
                        :quota_det.quot_no:=detail1.quot_no;
              :quota_det.ENQ_NUM:=detail1.enq_num;
              :quota_det.item_code:=detail1.item_code;
              SELECT ITNM into :NM FROM itm_MST WHERE DIVN=:quota_mast.DIVN AND iCDP=:ITEM_CODE;
              :quota_det.price:=detail1.price;
              :quota_det.qty:=detail1.qty;
              :quota_det.DISC_PER:=detail1.DISC_PER;
                   next_record;
    END LOOP;
         first_record;
    close c6;
    --close c1;
    exception
    when others then
    message(sqlerrm);
    message(' ');
    END;
    Thank you..

    Oracle Forms is closely tied to the database meaning you can base your data blocks on your tables and Forms will handle fetching the data. I agree with Christian, your tables lend themselves to using a master - detail configuration and if you need to filter your block then you can use the Data Block WHERE Clause property.
    Please correct this code and send me pls its urgent.As to the urgency of your request, the forum is a community of "Volunteers." Enough said.
    Regarding your code, I see a several potential problems.
    First, how are your QUOTA_MAST and QUOTA_DET blocks synchronized? Are you using a block relationship? Are you using a combination of triggers to synchonize the QUOTA_DET block when you user navigates to a different record in the QUOTA_MAST block?
    Second, your Procedure name is "Fetch_Detail_Proc" but you are also fetching Master data as well. What is the purpose of your procedure and where do you call this procedure?
    Third, you're using SELECT * in your cursor queries. You should always explicitly name each column. What happens when your table changes and you need to search your code for a column that was dropped?
    Fourth, your cursor queries are referencing the same data blocks you are fetching data to populate. This gives the impression that you already have data in your block. This doesn't make sense - could you explain what you are trying to accomplish?
    Fifth, with respects to your code, the "Invalid Cursor" error (is this really the error you're getting?) is most likely caused by your explicit call to close the C1 cursor. As Andreas stated, when using a CURSOR FOR LOOP, the cursor is automatically opened, fetched and closed using this construct. There is no need to explicitly close the cursor, in fact - doing so will result in an invalid cursor error.
    As to the "Record must be entered" error, is sounds like you have required items in your block or your QUOTA_MAST block is not synchronized with your QUOTA_DET block, so when you attempt to navigate to a different block or record within your the same block the navigation cursor can't move because you haven't entered data that is required.
    Please tell us what you are attempting to do with this code so we can tell you if you are using the correct method.
    Craig...

  • Combo box and Check box..help with code please?

    Here is my problem...i have a list of check boxes and according to which one is checked, i need combo boxes to populate different choices.
    as an easy example im only using 2 check boxes and two combo boxes.
    the check boxes are named Choice 1or2 with export values of 1 and 2
    the Combo Boxes are named List A and List B..
    both containing options that say you checked box 1 and you checked box 2
    any help would be greatly appreciated

    Implode wrote:
    "Help with code please."
    In the future, please use a meaningful subject. Given that you're posting here, it's kind of a given that you're looking for help with the code. The whole point of the subject is to give people a high level idea of what KIND of help with what KIND of code you need, so they can decide if they're interested and qualified to help.
    Exception in thread "main" java.lang.NumberFormatException: For input string: "fgg"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at assignment1.Game.Start(Game.java:120)
         at assignment1.RunGame.main(RunGame.java:18)This error message is telling you exactly what's wrong. At line 120 of Game.java, in the Start method (which should start with lowercase "s" to follow conventions, by the way), you're calling Integer.parseInt, but "fgg" is not a valid int.

  • Why does it say my coupon code is "Invalid coupon code. Please check the coupon code and re-enter."

    When I enter my coupon code to get my serial number it says "Invalid coupon code. Please check the coupon code and re-enter." It is the correct coupon code. And I have just deactivated my lisence on my old computer.

    If you had not deactivated it on the old computer and it is a Windows machine there would have been a chance of getting it using Belarc Advisor
    (http://www.belarc.com/free_download.html).  I do not know if you can still do so.
    You can try contacting Adobe support via chat and see if they can help.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • Check on T-code vl02n

    There is a requirement that i have to put a check on T-code vl02n.
    If the status of that particular delivery doc is 'C' then if i change the quanity in the additional tab then it should not allow me to change the quantity as the status is 'C' and throw a message.
    But if the same delivery doc is reversed then it sholud allow me to change the quanity.
    Please help.
    Thanks in advance.
    Moderator message : Spec dumping is not allowed, search for available information.  Thread locked.
    Edited by: Vinod Kumar on Nov 3, 2011 3:33 PM

    Dear Consultant,
    SAP note 32654 explains why the system takes the account
    assignment at a higher level for automatically generated lines like
    small differences.  You should maintain an entry in OKB9 at a higher
    level than valuation area, profit center or business area.
    You should define a default value in OKB9 at company code level.
    This is the highest level and you have to enter a default value as the
    note 32654 describes. There are some circumstances where the system
    needs this high level default value, and it does not take the one
    defined at business area / valuation area / material (profit center)
    level.
    This particular problem with the system not being able to use
    the 'detailed' OKB9 assignment happens when the system creates
    an automatically generated line in a document. This is driven by
    the transaction key and is then linked to OKB9 by the G/L account
    defined for the transaction key. The most common transaction keys
    that are used in auto-generated lines are 'DIF' (small diff) and
    'KDR' (exchange rate).
    The system works as designed because in the above cases, it cannot
    decide from which material master it should take the profit center.
    I would suggest to either set up an default account assignment at a
    higher level (company code level), which is the first screen when
    you access OKB9.
    Please, let me know the results after changing the customizing
    settings accordingly.
    Kind regards,
    Dr. Ravi Surya Subrahmanyam. PhD (Finance),
    Senior Consultant,
    SAP’s Global Delivery Center,
    Answerthink India Ltd
    Hyderabad. India
    Phone :  +91 – 9848550024
    Mail : fico_rss at yahoo,com

  • How to check the tran code for specific activity.

    Hello friends ,
    could you please let me know how to check the tran code for specific activity . AS in table , i can check , what transaction does what ? But now i need to check the transaction for specific activity .
    E.g , For Administrator workbench , there is transcation like RSA1 .
    thanks in advance
    Regards

    Hi,
    try the TSTC table with SE16.
    Hope it helps,
    MG

  • Double Invoice check across company code

    Hi All,
    I have been trying to use the double invoice check functionality across company codes. i.e. when an invoice is posted in Company code A with ref no: xxx, and when I try to post a new inovice with the same reference ie. xxx in company code B, system does not give error message.
    Please note: I have maintained message in application F5, no: 117 and 312.
    Also in customization for double invoice check, I have unchecked "Check Company code" and checked "check reference" and "check invoice date"
    I have also maintained the double invoice check flag in the vendor master.
    Please help at the earliest.
    Regards,
    Ankush

    Hi Ankush,
    Good Day,
    Duplicate invoice check across company code will not check for FI related invoice ( Like FB60)
    But you can able to achive this with BTE ( SAMPLE_PROCESS_00001110 for FI Duplicate invoice check)
    Steps for Implementing a BTE
    (1)Goto transction FIBF menu Environment->Info System (P/S )
    (2)Select the BTE you want to implement.
    (3)Press button Sample function module
    (4)This brings you to SE37 - Copy the sample function module to a Z-function module (First create a new function group for the function module) . Note: The name of the Z-functionmodule is not important
    (5)Edit the code in the new function module
    (6)Go back to transaction FIBF - Menu Settings->Products -> Of a customer and create a new product whicj identifies the new product . Remember to mark the Active field.
    (7)Go back to FIBF menu Settings->P/S function modules->of a customer - Create an entry that links the BTE and Product with the new function module
    Best Regards,
    KSK

  • CODE PLEASE URGENT

    HI GEMS,
    PLEASE SEND ME THE CODE PLEASE ITS URGENT.
    The retrieval logic is to be used only for displaying the accounting and assessment year
    1) Accounting Year: GJAHR-(GJAHR+1)
    Assessment Year GJAHR1) – (GJAHR2)
    2) Get the following details from BSIS/BSAS
    BSIS/BSAS – BELNR
    BSIS/BSAS – DMBTR
    BSIS/BSAS – SHKZG
    Where
    BSIS/BSAS – GJAHR = P_GJAHR
    BSIS/BSAS – HKONT = (334551, 499001, 402001, 402002, 403000) and store them in an internal table INTAB1
    Summate the BSIS/BSAS –DMBTR and depict it in the first line of the table
    3) For the documents contained in the INTAB1 table check whether there are any line items posted to HKONT’s =(260501,260502,260503) and store them in an internal table INTAB2
    If yes then get the following fields from BSIS/BSAS table
    BSIS/BSAS – BELNR
    BSIS/BSAS – DMBTR
    BSIS/BSAS – SHKZG
    Where
    BELNR = INTAB2-BELNR
    GJAHR = P_GJAHR
    HKONT = (260501, 260502 and, 260503)
    SHKZG = “H”.
    Summate the BSIS/BSAS – DMBTR and depict against second line item and fourth line.
    4) Subtract line1 and line2 and depict against the 3 line.
    5) Subtract the DMBTR of 4th line from the 2nd line DMBTR and depict against the 5th line item.

    select BELNR DMBTR SHKZG
    from BSIS
    into itab
    Where
    GJAHR = P_GJAHR and
    HKONT in (334551, 499001, 402001, 402002, 403000).
    data s1 type i value 0.
    loop at itab.
    s1 = s1 + itab-dmbtr.
    endloop.
    Read itab where index = 1.
    itab-dmbtr = s1.
    append itab.
    clear s1.
    If itab1[] is not initial.
    select BELNR DMBTR SHKZG
    from BSIS
    into itab2
    Where
    BELNR = INTAB2-BELNR and
    GJAHR = P_GJAHR and
    HKONT in (260501, 260502 , 260503) and
    SHKZG = “H”.
    endif.
    data s2 type i value 0.
    loop at itab2.
    s2 = s2 + itab2-dmbtr.
    endloop.
    read itab2 where index =2.
    itab2-dmbtr = s2.
    append itab2.
    read itab2 where index =4.
    itab2-dmbtr = s2.
    append itab2.
    clear s2.

  • Exits for XD02 - Checking of Tax Code

    Hi,
    Is there any user exit, enhancement or screen exit for XD02, for tab Control Data? Specifically for checking of Tax Codes.
    Thanks,
    Yanne

    Hello friend,
    please check the liknk then u can ur self find the exit.
    Re: User Exit for MM01
    if ur find exit with description u can  write the code there.
    or small advice to keep break-point and  run the tcode and check wheater its triggring......
    Thank u,
    santhosh

  • My macbook is blocked by pin code, please help, I dont know what to do!

    My macbook is blocked by pin code, please help, I dont know what to do!

    When you enter iTunes on the PC and the iPod icon pops up, right click on it and select "Options". Then click on the Music tab. Once you're in the Music tab check the box that says "Enable Disc Use". This means that you've just turned your iPod into a portable hard drive. Click "Ok" and move your iPod from the PC to the Mac. From there, your iPod should show up on the Mac's desktop right under the Hard Drive icon. Click "File" at the top of the screen and select "Add to Library". Find the iPod hard drive in the selection screen and choose the music folder that's on it. Then just click Ok and all your music will be downloaded. That should do the trick, but you might want to do a Google search on the subject to get a second opinion. Best wishes!

  • Check Register - T.code FCHN - ZReport

    Dear Friends,
    I am a Functional Consultant.
    The user wanted to have more fields on the standard Report Check Register - T.code FCHN.
    So, I checked and found the tables PAYR,EKPO,EKKO,BSEG and related fields necessary for the development of the report.
    My ABAPER is asking, how to link all the tables and what is the logic.
    Please advise how to proceed?
    Regards
    MSReddy

    Dear Friends,
    What you say is correct. But that ABAPer  who is regular employee is the blue eyed boy of the IT Dept Head and i am only a consultant.
    So, I have to find the tables,logic and he writes the code.
    Sad, but true.
    Please suggest solution to the query posted.
    Regards
    MSReddy

  • HT1212 my screen is broken, it comes up with this message when I am trying to connect to itunes to get my pictures off. I cant even see the screen let alone enter a code, please help :(

    my screen is broken, it comes up with this message when I am trying to connect to itunes to get my pictures off. I cant even see the screen let alone enter a code, please help

    Can you tell if the screen is still functional?
    I assume you've entered the password many times, so if it's possible, turn on the iPhone and picture where the unlock slider is, then where the keyboard is.  You might be able to enter the password.  If you can hear keyboard clicks, it should work.
    If not, check out this thread:  http://discussions.apple.com/thread/5044081?start=0&tstart=0
    Cheers.

  • Unvoid the checks through T.Code:FCHG

    Dear All,
    our client has voided some checks through T.Code:FCH3, now they would like to unavoid those checks through T.code:FCHG, but system is not allowing us to unvoid.
    We have tried to create the same scenario in our test client, it is observed that T.code:FCHG(Unvoid checks) will be work of check void(cancelled) through T.code:FCH9(Void checks).
    If any check void through T.Code:FCH3, and try to do unvoid those checks system is not allowing to unvoid through T.Code:FCHG.
    Please let us know, is there a way to unavoid the checks which are cancelled through FCH3.
    Thanks in advance.
    Regards,
    Prasad

    Hi,
    Thanks for your help. We were able to resolve this issue through T.Code:FCHE.
    Regards,
    Prasad

  • I have a compilation problem with my mini iPod that is preventing my volume from increasing. I can't get the compilation code, please help me

    MY mini iPod version number1.1.3 pc robs iPod ,4GB is having volume limit problem ,the volume is very low compare to how it was playing before I mistakenly touch the combination code. I have forgotten the combination code, please help me out.. I have tried to reset settings but it wouldn't work.

    i can get the combination code please

Maybe you are looking for

  • Issue in counting open invoices

    Hi All, I am facing an issue which could be common but i am getting the correct count for open invoices. We have following scenario : Assume, we are loading an invoice(INV1) which was open(determined by item status = O) yesterday and loaded the same

  • Adapter module to read excel file -java code required for PI 7.1

    Hi PI experts, I am working on PI 7.1 SP 08. I am trying to develope an adapter module to read excel file http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns but here in this wiki , given java cod

  • "None of the fact tables are compatible with the query request"

    Hi guys, I have a weird issue. Previously fine working Subject area started to give this error after migration. The issue is happening when I select a column from dimension and try to display it. Also, I can't get to the list of values in filter I ge

  • Use .so file in java

    Hello friends... i have dont coding in java (windows based) no i want to use .so file in java... can i use it in java because c++ coding is done in linux and .so file is generated.. So can i use directly .so file in java (windows based). Please give

  • ISE: how to use/analyze monitoring backups

    Is there a tool or any instructions on how to view/analyze the data contained in the scheduled monitoring Backups? (filename.tar.gpg), I have tryed to decrypt it with gpg4win but the operation result is an empty folder... thanks in advance