Error in SUM: MAIN_NEWBAS/XPRAS_AIMMRG: Syntax Error in SAPLSUU6

Pinging Boris Rubarth on what looks to be a minor bug with SUM 1.0 SP12 patch 12. The symptoms and resolution are pretty much identical to that described in Note 2093666 (Syntax Error in SAPLSUU6), except that according to the Note the error was corrected with SUM sp12 patch 6.
The upgrade stopped with a number of errors in phase MAIN_NEWBAS/XPRAS_AIMMRG, essentially that job RDDEXECL terminated for post-import methods:
/SAPSRM/PDO_MD_L_U_AFTER_IMP_I for /SAPPSSRM/CTRL
/SAPSRM/V_SWITCH_AFTER_IMPORT for /SAPSRM/V_SWITCH
/SAPPSSRM_BASE_AFTER_IMP for /SAPPSSRM/VC_HT
/SAPSRM/PDO_MD_L_U_AFTER_IMP for /SAPSRM/V_ITPRO
Digging into the job logs for RDDEXECL I saw that it was short dumping due to a syntax error in program SAPLSUU6, include LSUU6TOP: Type VSUSR_USBAPILINK is unknown. This is just as described in the Note.
The Note says that in SUM SP12 with a patch level earlier than 6, the fix is to logon to client 000 as DDIC and execute report RSSCD_CHECK_GEN to regenerate change documents, then repeat the phase. With SUM SP12 patch 6 or greater, simply repeating the phase should fix it.
Repeating the phase alone did not fix it, but running RSSCD_CHECK_GEN did. This was on patch 12, currently the latest. So, the workaround/fix from the Note still works, but the bug seems to still exist in SUM for a few of these after-import methods.
This was an upgrade from SRM 5.0 to SRM 7.02 sps14 (i.e., including Basis 731 sp14). I ran SUM in 'Single System' Mode. The platform is Windows 2012 R2, SQL Server 2012 sp2 cu5.
Otherwise, everything ran well. There was another slight hiccup in the same phase (after I resolved the one above) in which 'example' BAdI implementations are activated by the upgrade, but I think this might be more specific to SRM.
Note to everyone else -- the discussion is not marked as a question because I have in fact resolved the issue for my system as described and moved on (the upgrade is complete and successful).
Cheers,
Matt

Oops, there is one other small bug. The feedback form doesn't seem to exist. Clicking the link on the 'summary' page of the tool opens the URL http://<host>:4239/eval/EvalForm.html but results in a "Not Found" error.

Similar Messages

  • ECC 6.0 EHP4 upgrade to EHP5 fails in MAIN_NEWBAS/XPRAS_AIMMRG

    from SAPehpi.log
    CURRENTPHASE MAIN_NEWBAS/XPRAS_AIMMRG
    ...started at 20110825140601
    ...begin processing at 20110825140601
    ..times self: 0.080000/0.150000 usr/sys, children 0.560000/0.450000 usr/sys.
    ..finished at 20110825140820 with status UNRESOLVED REQUESTS IN BUFFER.
    Error message set: 'Unresolved requests in buffer UT1
    Check logfiles 'XPRASUPG.ELG' and '/usr/sap/putUT1/EHPI/abap/log/SAPehpi.ECO''
    ...begin dialogue at 20110825140821
    from SAPehpi.ECO
    EXECUTING /usr/sap/UT1/SYS/exe/run/tp (/usr/sap/UT1/SYS/exe/run/tp) pf=/usr/sap/putUT1/EHPI/abap/bin/XPRASUPG.TPP put
    UT1
    This is /usr/sap/UT1/SYS/exe/run/tp version 380.03.36 (release 720, unicode enabled)
    Warning: Parameter INTERRUPT is no longer used.
    Warning: Parameter DAYLIGHT_SHUTDOWN is no longer used.
    Warning: Parameter WITH_TACOB is no longer used.
    Warning: Parameter IMPDP_BY_EVENT is no longer used.
    Warning: Parameter INTERRUPT is no longer used.
    Warning: Parameter DAYLIGHT_SHUTDOWN is no longer used.
    Warning: Parameter WITH_TACOB is no longer used.
    Warning: Parameter IMPDP_BY_EVENT is no longer used.
    Warning: Parameter DBCONFPATH is no longer used.
    Looking for effective putsteps ... ... ready (looking for putsteps)
    ERROR: stopping on error 12 during EXECUTION OF REPORTS AFTER PUT
    stopping on error 12 during EXECUTION OF REPORTS AFTER PUT
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 12
    WARNS: Highest tp internal warning was: 0118
    tp finished with return code: 12
    meaning:
      A tool used by tp aborted
    Process with ID 4903 terminated with status 12
    from XPRASUPG.ELG
      LIST OF ERRORS AND RETURN CODES  *******
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    XPRA ERRORS and RETURN CODE in SAPR702XPRA00000005.UT1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1AETR012XProgram terminated (job: "RDDEXECL", no.: "14071100")
      Long text:
        Cause
          Program "&V#&", which was started in the background, was terminated
          abnormally.
        System Response
          The system created a job log for the terminated program.
        What to do
          Proceed as follows:
          Log onto the system in which the program was executed. The system is
          specified at the beginning of the transport log.
          Then call transaction SM37 to display the job log.
          Enter "&V#&" as job name and "DDIC" as user name.
          Restrict the starting date to the starting date specified in the
          transport log.
          For the other selection criteria, select only jobs with the status
          "cancelled". Then press <LS>Execute</>.
          A list of the jobs satisfying the selection criteria is displayed.
          You can display the log by pressing <LS>Job log</>.
          If the list contains several jobs, you can select the job with the ID "
          &V#&" with <LS>Display</> -> <LS>Job details</> or define further
          details for the selection criteria in the initial screen of transaction
          SM37.
            If the ABAP processor reports cancellation, double-clicking on the
          corresponding message in the job log branches to the display of the
          corresponding short dump.
    1AEPU320 See job log"RDDEXECL""14071100""UT1"
    1 ETP111 exit code           : "12"
    >>> PLEASE READ THE REPORT DOCUMENTATION OF THE REPORTS MENTIONED ABOVE <<<
    XPRAs are application reports that run at the end of an upgrade.
    Most XPRA reports have a report documentation that explains what
    the report does and how errors can be corrected.
    Call transaction se38 in the SAP system, enter the report name,
    select 'Documentation' and click the 'Display' button.
    >>> The problematic XPRAs are mentioned in messages of type PU132 above <<<
    <end of logs>
    I have searched for ST22 logs and i got a syntax error on program  CL_PROXY_STYLESHEET_RUNTIME.
    Upgrade 702 has added a segment in the DELETE_CLASS of the program above:
    delete from sproxxsl
         where class  = class and method = <sproxxsl>-method and client = <sproxxsl>-client.
    before:
    delete from sproxxsl
         where class  = class and method.
    "client" field is not part of table SPROXXSL. Which is causing the error.
    Any idea on how to continue???
    The choices now are:
    01)  *  Repeat phase MAIN_NEWBAS/XPRAS_AIMMRG to continue at the point it stopped
    02)  -  Initialize phase MAIN_NEWBAS/XPRAS_AIMMRG to restart it from the beginning
    03)  -  Accept non-severe errors and repeat phase MAIN_NEWBAS/XPRAS_AIMMRG
    04)  -  Exit this program
    Edited by: Rainier Sison on Aug 29, 2011 2:21 PM
    Edited by: Rainier Sison on Aug 29, 2011 2:22 PM
    Edited by: Rainier Sison on Aug 29, 2011 2:23 PM

    Well, I did have a similar issue with RDDEXECL during the import of SAPKB71007.
    The solution at that time was updating the kernel to the latest support level, that was released a few weeks after the error with a special modification to fix 'our' issue. 
    Do you think it's possible to change the kernel on the shadow instance at this moment of EHPI execution?
    Hope this helps
    Best Regards
    Francisco
    Edit: The OSS note was:          1551400 - ABAP: Session abort when compiling a deep constant
    Edited by: Francisco José Martínez Carretero on Aug 29, 2011 4:54 PM

  • Phase MAIN_NEWBAS/XPRAS_AIMMRG were negative!sta

    Dear Expert,         we are upgrade my system from ERP 6.0 to ERP 6.0 EHP 7. we are now in stage of execution phase MAIN_NEWBAS/XPRAS_AIMMRG but we received the following error:-
    Checks after phase MAIN_NEWBAS/XPRAS_AIMMRG were negative!
    Last error code set: Detected 3 aborted activities in 'XPRASUPG.ELG'<br/> Calling 'E:\usr\sap\UPG\DVEBMGS00\exe/tp' failed with return code 12, check E:\SUM\abap\log\SAPup.ECO for details
    ERROR: Detected the following errors:
    # E:\SUM\abap\log\SAPR740XPRA90000135.UPG:
              2 EPU114XXPRA "RS_PERS_XPRA_1" has already been executed in a previous step
              3 ETP000
              3 ETP000 **************************************************
              3 ETP000
              2 EPU115XReport "RS_TCO_ACTIVATION_XPRA" started: "20140417071810"
              1AETR012XProgram canceled (job "RDDEXECL", number "07180600")
              1AEPU320 See job log"RDDEXECL""07180600""UPG"
    Trouble Ticket Generation
    A trouble ticket and an archive with all relevant log files have been generated. Trouble ticket: "E:\SUM\abap\log\SAPup_troubleticket.log" Log archive: "E:\SUM\abap\log\SAPup_troubleticket_logs.sar"
    and we received option as in the picture:
    Kindly aid us to fix this issue.
    Regards
    Said Shepl

    Dear Gaurav,
            Thanks about reply.
    this is the log file XPRASUPG.ELG
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    XPRA ERRORS and RETURN CODE in SAPR740XPRA90000135.UPG
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 EPU114XXPRA "RS_PERS_XPRA_1" has already been executed in a previous step
    3 ETP000
    3 ETP000 **************************************************
    3 ETP000
    2 EPU115XReport "RS_TCO_ACTIVATION_XPRA" started: "20140417071810"
    1AETR012XProgram canceled (job "RDDEXECL", number "07180600")
    1AEPU320 See job log"RDDEXECL""07180600""UPG"
    1 ETP111 exit code           : "12"
    >>> PLEASE READ THE REPORT DOCUMENTATION OF THE REPORTS MENTIONED ABOVE <<<
    XPRAs are application reports that run at the end of an upgrade.
    Most XPRA reports have a report documentation that explains what
    the report does and how errors can be corrected.
    Call transaction se38 in the SAP system, enter the report name,
    select 'Documentation' and click the 'Display' button.
    >>> The problematic XPRAs are mentioned in messages of type PU132 above <<<
    and this is the picture for Upgrade selection:-

  • XPRAS_AIMMRG phase ended with error during SCM7.0 EHP to 7.02

    Hi,
    We are performing SCM EHP upgrade from 7.0 to 7.02.
    In execution phase XPRAS_AIMMRG failed with error.
    Environment details:
    OS : HP-UX 11.31
    DB : Oracle 11.2.0.3
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    XPRA ERRORS and RETURN CODE in SAPR731XPRA90000007.SD1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    A4WERSDS 250 Start imact of DataSource D versions: "0" deleted, "2" written
    A4WERSDS 253 Write dependent D versions with class "CL_RSTRAN_TRFN"
    A4WERSDS 253 Write dependent D versions with class "CL_RSBK_DTP"
    A4WERSDS 251 End impact handling of DataSource D versions
    A3 ERSO 778 End of after import methode "RS_SHMP_AFTER_IMPORT" ("Contentmodus") - runtime: "00:14:32"
    A2EERSO 870XStarting after import method "RS_DTRF_AFTER_IMPORT" for object type(s) "DTRF" in Content mode
    A4 ERSTRAN 085 Transformation "0GSZMPO4NLEA9RDSTQTHIRFN5JVWAORR" deleted in version "D" of "DDIC"
    A4 ERSTRAN 085 Transformation "0INP02M6KR8J2PLPTJB6A5Y6Y1KHPKE5" deleted in version "D" of "DDIC"
    A4 ERSTRAN 085 Transformation "0M1BZ39AX226FAUB4BXZJ75MTGJ254F6" deleted in version "D" of "DDIC"
    A4 ERSTRAN 085 Transformation "06HLC79ZEZFRSH6GGITYS9K9T10F4ZEE" deleted in version "D" of "DDIC"
    A4 ERSTRAN 085 Transformation "00ZJFXBPY250GL1GM1YRVNL9CPGINOGQ" deleted in version "D" of "DDIC"
    A2EERSAR 203 Source system "RD1CLNT300" does not exist
    2EESY530 An exception has occurred
    2EESY530 An exception has occurred
    A3 ERSO 778 End of after import methode "RS_DANM_AFTER_IMPORT" ("Contentmodus") - runtime: "00:00:00"
    A2 ERSO 870XStarting after import method "RS_DANS_AFTER_IMPORT" for object type(s) "DANS" in Content mode
    A3 ERSO 778 End of after import methode "RS_DANS_AFTER_IMPORT" ("Contentmodus") - runtime: "00:00:00"
    A2 ERSO 870XStarting after import method "RS_DDMM_AFTER_IMPORT" for object type(s) "DDMM" in Content mode
    A3 ERSO 778 End of after import methode "RS_DDMM_AFTER_IMPORT" ("Contentmodus") - runtime: "00:00:00"
    A2EERSO 870XStarting after import method "RS_DTPD_AFTER_IMPORT" for object type(s) "DTPD" in Content mode
    A2EERSAR 203 Source system "RD1CLNT300" does not exist
    A2EERSAR 203 Source system "RD1CLNT300" does not exist
    A2EERSAR 203 Source system "RD1CLNT300" does not exist
    A2 ERSO 870XStarting after import method "RS_DPLQ_AFTER_IMPORT" for object type(s) "DPLQ" in Content mode
    A3 ERSO 778 End of after import methode "RS_DPLQ_AFTER_IMPORT" ("Contentmodus") - runtime: "00:00:00"
    A2 ERSO 870XStarting after import method "RS_DPLC_AFTER_IMPORT" for object type(s) "DPLC" in Content mode
    A3 ERSO 778 End of after import methode "RS_DPLC_AFTER_IMPORT" ("Contentmodus") - runtime: "00:00:00"
    A2 ERSO 854XStart after-import methods for texts
    2EEPU133 Errors occurred during post-handling "RS_AFTER_IMPORT_D" for "DODS" "L"
    3 EPU135 "RS_AFTER_IMPORT_D" belongs to package "RSO_TLOGO"
    2EEPU136 The errors affect the following components:
    2EEPU137    "BW-WHM-MTD" ("Metadata (Repository)")
    1 ETP111 exit code           : "8"
    >>> PLEASE READ THE REPORT DOCUMENTATION OF THE REPORTS MENTIONED ABOVE <<<
    XPRAs are application reports that run at the end of an upgrade.
    Most XPRA reports have a report documentation that explains what
    the report does and how errors can be corrected.
    Call transaction se38 in the SAP system, enter the report name,
    select 'Documentation' and click the 'Display' button.
    >>> The problematic XPRAs are mentioned in messages of type PU132 above <<<
    Thanks
    Abhishek

    Hi,
    Kindly follow link MAIN_NEWBAS/XPRAS_AIMMRG errors &amp;laquo; my experience with SAP
    and SAP Note 122597.
    Regards,
    Gaurav

  • EHP7 Upgrade with kernel 740 Sp37

    Hi All,
    We have done successfully upgrade from ERP 6.0 to EHP6 sp09 and Now we have decide to go with EHP7 update fro two scenerios 1. From ERP 6.0 (kernel 700) to ERP6.0 EHP7 (Kernel 740) and 2 ERP 6.0 to EHP6 sp09 (kernel 721_EXT) to ERP6.0 EHP7 (Kernel 740). . here I have Two queries.
    1.  -----------------------------------------------------------------------------------------------------------------
    EHP7 for ERP6.0 with SP03
    In that Mopz proposed EHP7 for ERP6.0 SP03 is available only for support pack update only. It suggest the note 1949802 which I am not able to get as MOPZ is still generating valid XML to update ERP6.0 EHP7 sp03
    EHP7 for ERP6.0 with SP02
    It gives the kernel 740 patch SP27, I was reading some SCN discussions of kernel SP27 is having some bugs and gives issue during preprocessing phase and update will have to reset. So I want to use Kernel 740 SP37, so how to achieve this as Mopz is not giving the option to select the latest kernel. I am afraid to modify the stack.xml file.
    2.  --------------------------------------------------------------------------------------------------------------------
    One more query is in phase Extraction I got error "the new SAP tools in /usr/sap/MES/SUM/abap/exe cannot connect to your database".
    Which I believe is because of SSFS is not configured in source kernel. So question is how to configure this for Kernel 740 at this stage (after extraction).
    SAP Note 1622837 says if your source kernel is 7.0x then two options --- option b says start with SUM and after error in Extraction Install SSFS with kernel 7.40 that is already unpacked. So how can I configure the SSFS with 740 as source system kernel is still running under 700
    Please help.
    Regards
    SS

    Hi Guys,
    While in downtime phase MAIN_NEWBAS/XPRAS_AIMMRG we are getting below
    error.
    2EETW152 Cannot open file "/usr/sap/MES/SUM/abap/data/R-
    XXX13INCTSPLGN.SAP".
    # /usr/sap/MES/SUM/abap/log/SAPR740XPRA90000145.MES
    I have gone through the "sap note 1978218 - CTSPLUG 200 SP10 Upgrade
    fails"
    and implemented the same report to get sp09 data and cofiles of CTS
    plugin. Both files got generated successfully and are available in
    /usr/sap/MES/SUM/abap/data
    File names are R-20009INCTSPLUG.SAP & D-20009INCTSPLUG.SAP
    And cofiles name is K-20009INCTSPLUG.SAP
    Then I continued with upgrade but it still fails with the same message.
    I dont know why stack xml calculated the sp10 patch for CTS_PLUG while we were already on sp10
    Anybody has idea on this.
    Regards
    Sukhwinder

  • Not able to login to system during upgrade CRM

    Hi,
    I am upgrading CRM 2007 (6.0) to 7.02. I got an error during execution phase in MAIN_NEWBAS/XPRAS_AIMMRG. I am not able to login to system (upgrade still running, logon not possible). I tried to login to shadow system, changed system number to 04 but still not able to login. Please help ASAP.
    Thanks,
    Kavitha Rajan.

    If you are in the "Execution" phase which is basically the downtime phase then the shadow wont be available. You need to connect to the main system. You will be able to login using the DDIC user. If you want to login with another user then you will need to unlock the system.
    Follow this SAP KBA
    1901463 - How to unlock the SAP system to perform correction(s) during an upgrade.

  • Can not use SUM in a simple query because of a syntax error?

    Hi
    Thank you for reading my post.
    I am trying to execute the following query:
    q = em.createQuery("SELECT SUM((NE.pipeLength - 0.6)+((NE.networkDepth-NE.initialDepth)*0.41)+ NE.standLenght)  FROM NExpansion NE  where (( NE.contract.contractor=:contractor) AND (NE.pDiameter=:diameter))");
                  q.setParameter("contractor", contractor);
    q.setParameter("diameter", diameter);
         l =  (Long) q.getSingleResult();And I get the following error:
    Caused by: Exception [TOPLINK-8025] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: Syntax error parsing the query [SELECT SUM((NE.pipeLength - 0.6)+((NE.networkDepth-NE.initialDepth)*0.41)+ NE.standLenght)  FROM NExpansion NE  where (( NE.contract.contractor=:contractor) AND (NE.pDiameter=:diameter))], line 1, column 12: unexpected token [(].
    Internal Exception: line 1:12: unexpected token: (
            at oracle.toplink.essentials.exceptions.EJBQLException.unexpectedToken(EJBQLException.java:389)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.handleANTLRException(EJBQLParser.java:350)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.addError(EJBQLParser.java:278)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.reportError(EJBQLParser.java:378)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.aggregateExpression(EJBQLParser.java:1416)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectExpression(EJBQLParser.java:1158)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectClause(EJBQLParser.java:403)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectStatement(EJBQLParser.java:178)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.document(EJBQLParser.java:135)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.parse(EJBQLParser.java:166)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:127)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
            at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
            ... 30 more
    Caused by: line 1:12: unexpected token: (
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.aggregateExpression(EJBQLParser.java:1365)
            ... 43 morePlease let me know what am I doing wrong?
    Thanks.

    Hello,
    From the grammar in the JPA spec, SUM only takes a state_field_path_expression which is defined as
    state_field_path_expression := {identification_variable | single_valued_association_path_expression}.state_field
    Please feel free to file an enhancement to have this expanded upon.
    Best Regards,
    Chris

  • Error: 1012000 Invalid Syntax - Not a CALC command [@sum]

    what am i missing in this Calc
    Set UpdateCalc Off;
    SET AGGMISSG ON ;
    Fix("Net Income")
    @sum("40000":"99070");
    Endfix;
    Please advise

    You need to assign the result to something (the member West in the example below).
    Please have a look at the Essbase Technical Reference for good examples => http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    FIX("Total Expenses")
    West=@SUM(West,East);
    ENDFIX
    Thank you,
    Todd Rebner

  • Order is getting Syntax Error ????

    I am receiving and error message regarding syntax of the ORDER command. I have attached the code, error message and DDLs for the tables.
    select COALESCE(a.[Material],b.[Part_Number],c.[Part_Number])                 AS [Material],
    COALESCE(a.[Description],b.[Description],c.[Description])                     AS [Description],
    COALESCE(a.[LD],b.[LD],c.[LD])                                                AS [LD],
    COALESCE(a.[SalesOrder],b.[SalesOrder],c.[SalesOrder])                        As [SalesOrder],
    COALESCE(a.[Ln],b.[Ln],c.[Ln])                                                As [Ln],
    COALESCE(a.[S/J],b.[S/J],c.[S/J])                                             As [Type],
    COALESCE(a.[Job],b.[Job],c.[Job])                                             AS [Job], 
    COALESCE(a.[SalesCode],b.[SalesCode],c.[SalesCode])                           As [SalesCode],
    COALESCE(a.[OpenQty],0) + COALESCE(b.[OpenQty],0) + COALESCE(c.[OpenQty],0)   As [OpenQty],
    COALESCE(a.[OrderDate],b.[OrderDate],c.[OrderDate])                           As [OrderDate],
    (Case when b.[PromDate] = '1900-01-01' then '' else a.[PromDate] end)         As [PromDate],
    SUBSTRING(ISNULL(c.[WorkCenter],''),4,11)                                     AS [WorkCenter]
    from
    Select a.Material                                                             As [Material]
           ,Ma.Description                                                        As [Description]
           ,Ma.Lead_Days                                                          As [LD]
           ,a.Sales_Order                                                         As [SalesOrder]
           ,a.SO_Line                                                             As [Ln]
           ,'S'                                                                  
    As [S/J]
           ,a.Job                                                                
    As [Job]
           ,a.Sales_Code                                                          AS [SalesCode]
           ,Sum(a.Order_Qty - a.Picked_Qty - a.Shipped_Qty)                       AS [OpenQty]
           ,Cast(SH.Order_Date As Date)                                           AS [OrderDate]
           ,Cast(a.Promised_Date As Date)                                         AS [PromDate]
     As [WorkCenter]
           from [PRODUCTION].dbo.SO_Detail as a
    inner join [PRODUCTION].dbo.Material As Ma
          on a.Material = Ma.Material 
    inner join [PRODUCTION].dbo.SO_Header As SH
          on a.Sales_Order = SH.Sales_Order
    Where (a.Status = 'Open' or a.Status = 'Backorder') 
    and a.Job <> ''
    and (a.Order_Qty - a.Picked_Qty - a.Shipped_Qty > 0)
    GROUP BY a.Material, a.Job, [S-J], Ma.Sales_Code, Ma.Lead_Days, SH.Order_Date, a.Promised_Date, Ma.Description, a.Sales_Order, a.SO_Line/JBSettings, -J
    )a
    full join
    Select b.Part_Number                                                          As [Part_Number]
           ,ISNULL(b.Description,'')                                              As [Description]
           ,Mb.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,b.Job                                                                
    As [Job]
           ,Mb.Sales_Code                                                         As [SalesCode]
           ,Sum(b.Order_Quantity - b.Shipped_Quantity)                            As [OpenQty]
           ,Cast(b.Order_Date As Date)                                            As [OrderDate]
     As [PromDate] 
     As [WorkCenter] 
    from [PRODUCTION].dbo.Job As b
    left outer join [PRODUCTION].dbo.Material As Mb
          on b.Part_Number = Mb.Material
    Where b.Status = 'Active' and Mb.Type = 'F' and b.Job Not like '%MASTER%' and b.Customer IS null
    GROUP BY b.Part_Number, b.Job, [S-J], Mb.Sales_Code, Mb.Lead_Days, b.Order_Date, b.Description
    )b
    full join
    Select c.Part_Number                                                          As [Part_Number]
           ,ISNULL(c.Description,'')                                              As [Description]
           ,Mc.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,c.Job                                                                
    As [Job]
           ,Mc.Sales_Code                                                         As [SalesCode]
           ,'0'                                                                  
    As [OpenQty]
           ,Cast(c.Order_Date As Date)                                            As [OrderDate]
     As [PromDate]  
           ,Max(Case when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'O'        
                   then '00 NOT STARTED'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'S'
                           then '90 INSPECTION'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'C'
                           then '95 COMPLETED'
                     When JO.Work_Center like '%WELD%'                                          and JO.Status =
    'O'                        then '05 NOT STARTED'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'S'                        then '70 WELD'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'C'                        then '75 WELD'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'O'                        then '05 NOT STARTED'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'S'                        then '60 KITTING'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'C'                        then '65 KITTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'O'
                           then '15 NOT STARTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'S'
                           then '50 WIRE BENDING'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'C'
                           then '55 WIRE BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'O'                        then '20 NOT STARTED'
                     when JO.WOrk_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'S'                        then '40 BENDING
    TUBES'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'C'                        then '45 TUBES BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'O'                        then '25 NOT
    STARTED'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'S'                        then '30 CUTTING
    TUBES'
                     when JO.Work_Center = 'TUBEBEnder' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'C'                        then '35 TUBES
    CUT'
           else '' end) [WorkCenter]
    from [PRODUCTION].dbo.Job_Operation As JO
    left outer join [PRODUCTION].dbo.Job as c
          on c.Job = JO.Job
    left outer join [PRODUCTION].dbo.Material As Mc
          on c.Part_Number = Mc.Material
    Where c.Status = 'Active' and Mc.Type = 'F' and c.Job Not like '%MASTER%' and c.Customer IS null
    GROUP BY c.Part_Number, c.Job, [S/J], Mc.SalesCode, Mc.Lead_Days, c.Order_Date, c.Description
    )c
    on a.[Material] = b.[Part_Number] and a.[Material] = c.[Part_Number] and a.[Job] = b.[Job] and a.[Job] = c.[Job] and a.[PromDate] = b.[PromDate] and a.[PromDate] = c.[PromDate]
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    ERROR MESSAGE **********************************************************************************************
    Msg 156, Level 15, State 1, Line 99
    Incorrect syntax near the keyword 'Order'.
    DDL SO_DETAIL *********************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Detail]    Script Date: 05/22/2014 11:41:09 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Detail](
    [SO_DetailKey] [dbo].[KeyNum] IDENTITY(1,1) NOT NULL,
    [SO_Detail] [dbo].[KeyNum] NULL,
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [SO_Line] [dbo].[T_6] NOT NULL,
    [PO] [dbo].[Key8] NULL,
    [Line] [dbo].[T_6] NULL,
    [Material] [dbo].[T_30] NULL,
    [Ship_To] [int] NULL,
    [Drop_Ship] [bit] NOT NULL,
    [Quote] [varchar](50) NULL,
    [Job] [dbo].[Key10] NULL,
    [Status] [dbo].[T_9] NOT NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Unit_Price] [float] NOT NULL,
    [Discount_Pct] [float] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Deferred_Qty] [float] NOT NULL,
    [Prepaid_Amt] [money] NOT NULL,
    [Unit_Cost] [float] NOT NULL,
    [Order_Qty] [float] NOT NULL,
    [Stock_UofM] [dbo].[UofM] NOT NULL,
    [Backorder_Qty] [float] NOT NULL,
    [Picked_Qty] [float] NOT NULL,
    [Shipped_Qty] [float] NOT NULL,
    [Returned_Qty] [float] NOT NULL,
    [Certs_Required] [bit] NOT NULL,
    [Taxable] [bit] NOT NULL,
    [Commissionable] [bit] NOT NULL,
    [Commission_Pct] [float] NOT NULL,
    [Sales_Code] [dbo].[T_UCode] NULL,
    [Note_Text] [text] NULL,
    [Promised_Date] [datetime] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Description] [dbo].[T_30] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Rev] [dbo].[T_8] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Ext_Description] [text] NULL,
    [Cost_UofM] [dbo].[T_4] NULL,
    [Cost_Unit_Conv] [float] NULL,
    [Res_Type] [smallint] NULL,
    [Res_ID] [dbo].[T_50] NULL,
    [Res_Qty] [float] NULL,
    [Partial_Res] [bit] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
     CONSTRAINT [PK_SO_Detail] PRIMARY KEY NONCLUSTERED 
    [SO_DetailKey] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Detail]  WITH NOCHECK ADD  CONSTRAINT [FK_SOH_on_SODetl] FOREIGN KEY([Sales_Order])
    REFERENCES [dbo].[SO_Header] ([Sales_Order])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[SO_Detail] NOCHECK CONSTRAINT [FK_SOH_on_SODetl]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Drop_Ship]  DEFAULT ((0)) FOR [Drop_Ship]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Status]  DEFAULT ('Open') FOR [Status]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Make_Buy]  DEFAULT ('M') FOR [Make_Buy]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Discount_Pct]  DEFAULT ((0)) FOR [Discount_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Price_UofM]  DEFAULT ('ea') FOR [Price_UofM]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Deferred_Qty]  DEFAULT ((0)) FOR [Deferred_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Order_Qty]  DEFAULT ((0)) FOR [Order_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Backorder_Qty]  DEFAULT ((0)) FOR [Backorder_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Picked_Qty]  DEFAULT ((0)) FOR [Picked_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Taxable]  DEFAULT ((0)) FOR [Taxable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commissionable]  DEFAULT ((0)) FOR [Commissionable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SODetail_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    DDL Material ************************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Material]    Script Date: 05/22/2014 11:42:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Material](
    [Material] [dbo].[Key30] NOT NULL,
    [Primary_Vendor] [dbo].[Key10] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Shape] [dbo].[Key10] NULL,
    [Location_ID] [dbo].[Key10] NOT NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Description] [dbo].[T_30] NULL,
    [Type] [dbo].[T_1] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Pick_Buy_Indicator] [dbo].[T_1] NOT NULL,
    [Class] [varchar](10) NULL,
    [Rev] [dbo].[T_8] NULL,
    [Stocked_UofM] [dbo].[UofM] NOT NULL,
    [Purchase_UofM] [dbo].[UofM] NOT NULL,
    [Cost_UofM] [dbo].[UofM] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Selling_Price] [float] NULL,
    [Standard_Cost] [float] NOT NULL,
    [Average_Cost] [float] NULL,
    [Last_Cost] [float] NULL,
    [On_Order_Qty] [float] NULL,
    [Order_Point] [float] NULL,
    [Reorder_Qty] [float] NOT NULL,
    [Lead_Days] [smallint] NOT NULL,
    [UofM_Conv_Factor] [float] NOT NULL,
    [Lot_Trace] [bit] NOT NULL,
    [Rd_Whole_Unit] [bit] NOT NULL,
    [Ext_Description] [text] NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Vendor_Reference] [dbo].[T_30] NULL,
    [Drawing] [varchar](30) NULL,
    [Use_Price_Breaks] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [GL_Account] [dbo].[T_100] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Job] [dbo].[T_10] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Taxable] [bit] NULL,
    [IS_Length] [float] NULL,
    [IS_Width] [float] NULL,
    [IS_Weight_Factor] [float] NULL,
    [IS_Thickness] [float] NULL,
    [Stock_Item] [dbo].[T_50] NULL,
    [Affects_Schedule] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Shape_OID] [uniqueidentifier] NULL,
    [Tooling] [bit] NULL,
    [IsSerialized] [bit] NOT NULL,
    [MaxUsage] [int] NULL,
    [ShelfLife] [float] NULL,
    [ShelfLifeUofM] [varchar](10) NULL,
     CONSTRAINT [PK_Material] PRIMARY KEY NONCLUSTERED 
    [Material] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Loc_on_Matl] FOREIGN KEY([Location_ID])
    REFERENCES [dbo].[Location] ([Location_ID])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Loc_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Shap_on_Matl] FOREIGN KEY([Shape])
    REFERENCES [dbo].[Shapes] ([Shape])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Shap_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Matl] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_UVal_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Vend_on_Matl] FOREIGN KEY([Primary_Vendor])
    REFERENCES [dbo].[Vendor] ([Vendor])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Vend_on_Matl]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Selling_Price]  DEFAULT ((0)) FOR [Selling_Price]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Standard_Cost]  DEFAULT ((0)) FOR [Standard_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Average_Cost]  DEFAULT ((0)) FOR [Average_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Cost]  DEFAULT ((0)) FOR [Last_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_On_Order_Qty]  DEFAULT ((0)) FOR [On_Order_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Order_Point]  DEFAULT ((0)) FOR [Order_Point]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Reorder_Qty]  DEFAULT ((0)) FOR [Reorder_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_UofM_Conv_Factor]  DEFAULT ((0)) FOR [UofM_Conv_Factor]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lot_Trace]  DEFAULT ((0)) FOR [Lot_Trace]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Rd_Whole_Unit]  DEFAULT ((0)) FOR [Rd_Whole_Unit]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Use_Price_Break]  DEFAULT ((0)) FOR [Use_Price_Breaks]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [IsSerialized]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [MaxUsage]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [ShelfLife]
    GO
    DDL SO_HEADER ***************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Header]    Script Date: 05/22/2014 11:43:29 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Header](
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [Customer] [dbo].[Key10] NOT NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Order_Taken_By] [dbo].[Key6] NULL,
    [Ship_Via] [dbo].[T_UCode] NULL,
    [Tax_Code] [dbo].[T_UCode] NULL,
    [Terms] [dbo].[T_UCode] NULL,
    [Sales_Tax_Amt] [money] NOT NULL,
    [Sales_Tax_Rate] [float] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Promised_Date] [datetime] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [User_Values] [int] NULL,
    [Source] [dbo].[T_20] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
     CONSTRAINT [PK_SO_Header] PRIMARY KEY NONCLUSTERED 
    [Sales_Order] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Amt]  DEFAULT ((0)) FOR [Sales_Tax_Amt]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Rate]  DEFAULT ((0)) FOR [Sales_Tax_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    DDL JOB *******************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Job]    Script Date: 05/22/2014 11:44:43 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Job](
    [Job] [dbo].[Key10] NOT NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Customer] [dbo].[Key10] NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Quote] [dbo].[Key10] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Ship_Via] [dbo].[T_15] NULL,
    [Terms] [dbo].[T_15] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Top_Lvl_Job] [dbo].[T_10] NULL,
    [Type] [dbo].[T_8] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Status_Date] [datetime] NOT NULL,
    [Part_Number] [dbo].[T_30] NULL,
    [Rev] [dbo].[T_10] NULL,
    [Description] [dbo].[T_30] NULL,
    [Ext_Description] [text] NULL,
    [Drawing] [varchar](30) NULL,
    [Build_To_Stock] [bit] NOT NULL,
    [Order_Quantity] [int] NOT NULL,
    [Extra_Quantity] [int] NULL,
    [Pick_Quantity] [int] NULL,
    [Make_Quantity] [int] NOT NULL,
    [Split_Quantity] [int] NULL,
    [Completed_Quantity] [int] NULL,
    [Shipped_Quantity] [int] NULL,
    [FG_Transfer_Qty] [int] NULL,
    [Returned_Quantity] [int] NULL,
    [In_Production_Quantity] [int] NOT NULL,
    [Assembly_Level] [smallint] NULL,
    [Certs_Required] [bit] NOT NULL,
    [Time_And_Materials] [bit] NOT NULL,
    [Open_Operations] [smallint] NULL,
    [Scrap_Pct] [float] NOT NULL,
    [Est_Scrap_Qty] [int] NULL,
    [Est_Rem_Hrs] [float] NULL,
    [Est_Total_Hrs] [float] NULL,
    [Est_Labor] [money] NULL,
    [Est_Material] [money] NULL,
    [Est_Service] [money] NULL,
    [Est_Labor_Burden] [money] NULL,
    [Est_Machine_Burden] [money] NULL,
    [Est_GA_Burden] [money] NULL,
    [Act_Revenue] [money] NULL,
    [Act_Scrap_Quantity] [int] NULL,
    [Act_Total_Hrs] [float] NULL,
    [Act_Labor] [money] NULL,
    [Act_Material] [money] NULL,
    [Act_Service] [money] NULL,
    [Act_Labor_Burden] [money] NULL,
    [Act_Machine_Burden] [money] NULL,
    [Act_GA_Burden] [money] NULL,
    [Priority] [smallint] NULL,
    [Unit_Price] [float] NULL,
    [Total_Price] [money] NULL,
    [Price_UofM] [dbo].[T_4] NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Commission_Pct] [float] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Customer_PO_LN] [dbo].[T_6] NULL,
    [Sched_End] [datetime] NULL,
    [Sched_Start] [datetime] NULL,
    [Quantity_Per] [float] NULL,
    [Profit_Pct] [float] NULL,
    [Labor_Markup_Pct] [float] NOT NULL,
    [Mat_Markup_Pct] [float] NOT NULL,
    [Serv_Markup_Pct] [float] NOT NULL,
    [Labor_Burden_Markup_Pct] [float] NOT NULL,
    [Machine_Burden_Markup_Pct] [float] NOT NULL,
    [GA_Burden_Markup_Pct] [float] NOT NULL,
    [Lead_Days] [smallint] NULL,
    [Profit_Markup] [dbo].[T_1] NULL,
    [Prepaid_Amt] [money] NULL,
    [Split_To_Job] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Order_Unit] [dbo].[T_4] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Source] [dbo].[T_20] NULL,
    [Order_Taken_By] [dbo].[T_50] NULL,
    [Plan_Modified] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Released_Date] [datetime] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [Last_Updated_By] [dbo].[T_50] NULL,
     CONSTRAINT [PK_Job] PRIMARY KEY NONCLUSTERED 
    [Job] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Addr_on_Job] FOREIGN KEY([Ship_To])
    REFERENCES [dbo].[Address] ([Address])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Addr_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Cust_on_Job] FOREIGN KEY([Customer])
    REFERENCES [dbo].[Customer] ([Customer])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Cust_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Empl_on_Job] FOREIGN KEY([Sales_Rep])
    REFERENCES [dbo].[Employee] ([Employee])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Empl_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Job] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_UVal_on_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Build_To_Stock]  DEFAULT ((0)) FOR [Build_To_Stock]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Order_Quantity]  DEFAULT ((0)) FOR [Order_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Extra_Quantity]  DEFAULT ((0)) FOR [Extra_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Pick_Quantity]  DEFAULT ((0)) FOR [Pick_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Make_Quantity]  DEFAULT ((0)) FOR [Make_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_Quantity]  DEFAULT ((0)) FOR [Split_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Completed_Quantity]  DEFAULT ((0)) FOR [Completed_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Shipped_Quantity]  DEFAULT ((0)) FOR [Shipped_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_FG_Transfer_Qty]  DEFAULT ((0)) FOR [FG_Transfer_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Returned_Quantity]  DEFAULT ((0)) FOR [Returned_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_In_Production_Quantity]  DEFAULT ((0)) FOR [In_Production_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Assembly_Level]  DEFAULT ((0)) FOR [Assembly_Level]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Time_And_Materials]  DEFAULT ((0)) FOR [Time_And_Materials]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Open_Operations]  DEFAULT ((0)) FOR [Open_Operations]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Scrap_Pct]  DEFAULT ((0)) FOR [Scrap_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Scrap_Qty]  DEFAULT ((0)) FOR [Est_Scrap_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Rem_Hrs]  DEFAULT ((0)) FOR [Est_Rem_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Total_Hrs]  DEFAULT ((0)) FOR [Est_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor]  DEFAULT ((0)) FOR [Est_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Material]  DEFAULT ((0)) FOR [Est_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Service]  DEFAULT ((0)) FOR [Est_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor_Burden]  DEFAULT ((0)) FOR [Est_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Machine_Burden]  DEFAULT ((0)) FOR [Est_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_GA_Burden]  DEFAULT ((0)) FOR [Est_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Revenue]  DEFAULT ((0)) FOR [Act_Revenue]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Scrap_Quantity]  DEFAULT ((0)) FOR [Act_Scrap_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Total_Hrs]  DEFAULT ((0)) FOR [Act_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor]  DEFAULT ((0)) FOR [Act_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Material]  DEFAULT ((0)) FOR [Act_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Service]  DEFAULT ((0)) FOR [Act_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor_Burden]  DEFAULT ((0)) FOR [Act_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Machine_Burden]  DEFAULT ((0)) FOR [Act_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_GA_Burden]  DEFAULT ((0)) FOR [Act_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Priority]  DEFAULT ((5)) FOR [Priority]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Unit_Price]  DEFAULT ((0)) FOR [Unit_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Quantity_Per]  DEFAULT ((1)) FOR [Quantity_Per]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Profit_Pct]  DEFAULT ((0)) FOR [Profit_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Mat_Markup_Pct]  DEFAULT ((0)) FOR [Mat_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Serv_Markup_Pct]  DEFAULT ((0)) FOR [Serv_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Machine_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Machine_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_GA_Burden_Markup_Pct]  DEFAULT ((0)) FOR [GA_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_To_Job]  DEFAULT ((0)) FOR [Split_To_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_JOB_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    SWProduction

    Given exactly what you posted, there is a stray order by clause in the last batch of your script and it is the only statement in the batch.  Unfortunately, it is likely that something was mangled - which is why it is better to use the [insert code block]
    function as opposed to just copying the entire script into the text of the post.
    To short circuit things a bit, your join syntax is off.  You are joining a to b to c, so the basic structure of your statement should be:
    select
    from a join b on ...
    join c on ...
    where ...
    If you used CTEs instead of derived tables it might be easier for you to visually see that.  As a simple demonstration, consider:
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb on ctea.id = cteb.id
    full join ctec on ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
    go
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb
    full join ctec on ctea.id = cteb.id and ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
     And a last comment which I leave as a hint - do you really need those left joins in your derived tables?

  • Urgent ---group by syntax error

    This is my syntax as below.But it doesn't work.Does anyone can tell me what's problem ? or it have another way to solve this quuestion? thanks .
    sql syntax:
    select a.txdate,a.costype,sum(cosamt) * (1+a.cosrate) as costamount
    from sales_cost a
    where a.txdate between '2003-01-01' and '2003-02-01'
    group by a.txdate,a.costype;

    Although more specifics might have helped, I am assuming based on the title of the post: "urgent ---group by syntax error" and my test of the original code that I have identified the error. See the example below for how the original code produces a group by error and how the solution I provided executes without error.
    SQL> -- test data:
    SQL> SELECT * FROM sales_cost
      2  /
    TXDATE      COSTYPE    COSAMT   COSRATE                                                            
    03-JAN-03         1         3        .5                                                            
    03-JAN-03         1         4       .25                                                            
    03-JAN-03         2         4       .75                                                            
    04-JAN-03         3         3        .5                                                            
    04-JAN-03         4         4       .25                                                            
    04-JAN-03         4         4       .75                                                            
    6 rows selected.
    SQL> --
    SQL> --
    SQL> -- wrong:
    SQL> SELECT   a.txdate, a.costype,
      2             SUM (a.cosamt) * (1 + a.cosrate) AS costamount
      3  FROM     sales_cost a
      4  WHERE    a.txdate BETWEEN '2003-01-01' AND '2003-02-01'
      5  GROUP BY a.txdate,a.costype
      6  /
             SUM (a.cosamt) * (1 + a.cosrate) AS costamount
    ERROR at line 2:
    ORA-00979: not a GROUP BY expression
    SQL> --
    SQL> --
    SQL> -- correct:
    SQL> SELECT   a.txdate, a.costype,
      2             SUM (a.cosamt * (1 + a.cosrate)) AS costamount
      3  FROM     sales_cost a
      4  WHERE    a.txdate BETWEEN TO_DATE ('2003-01-01', 'YYYY-MM-DD')
      5                   AND     TO_DATE ('2003-02-01', 'YYYY-MM-DD')
      6  GROUP BY a.txdate,a.costype
      7  /
    TXDATE      COSTYPE COSTAMOUNT                                                                     
    03-JAN-03         1        9.5                                                                     
    03-JAN-03         2          7                                                                     
    04-JAN-03         3        4.5                                                                     
    04-JAN-03         4         12                                                       

  • Severe error(s) occurred in phase PREP_INSTALL/SHDINST_OS Last error code set: Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1

    Hi Experts ,
    Currently performing EHP7 upgrade I have faced error during the configuration phase , below attached was the error screenshot .
    error logs shows the below :
    Executing module 'PREP_INSTALL'.
    Execution of PREPARE module "Installation" begins at 20140302202456
    # Starting phase execution with maxpar = 6, scheduled: 14x'-'
    CURRENTPHASE PREP_INSTALL/SHDINST_OS
    ...started at 20140302202456
    # Using phase log file 'SHDINST_OS.LOG'.
    ..finished at 20140302202457 with status ABORTED.
    # Error message set: 'Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1, see 'H:\SUM\abap\log\SAPup.ECO' for details'
    .begin dialog at 20140302202459
    SHDINST_OS log :
    1 ETQ399 Possibly the password for user ISNET\SAPServiceDEC entered in phase
    1 ETQ399 INITPUT was wrong. You can reset it by calling 'SAPup set stdpar'.
    1 ETQ399 Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    1 ETQ399 H:\SUM\abap\exe\sapstartsrv.exe -r
    1 ETQ399 -p H:\SUM\abap\DEC\SYS\profile\START_DVEBMGS01_SAPECCDV -s DEC -n 01
    1 ETQ399 -U ISNET\SAPServiceDEC -P <PASSWORD> -e ISNET\decadm
    1 ETQ399 and check if the service SAPDEC_01 can be stopped and restarted.
    1EETQ399 Last error code set is: Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1, see 'H:\SUM\abap\log\SAPup.ECO' for details
    1EETQ204 Upgrade phase "SHDINST_OS" aborted with severe errors ("20140302202457")
    Kindly advice to fix

    Hi Mohan,
    Solution of your issue is already present in SHDINST_OS.LOG
    Possibly the password for user ISNET\SAPServiceDEC entered in phase
    1 ETQ399 INITPUT was wrong. You can reset it by calling 'SAPup set stdpar'.
    1 ETQ399 Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    1 ETQ399 H:\SUM\abap\exe\sapstartsrv.exe -r
    1 ETQ399 -p H:\SUM\abap\DEC\SYS\profile\START_DVEBMGS01_SAPECCDV -s DEC -n 01
    1 ETQ399 -U ISNET\SAPServiceDEC -P <PASSWORD> -e ISNET\decadm
    1 ETQ399 and check if the service SAPDEC_01 can be stopped and restarted.
    Read the log carefully.Have you performed the above mentioned steps from SHDINST_OS.LOG file at your end.
    Also just give a full restart your server,up all the required services & confirm the execution of the phase.
    Thanks,
    Gaurav

  • Syntax error when using jsp:include...

    @ all
    I get a syntax error at the jsp:include line, character "";
    Can anybody help me with that issue?
    Jürgen

    select coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by joined_col,col5You cannot use a column alias like this directly inside the group-by clause. You will have to rewrite this to:
    select coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by coalesce(col1,col2),col5Furthermore I assume that the 'col5' in the group by should be 'col3', not?
    Or vice-verse the 'col3' inside the select-list should be 'col5'...

  • Syntax error in OBIEE generated Physical query - Advance filter concept

    I encountered a syntax error when running a report with the help of advanced filter concept.
    I am getting syntax error at the physical query generated by the OBIEE for main report.
    I used a sub report with the help of advanced filter concept in main report.
    I am posting the physical query for the convenience.
    select D1.c2 as c1,
    D1.c1 as c2
    from
    (select sum(T600347.sales_usd) as c1,
    T601002.currency as c2
    from
    (Select distinct currency from pfact) T601002,
    pfact T600347
    where ( T600347.currency = T601002.currency and T600347.pdate between ( select distinct min(D1.c1) as c1* from
    (select D1.c1 as c1
    from
    (select D1.c1 as c1
    from
    *(select max(T600425.pdate) as c1*
    from
    *(select distinct pdate from pdates where pdate is not null) T600425*
    where  ( T600425.pdate < 11/22/2010 )
    *) D1*
    ) D1
    ) D1 ) and '11/25/2010')
    group by T601002.currency
    ) D1
    I executed the query against my database(sybase) in query tool. It showed error.
    I took out the column alias generated by the OBIEE ("as c1" as underlined). Then the query is working fine.
    How to disable OBIEE from generating the alias.
    Is there any way to do it.
    If obiee is generating the physical query, i am suprised to see a syntax error.
    The bold part is the query from Intermediate report
    I underlined the problematic part.
    Please help me. This is an urgent reuirement,
    Thanks in advance for the help.

    HI,
    When I execute the query on query tool ( my database is sybase)
    I am geting error at "as c1" part, as underlined in the query.
    when I remove that and execute the query, It is generating the output.
    here is the better view of query and error:
    http://img255.imageshack.us/img255/4719/25187227.jpg

  • OBE-15065: Syntax error query builder

    Hello
    i am using the below sql query.
    SELECT (
    A.emp ||
    '200' ||
    LPAD((SELECT COUNT(*) FROM TRANSACTIONS WHERE TRANSACTIONS.PROCESSED ='N'),6,'0') ||
    LPAD((SELECT SUM(AMOUNT) FROM TRANSACTIONS WHERE TRANSACTIONS.PROCESSED ='N'),10,'0') ||
    '000000000000' ||
    LPAD(A.ORIGIN,10,' ') ||
    RPAD(NVL(A.MSGAUTHCODE,' '),19,' ') ||
    RPAD(NVL(A.RESERVED,' '),6,' ') ||
    RPAD(A.IMDDEST,8,' ') ||
    LPAD(A.BTNUMBER,7,'0'))
    FROM CONTROL_TABLE A
    This query works fine in sql*plus.
    i am placing this query in report data wizard and the query builder gives error "OBE-15065: Syntax error"
    the report i am developing is to a delimited output as a fixed length falt file.
    because of this query whenever i try to export using desformat=delimite and destype=file in system parameters. the report builder crashes.
    have anyone faced this sort of problem.
    is there something wrong with the query and iam doing it in wrong way in the reports.
    please give your suggestions
    thanks in advance
    krishna

    You haven't said what version of Oracle or what version of Query Builder you are using. There are things that work in SQL, but not in PL/SQL or various tools, especially in older versions. A select statement within a select clause is one of those things that gets rejected. Usually, the easiest way to fix it is to move the select statement from the select clause to the from clause. Please try the following and see if it solves your problem:
    SELECT A.emp
    || '200'
    || LPAD (b.b_count, 6, '0')
    || LPAD (c.c_count, 10, '0')
    || '000000000000'
    || LPAD (A.ORIGIN, 10,' ')
    || RPAD (NVL (A.MSGAUTHCODE, ' '), 19, ' ')
    || RPAD (NVL (A.RESERVED, ' '), 6, ' ')
    || RPAD (A.IMDDEST, 8, ' ')
    || LPAD (A.BTNUMBER, 7, '0')
    FROM CONTROL_TABLE A,
    (SELECT COUNT (*) AS b_count
    FROM TRANSACTIONS
    WHERE TRANSACTIONS.PROCESSED ='N') b,
    (SELECT SUM (AMOUNT) AS c_count
    FROM TRANSACTIONS
    WHERE TRANSACTIONS.PROCESSED ='N') c

  • Query Of Queries syntax error.

    Hi all,
    I have the following query:
    <cfquery name="agent" datasource="datasourcename">
    SELECT * FROM quotes where status = 'Pending'
    <cfif isDefined("form.agent")>
    AND agent = '#FORM.agent#'
    </cfif>
    </cfquery>
    Then, I have the following query of that query
    <cfquery name="totalvalue" dbtype="query">
    SELECT SUM(value) as total FROM agent
    </cfquery>
    however I get the following error:
    Query Of Queries syntax error.
    Encountered "SUM ( value. Incorrect Select List,
    on line 20 which is:
    <cfquery name="totalvalue" dbtype="query">
    now i'm sure this is identical to what ive used before but
    getting the error. the totals query works fine when querying the
    database direct, only got this error when I changed it to query the
    master query.
    i appreciate any help in advance, as no matter how much i
    stare at it I can't see whats wrong!

    I believe that
    value is a reserved word that is probably causing your
    current error. I would rename this column, or alias it in your
    original query. Also, I would add WHERE value IS NOT NULL to your
    Q-of-Q to cover your NULLs.
    Phil

Maybe you are looking for

  • How do you set up multiple from addresses in mail

    on my ipad when I set up email accounts, i can enter multiple addresses in the Email field, separated by a comma, which is located on the keyboard far right, second symbol screen. On my iphone 5 there's NO COMMA that I can find on any of the three Ke

  • Lost of functionality on iPad2 when upgrading to iOS 7.0.2

    recently upgraded iOS on iPad2. Previous version 6x. showed a flower icon on lock sceen. When selected it would run a slideshow of my photo gallery. Where did this feature go?

  • Excel rendering not correctly for SQL SERVER 2012 (and reporting server)

    hi I have a tablix that has a category, subcategory and total items column. The total items are grouped into subcategories which are in turn grouped into categories. When using the wizard we explicitly indicate that the subtotals and totals should NO

  • Emac display flickrs little

    ever since i bought my mac 3 years ago everytime someone in the house nere my room plugs something in to a outlet and uses it or my brother turns his pc on my screen shakes, like a little flash? It does not bother me but i would like to know why?

  • Prob. in Implement User Exit for wrong calculation of Surcharge during MIRO

    Dear All, In our system the calculation of Surcharge is wrong during MIRO. So i write this issue to the SAP, the below solution is provided by them : Use the user exit 'J_1I7_USEREXIT_PROCESS_TKOMV' to redetermine the additional VAT condition type va