Error in merge query of the Proc.

Hi all,
Below merge query working fine, if I execite independently. I am getting error as "ORA-00900: invalid SQL statement" when i paste this code inside the procedure. However, if I comment the lines written in bold, proc is working fine. Not sure why the comparison not happening even though code and data is correct. If i use like intead of IN then it is working fine.
Can you please suggest on this?
MERGE INTO ENTRYPOINTASSETS
USING
(SELECT
LAST_DAY(TRUNC(to_timestamp(oa.reqdate, 'yyyymmddhh24:mi:ss.ff4'))) as activity_month,
oa.acctnum as acctnum,
l.lkpvalue as assettype,
LOWER(trim(oa.disseminationmthd)) as deliverymthd,
epa.assetid as assetid,
epa.assetname as assetname,
count(1) as entrypointcount
FROM action oa, asset epa, lookupdata l
WHERE
oa.assetkey IS NOT NULL
AND oa.acctnum is not null
AND trim(oa.assettype) IN ('NL','WS','AL')
AND l.lkpid = epa.assettypeid
AND UPPER(trim(oa.disseminationmthd)) IN ('ABC','BCD', 'PODCAST', 'EMAIL','ED', 'WID')
AND epa.assetkey = oa.assetkey
AND epa.assetid <> 0
GROUP BY
LAST_DAY(TRUNC(to_timestamp(oa.reqdate, 'yyyymmddhh24:mi:ss.ff4'))),
oa.acctnum,
l.lkpvalue,
LOWER(trim(oa.disseminationmthd)),
epa.assetid,
epa.assetname
) cvd1
ON
(ENTRYPOINTASSETS.activity_month = cvd1.activity_month
AND ENTRYPOINTASSETS.acctnum = cvd1.acctnum
AND ENTRYPOINTASSETS.assettype = cvd1.assettype
AND UPPER(ENTRYPOINTASSETS.deliverymthd) = UPPER(cvd1.deliverymthd)
AND ENTRYPOINTASSETS.assetid = cvd1.assetid)
WHEN NOT MATCHED THEN
INSERT (activity_month, acctnum, assettype, deliverymthd, assetid, assetname, entrypointcount)
VALUES (cvd1.activity_month, cvd1.acctnum, cvd1.assettype, cvd1.deliverymthd, cvd1.assetid, cvd1.assetname, cvd1.entrypointcount)
WHEN MATCHED THEN
UPDATE
SET ENTRYPOINTASSETS.assetname = cvd1.assetname;
Edited by: Nagaraja Akkivalli on Aug 9, 2011 6:07 PM

Tried it. No luck. Facing the same problem.
MERGE INTO SUMMARYTABLE
USING
(SELECT
LAST_DAY(TRUNC(to_timestamp(oa.reqdate, 'yyyymmddhh24:mi:ss.ff4'))) as activity_month,
        oa.acctnum as acctnum,
        l.lkpvalue as assettype,
        LOWER(TRIM(oa.disseminationmthd)) as deliverymthd,
        epa.assetid as assetid,
        epa.assetname as assetname,
        count(1) as entrypointcount
   FROM ods_action oa, ods_asset epa, ods_lookupdata l
  WHERE
     (lv_summm_type_indicator  = c_summaryType_fullLoad
     AND  ( get_date_timestamp(oa.reqdate) BETWEEN :sum_startdate AND :sum_enddate
     AND   oa.uploaddatetime BETWEEN :partitioned_start_date AND :partitioned_end_date
     OR (lv_summm_type_indicator = c_summaryType_incrementLoad
                AND oa.uploaddatetime BETWEEN :sum_startdate AND :sum_enddate )
    AND oa.assetkey IS NOT NULL
    AND oa.acctnum is not null
    AND UPPER(TRIM(oa.assettype)) IN ('NL','WS','AL')
    AND l.lkpid = epa.assettypeid
    AND UPPER(TRIM(oa.disseminationmthd)) IN ('RSS','PCAST', 'PODCAST', 'EMAIL','ED', 'WID')
    AND epa.assetkey = oa.assetkey
    AND epa.assetid <> 0
  GROUP BY
  LAST_DAY(TRUNC(to_timestamp(oa.reqdate, 'yyyymmddhh24:mi:ss.ff4'))),
           oa.acctnum,
           l.lkpvalue,
           LOWER(TRIM(oa.disseminationmthd)),
           epa.assetid,
           epa.assetname
       ) cvd1
ON
   (SUMMARYTABLE.activity_month = cvd1.activity_month
    AND SUMMARYTABLE.acctnum = cvd1.acctnum
    AND SUMMARYTABLE.assettype = cvd1.assettype
    AND UPPER(TRIM(SUMMARYTABLE.deliverymthd)) = UPPER(TRIM(cvd1.deliverymthd))
    AND SUMMARYTABLE.assetid = cvd1.assetid)
WHEN NOT MATCHED THEN
INSERT (activity_month, acctnum, assettype, deliverymthd, assetid, assetname, entrypointcount)
VALUES (cvd1.activity_month, cvd1.acctnum, cvd1.assettype, cvd1.deliverymthd, cvd1.assetid, cvd1.assetname, cvd1.entrypointcount)
WHEN MATCHED THEN
UPDATE
SET SUMMARYTABLE.assetname = cvd1.assetname,
    SUMMARYTABLE.entrypointcount =
     CASE WHEN NVL(lv_summm_type_indicator,c_summaryType_incrementLoad) = c_summaryType_fullLoad THEN cvd1.entrypointcount
     ELSE SUMMARYTABLE.entrypointcount + cvd1.entrypointcount END;If I comment any one of the below piece of code present in merge then merge is working fine. If I retain both code then getting error.
lv_summm_type_indicator is a variable caclualted @ run time to check type of summarization and c_summaryType_incrementLoad is a constant value stored @ the top of the procedure. PLease let me now where I am going wrong.
     (lv_summm_type_indicator  = c_summaryType_fullLoad
     AND  ( get_date_timestamp(oa.reqdate) BETWEEN :sum_startdate AND :sum_enddate
     AND   oa.uploaddatetime BETWEEN :partitioned_start_date AND :partitioned_end_date
     ))OR
OR (lv_summm_type_indicator = c_summaryType_incrementLoad
                AND oa.uploaddatetime BETWEEN :sum_startdate AND :sum_enddate )Edited by: Nagaraja Akkivalli on Aug 24, 2011 5:13 PM
Edited by: Nagaraja Akkivalli on Aug 24, 2011 5:16 PM

Similar Messages

  • Syntax error in Merge Query

    This is the first time i am using Merge Query and the query is
    ;MERGE saSalesStockRecevedSub AS T
       USING @tableSRN AS S
       ON (T.prodCode=S.prodCode AND T.packtypeID=S.packtypeID AND T.batchCode=S.batchCode and T.stockReceiveMainID=S.stockReceiveMainID)
    WHEN NOT MATCHED BY T
        THEN
        INSERT(stockReceiveMainID, prodCode, packtypeID, batchCode, quantityClaim, quantityReceived,reasonId, qQuantity, saleableQty, mfgDefect, slDamageQty, nonSaleableQty, damageQty, breakageQty, leakageQty, expiryQty, remarks,activeStatus,cnCreateSl,cnCreateNsl)
        VALUES(S.stockReceiveMainID, S.prodCode, S.packtypeID, S.batchCode, S.quantityClaim, S.quantityReceived,S.reasonId, S.qQuantity, S.saleableQty, S.mfgDefect, S.slDamageQty, S.nonSaleableQty, S.damageQty, S.breakageQty, S.leakageQty, S.expiryQty,
    S.remarks,'ACTIVE','FALSE','FALSE')
    WHEN MATCHED
        THEN
        UPDATE SET T.quantityClaim=S.quantityClaim, T.quantityReceived=S.quantityReceived,T.reasonId=S.reasonId, T.qQuantity=S.qQuantity, T.saleableQty=S.saleableQty, T.mfgDefect=S.mfgDefect, T.slDamageQty=S.slDamageQty, T.nonSaleableQty=S.nonSaleableQty,
    T.damageQty=S.damageQty, T.breakageQty=S.breakageQty, T.leakageQty=S.leakageQty, T.expiryQty=S.expiryQty, T.remarks=S.remarks
    WHEN NOT MATCHED BY S
        THEN
        DELETE ;
    It showing incorrect syntax near 'T'.
    Please help me.
    Thanks

    Here below is the complete code, hope it will work with you. 
    You should use the key word source and target instead of using S and T
    MERGE saSalesStockRecevedSub AS T
       USING tableSRN AS S
       ON (T.prodCode=S.prodCode AND T.packtypeID=S.packtypeID AND T.batchCode=S.batchCode and T.stockReceiveMainID=S.stockReceiveMainID)
    WHEN NOT MATCHED BY TARGET
        THEN 
        INSERT(stockReceiveMainID, prodCode, packtypeID, batchCode, quantityClaim, quantityReceived,reasonId, qQuantity, saleableQty, mfgDefect, slDamageQty, nonSaleableQty, damageQty, breakageQty, leakageQty, expiryQty, remarks,activeStatus,cnCreateSl,cnCreateNsl) 
        VALUES(S.stockReceiveMainID, S.prodCode, S.packtypeID, S.batchCode, S.quantityClaim, S.quantityReceived,S.reasonId, S.qQuantity, S.saleableQty, S.mfgDefect, S.slDamageQty, S.nonSaleableQty, S.damageQty, S.breakageQty, S.leakageQty, S.expiryQty,
    S.remarks,'ACTIVE','FALSE','FALSE')
    WHEN MATCHED  
        THEN 
        UPDATE SET T.quantityClaim=S.quantityClaim, T.quantityReceived=S.quantityReceived,T.reasonId=S.reasonId, T.qQuantity=S.qQuantity, T.saleableQty=S.saleableQty, T.mfgDefect=S.mfgDefect, T.slDamageQty=S.slDamageQty, T.nonSaleableQty=S.nonSaleableQty,
    T.damageQty=S.damageQty, T.breakageQty=S.breakageQty, T.leakageQty=S.leakageQty, T.expiryQty=S.expiryQty, T.remarks=S.remarks
    WHEN NOT MATCHED BY SOURCE
        THEN 
        DELETE ;
    Working as a Senior Database Analyst & Architect at Ministry of Higher Education in KSA

  • An error occurred while querying for the Webfolders path.

    Hi Guys,
    I have a logic file that runs a stored procedure and dtsx gets to that step it gives an error saying :"An error occurred while querying for the Webfolders path."
    I saw that there were a similar post a while ago, but i am running the package from the DM.
    Any ideas?
    Regards,
    AvdB

    Hi Guys,
    Thanks for the replies. Please have a look at the code and let me know what I am doing wrong.
    'DEBUG(on)
    TASK(ImportAccount,USER,%USER%)
    TASK(ImportAccount,APPSET,%APPSET%)
    TASK(ImportAccount,APP,%APP%)
    TASK(ImportAccount,LOGICFILE,C:\BPC\Data\Webfolders\NewClicks\AdminApp\FINANCE\account_load.lgf)
    TASK(ImportAccount,LOGICMODE,1)
    PROMPT(MESSAGE,"When this package is running, end user functionality will be affected (i.e. data cannot be sent to the database or incorrect numbers can be retrieved from the database while this package is running)")
    TASK(CreateAccount,DESCRIPTION,CreateAccount)
    TASK(CreateAccount,APPSET,%APPSET%)
    TASK(CreateAccount,APP,%APP%)
    TASK(CreateAccount,USERID,%USER%)
    TASK(CreateAccount,PROCESSMODE,4)
    TASK(CreateAccount,DIMENSIONNAME,Account)
    TASK(CreateAccount,SOURCETABLE,mbrAccount_shadow)
    TASK(CreateAccount,BAPPLICATIONPROCESS,1)
    TASK(CreateAccount,BTAKESYSTEMAVAILABLE,1)
    Is there any documentation around this code? It is very difficult to debug something without the relevant documentation.
    Regards,
    Andries

  • Runtime Error when executing Query in the web

    Hello,
    when i try to execute a query on the  web, i get the error
    Exception in BI runtime
    Log ID: 005056BD15DA005E000000A900000A3400043C8F00E4DD8B
    Initial cause
    Message:
    'user' missing
    Stack trace:
    com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: 'user' missing
    Message:
    No connection possible to BI master system VB0CLNT800
    Stack trace:
    com.sap.ip.bi.base.service.connection.ConnectionException: No connection possible to BI master system VB0CLNT800
    Can anyone please tell me , how to fix this ..
    Thanks
    Raj

    you mwy check this to trouble shoot front end
    Troubleshoot the SAP NetWeaver 2004s BI Frontend Installation

  • Error when executing query in the Web Analyzer...

    Hi All,
    I am using 2004s and when I try to execute the query in the BEX browser I get the following error. It works well in the Bex analyzer. Do I need to have some java plug ins for this to work?
    http://bi6.domain.com:50100/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex%3FQUERY
    Thanks,
    Arthur.

    you mwy check this to trouble shoot front end
    Troubleshoot the SAP NetWeaver 2004s BI Frontend Installation

  • Error Message on query of the cube 0PUR_C01

    Hi Gurus,
    I am executing the standard query 0PUR_C01_Q0004 on cube 0PUR_C01 (Purchasing).
    For some results lines I see the following message "No calc possible" on key figures values. Has anybody seen this error before??
    I will really appreciate any help.
    thanks
    Ricardo Okazaawa

    Perhaps try the "Error -50," "-5000," "8003," "8008," or "-42023" section in the Specific Conditions and Alert Messages: (Mac OS X / Windows) section of the following document:
    iTunes: Advanced iTunes Store troubleshooting

  • SQL 2012 SP1 - How to determine a query that causes Error 8623 in SQL Log: The query processor ran out of internal resources and could not produce a query plan. This is a rare event...

    We are getting multiple 8623 Errors in SQL Log while running Vendor's software.
    How can you catch which Query causes the error?
    I tried to catch it using SQL Profiler Trace but it doesn't show which Query/Sp is the one causing an error. 
    I also tried to use Extended Event session to catch it, but it doesn't create any output either.
    Error:
    The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that
    reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
    Extended Event Session that I used;
    CREATE EVENT SESSION
        overly_complex_queries
    ON SERVER
    ADD EVENT sqlserver.error_reported
        ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
        WHERE ([severity] = 16
    AND [error_number] = 8623)
    ADD TARGET package0.asynchronous_file_target
    (SET filename = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xel' ,
        metadatafile = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xem',
        max_file_size = 10,
        max_rollover_files = 5)
    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
    GO
    -- Start the session
    ALTER EVENT SESSION overly_complex_queries
        ON SERVER STATE = START
    GO
    It creates only .xel file, but not .xem
    Any help/advice is greatly appreciated

    Hi VK_DBA,
    According to your error message, about which query statement may fail with error message 8623, as other post, you can use trace flag 4102 & 4118 for overcoming this error. Another way is looking for queries with very long IN lists, a large number of
    UNIONs, or a large number of nested sub-queries. These are the most common causes of this particular error message.
    The error 8623 occurs when attempting to select records through a query with a large number of entries in the "IN" clause (> 10,000). For avoiding this error, I suggest that you could apply the latest Cumulative Updates media for SQL Server 2012 Service
    Pack 1, then simplify the query. You may try divide and conquer approach to get part of the query working (as temp table) and then add extra joins / conditions. Or You could try to run the query using the hint option (force order), option (hash join), option
    (merge join) with a plan guide.
    For more information about error 8623, you can review the following article.
    http://blogs.technet.com/b/mdegre/archive/2012/03/13/8623-the-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Merge query error in Where clause

    Following error is coming when i execute the merge query. Anything wrong with this? I am using Oracle 9.2.0.1.
    Query:
    MERGE
         INTO incompletekalls ic
         USING live_small ls
         ON ((ls.callid = ic.callid) AND
         (ls.sdate = ic.sdate) AND
         (ls.stime = ic.stime))
    WHEN MATCHED THEN
         UPDATE
         SET     ic.adate = ls.adate,
              ic.atime = ls.atime,
              ic.edate = ls.edate,
              ic.etime = ls.etime
         WHERE
              ls.sdate = '16-Apr-09' AND ls.stime >= '09:00:00' AND ls.stime <= '11:00:00' AND ((ls.adate IS NULL) OR
              (ls.edate IS NULL))
    WHEN NOT MATCHED THEN
         INSERT (ic.callid,ic.cg,ic.cd,ic.re,ic.opc,ic.dpc,ic.sdate,ic.stime,ic.adate,ic.atime,ic.edate,ic.etime)
         VALUES (ls.callid,ls.cg,ls.cd,ls.re,ls.opc,ls.dpc,ls.sdate,ls.stime,ls.adate,ls.atime,ls.edate,ls.etime)
         WHERE ls.sdate >= '16-Apr-09' AND ls.stime >= '09:00:00' AND ls.stime <= '11:00:00'
    Error:
    SQL> /
    WHERE
    ERROR at line 13:
    ORA-00905: missing keyword

    Hi,
    From looking at the documented examples
    http://www.oracle.com/pls/db92/db92.drilldown?levelnum=2&toplevel=a96540&method=FULL&chapters=0&book=&wildcards=1&preference=&expand_all=&verb=&word=MERGE#a96540
    and on http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5318183934935
    I think that you cannot use the WHERE in your MERGE like that on 9i...
    Something else I want to warn you for:
    It's a bad idea to store your date and time separated as strings! You'll run into troubles sooner or later, for 100%...
    Use a single DATE column instead, in which you store both the date and time components..

  • Error Mail Merge Aborted due to error in creating the Mail Merge DataSource

    Dear All,
    please help me with this problem (Oracle release 12.0.4.)
    1. PROBLEM:
    When attempting to extract data, using Web ADI in HRMS, Word is selected as the viewer, but an Excel spreadsheet is generated rather than a MS Word document containing the data. Also error "Mail Merge Aborted due to error in creating the Mail Merge Data Source." appears on screen.
    We are using MS Office 2003.
    2. PROBLEM:
    Unable to create data source from HR form PAYWSLEE.
    We are using custom integrator. This integrator is attached to form function. Form function is attached to responsibility. We also created the layout.
    The next step would be to create data source from form PAYWSLEE, but we are not able to perform this...
    In release 11i we used this form (PAYWSLEE) to create datasource (for mailmerge), but in R12 this is not working... Something is missing here and I need your help to determine what. I checked the most documents on Oracle Support and didn't find solution for this problem...
    Please advise.
    Kind Regards,
    Andreja

    Hi all,
    Thanks for visiting our forum and sharing your experience here. It'll be benefited to our communicator.
    Have a good time.
    Regards,
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • While executing the query getting an error u2018Page Not Foundu2019 in the bowser.

    Hello,
    I opened a Bex Query in Query Analyzer and clicked on the Execute button to execute the query in our portal site. But I am getting an error u2018Page Not Foundu2019 in the bowser.
    As I am new to BI,Kindly guide me through the steps.
    what all setting needs to be done?
    Regards,
    Rachel

    Hi,
    The Path is C:\WINDOWS\system32\drivers\etc\hosts
    You need to update "host file" in your server/in your PC. So ask Network people to do it and also you need to change your browser LANsettings.
    Eg:   11.11.8.161     BWQ1     BWQ1.***.com
    Like above you need to change in your host file.
    Thanks
    Reddy
    Edited by: Surendra Reddy on Nov 27, 2008 8:12 AM

  • Error in while Executing Query in the Query Designer

    Hi,
    I  created info Set based two  info object and  three Data Store Objects. and join condition is Left Outer Join.
    there are Business Partner info object, CRM  BP Sales View Info Object and Data Store Objects are  BP: Roles (0BP_ROLE),Partner: Industries(0BP_IS),CRM Marketing Attributes for Business Partner(0ATR_DS01)
    I given some Selection Parameters while executing query in the Query Designer. in That i given city is selection parameters
    and i creted variable for this info object.
    it gives the Error Messages
    Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
    Der Wert "New Delhi " von Merkmal 0CITY40 enthält an der 10.ten Stelle einen Fehler
    it is very urgent , can any one help me regarding this.

    Hi Reddy,
    The Error message in english is this
    While reading the data mistakes have appeared. Navigation is possible
    The value " New of Delhi " from sign 0CITY40 contains a mistake at the 10.ten place
    and i think you need to run the change run and run the report with out selecting the variable option.and navigate in the report by filtering the report for your requirement.
    Try this and let me know.
    Thanks,
    RK

  • App-v 5.0 SP2 hotfix 5, an error occurred when querying the App-V WMI provider

    Hi,
    We have installed App-v 5.0 SP2 + hotfix 5 (via SCCM 2012 R2 CU1) on some Windows 7 clients. That worked fine but no app-v applications go through.
    Error:
    AppVPackageQueryClient5X::GetPackageDataByPackageGUID() failed for virtual application [a835fa1-f82a-4efe-957a-8c6678d4a431]. (0x87d01290)    AppVHandler    5/08/2014 10:23:56    3440 (0x0D70)
    CAppV5XHandler::DiscoverIndividuleApp() failed. (0x87d01290)    AppVHandler    5/08/2014 10:23:56    3440 (0x0D70)
    +++ Discovery of application [AppDT Id: ScopeId_8B8D93AF-5181-48FE-9202-2CFE5FC93EE2/DeploymentType_50eba242-3688-4b4f-9b61-84f0123f667d, Revision: 7] returned an error (0x87d01290).    AppVHandler    5/08/2014 10:23:56  
     3440 (0x0D70)
    CAppV5XHandler::DiscoverApp() failed. (0x87d01290)    AppVHandler    5/08/2014 10:23:56    3440 (0x0D70)
    Deployment type detection failed with error 0x87d01290.    AppDiscovery    5/08/2014 10:23:56    3440 (0x0D70)
    Failed to perform detection of app deployment type Microsoft - Console, revision 6) for user. Error 0x87d01290    AppDiscovery    5/08/2014 10:23:56    3440 (0x0D70)
    Error = 0x87d01290 =  An error occurred when querying the App-V WMI provider.
    Please advise on this specific error. Should we look for corruption in app-v client, problem in sccm client ...?
    J.
    Jan Hoedt
    Update: clients which don't have problems are client which had hotfix 4 THEN hotfix 5 installed. Should we install it that order? Client WITH problems have App-v 5.0 SP2 then hotfix 5 directly.
    Update2: I installed the app-v client via setup.exe, the hotfix 4 also via setup.exe but since it installed all language packs, I decided to extract hotfix 5 and use the msp.
    Could that be cause of the issue? I could use the exe of hotfix 5 but then I need to be sure how NOT to install all the language packs.

    I think we found a solution ourselves.
    My update2 (question) explains it:
    Update2: I installed the app-v client via setup.exe, the hotfix 4 also via setup.exe but since it installed all language packs, I decided to extract hotfix 5 and use the msp.
    Could that be cause of the issue? I could use the exe of hotfix 5 but then I need to be sure how NOT to install all the language packs.
    We installed App-v 5.0 SP2 via exe then installed hotfix via msp (extracted msp), this doesn't seem to work (though installation was succesfull). When we deploy the hotfix via the exe it works correctly.
    Not sure why though.
    Jan Hoedt

  • The query against the database caused an error in https: site

    Hi
    I have created a new Data source and External content type in sharePoint 2013
    I have also given all the permission to this Content type (including "Users(Windows)")
    I also having edit permission in the Sql-database.
    I have tied almost all the possibilities given in the net for this error.
    still the error("the query against the database caused an error") is there.
    Is this because of "https:/ " in the url?
    Can any one give a suggestion / solution for this?
    Thanks
    S H A J A N

    Hi,
    Can you please check ULS Log as well as event viewer, to see if there's any related error reported?
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • SQL Query Posting the Data Properly but Generating An Error

    I've created a SQL query to update records in a database.  While testing I used an Access database and it worked perfectly.  To go into production I've moved the data to SQLServer 2005 installed on my xMII server.  The SQL syntax is different for handling dates between the two databases so I modified my queries accordingly.  I now have:
    UPDATE ControlLimits SET Metric_ID='[Param.1]', CDate='[Param.2]', LCL=[Param.3], Mean=[Param.4], UCL=[Param.5]
    Where  (Metric_ID='[Param.1]' and CDate = '[Param.2]')
    CDate is my date field being passed in the format 'mm/dd/yyyy', the table field is formatted for datetime - the same as in Access.
    When running this query (with the [Param.x]'s being replaced with actual values)through SQL Server Management Studio on the xMII server, it works just fine.  When run as a query template, the data is posted properly to the table but the template returns a 'A SQL Error has occurred on query, The statement did not return a result set..' 
    Any ideas?
    David

    Udayan,
    You are absolutely correct!  When I did it in Access I was correctly using the Command mode.  When I moved to the SQL Server data source in my query template, I picked the Fixed Query mode by mistake.
    Thanks for your help!
    Regards,
    David

  • Workflow manager 1.0 : runtime error 400 running Add-WFHost "The api-version in the query string is not supported"

    Installing Workflow Manager 1.0 for SharePoint Server 2013 SP1 everything is fine until the last step of the configuration and last powershell command : 
    Add-WFHost -WFFarmDBConnectionString 'myconnectionstring' -RunAsPassword $WFRunAsPassword -EnableFirewallRules $true -SBClientConfiguration $SBClientConfiguration -CertificateAutoGenerationKey $WFCertAutoGenerationKey -Verbose;
    gives me the following error : 
    Add-WFHost : The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of '2012-03'..TrackingId:412684e3-3539-468e-91e6-17838c6eaa55_GS
    P,TimeStamp:04/04/2014 12:54:11
    At line:1 char:1
    Can't find anything about this subject except this
    thread which does not help me that much in SharePoint dev env ...
    Removing workflow manager 1.0 and service bus (leave the farm using wizzard, remove binaries and databases) does not help.
    Who already faces this issue and how can I try to resolve it ?
    Best regards !
    Alexandre DAVID

    The API version is hardcoded in Microsoft.ServiceBus.dll, which ships as part of the Service Bus. Each version of this lib has a different string.
    If you install workflow manager 1.0, here are the pre-requisites:
    .NET Framework 4 Platform Update 3 or .NET Framework 4.5
    Service Bus 1.0
    Workflow Client 1.0
    PowerShell 3.0
    The following are the pre-requisites to configure Workflow Manager 1.0
    Instance of SQL Server 2008 R2 SP1, SQL Server Express 2008 R2 SP1, or SQL Server 2012.
    TCP/IP connections or named pipes must be configured in SQL Server.
    Windows Firewall must be enabled. [Windows Firewall is Off on target server]
    Ports 12290 and 12291 must be available.
    Here are the reference for installing and configuring Workflow Manager 1.0:
    http://lennytech.wordpress.com/2013/06/02/installing-workflow-manager-1-0/
    http://lennytech.wordpress.com/2013/06/02/configuring-workflow-manager-1-0/
    http://social.technet.microsoft.com/Forums/en-US/c74507fb-ac2d-405f-b19c-2712b1055708/workflow-manager-10-configuration-service-bus-for-windows-server-the-api-version-is-not?forum=sharepointadmin

Maybe you are looking for