Error in User Query

Hello, I have the following User Query:
SELECT T.USERID As EmpID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE AS GeneralRate, T.CARDCODE As CardCode, T.CARDNAME As CardName, SUM(ISNULL(T.APPROVED_HOURS,0)*ISNULL(T.RATE,0)) As BilledAmount, T.GENCHECK AS CheckNumber, OVPM.[CheckSum], OVPM.DOCDATE
FROM SCCG_WB_TIME AS T LEFT JOIN OHEM ON OHEM.EMPID=T.USERID LEFT JOIN OVPM ON T.GENCHECK = OVPM.DOCNUM
WHERE ISNULL(T.GENCHECK, 0)<>0 AND <b>T.USERID =[%0]</b>
GROUP BY T.USERID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE, T.CARDCODE, T.CARDNAME, T.GENCHECK, OVPM.[CheckSum], OVPM.DOCDATE
I get an error because of the variable I have. When I press Execute I just get '' (SEWSY) error message in red. Without the variable is working fine. Please help me!
Thank you,
Irina

Hi Irinca,
I think (can't test it) the problem is the not-system-nor-usertable-but-yours table created in SBO that you're passing the variable (SCCG_WB_TIME, just in case).
Try something like,
DECLARE @UserId int
SET @UserId = (SELECT TOP 1 T0.INTERNAL_K FROM [dbo].[OUSR] T0 WHERE T0.U_NAME = '[%0]')
...(your query....)... T.USERID = @UserId...
HTH,
Ian

Similar Messages

  • Error in running a query in XSJS - column store error: [2950] user is not authorized :  at ptime/session/dist/RemoteQueryExecution.cc:1354]

    Hi All,
    I get the below error when i load my xsjs file in browser,
    Error while executing query: [dberror(PreparedStatement.executeQuery): 2048 - column store error: column store error: [2950] user is not authorized : at ptime/session/dist/RemoteQueryExecution.cc:1354]
    I am able to execute the same query in  HANA SQL editor
    Please note that ,No Analytical privileges are applied to the view.
    Could you please help solving this issue.
    Regards,
    Logesh Kumar.

    Hay,
    are you using the same Database user for both SQL Editor and XSJS ?
    try the following.
    Before executing the query , display it and copy the same from browser and execute in SQL editor.
    Put the statement in  a try catch block and analyse the exception .
    Sreehari

  • User query error

    Dear all,
    I have a user query like below
    Select T001.ItemCode, T001.Warehouse
    from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
                  FROM OINM T00
                  Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
                                          FROM OINM T0
                                      WHERE T0.[DocDate] > [%0]
                                     GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
                  on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
    I got an error Must specify table to select from
    If I remove
    WHERE T0.[DocDate] > [%0]
    it works fine
    Select T001.ItemCode, T001.Warehouse
    from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
                  FROM OINM T00
                  Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
                                          FROM OINM T0
                                     GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
                  on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
    If I just run below, it works fine
    SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
                  FROM OINM T00
                  Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
                                          FROM OINM T0
                                      WHERE T0.[DocDate] > [%0]
                                     GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
                  on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]
    Is this a SAP limitation? I really need to have a
    WHERE T0.[DocDate] > [%0]
    in this query.
    Any idea? Thanks in advance.
    Regards,
    Yuka

    HI,
    Try this:
    /*SELECT FROM [dbo].[OINM] T9*/
    declare  @DocDate as datetime
    /* WHERE */
    set @DocDate = /* T9.DueDate */ '[%0]'
    Select T001.ItemCode, T001.Warehouse
    from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
                  FROM OINM T00
                  Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
                                          FROM OINM T0
                                      WHERE T0.[DocDate] > @DocDate
                                     GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
                  on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
    Thanks,
    neetu

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • Getting below error while opening query in bex  3.5x

    Dear Guru's
    I am getting below error while opening query in bex  3.5x
    The following object were not found when accesing the server .
    Press repair to correct the problem (included parts of query deleted) press cancel to undo the last action.
    Regards
    Karan

    Hi,
    1) When a query administrator with the sufficient authorization (sap_all or the * authorization for the field in the authorization object) is creating the query in query designer including the 'attributes' which are not visible with the 'normal' authorizations, the query will not list the columns in the output when it is executed by the normal user.
    2) so create an authorization object for each of these attributes with * (full authorization)
    Regards,
    Marasa.

  • OBIEE 11g Active Directory Presentation Service Error retrieving user

    Hi Team,
    It was a great help from all of you on our OBIEE learnings.
    I recently configured Microsoft AD on Weblogic rather than RPD. But felt like I am in a desert of helplessness due to the complicated and lengthy documents and settings :(
    Still when I configured everything and logged in to presentation services using AD Credentials, observed following error!
    Error retrieving user/group data from Oracle BI Server's User Population API.
    Error Details
    Error Codes: GDU6UYHS:OPR4ONWY:U9IM8TAC:OI2DL65P:SDKE4UTF
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 13049] User 'gp06108' with 'oracle.bi.publisher.scheduleReport;AtAGlance;oracle.bi.publisher.accessReportOutput;_all_;oracle.bi.publisher.accessExcelReportAnalyzer;_all_;oracle.epm.financialreporting.accessReporting;Explore;oracle.bi.publisher.accessOnlineReportAnalyzer;EPM_Essbase_Filter;oracle.bi.publisher.runReportOnline;oracle.as.scheduler.security.MetadataPermission' permission can not query user population.Please have your System Administrator look at the log for more details on this error. (HY000)
    Please have your System Administrator look at the log for more details on this error.
    Expression: privileges['Admin: Catalog']['Change Permissions']
    Total blockout! Anyone faced this issue earlier

    You need a user to be present in your Active Directory Base DN that will be used as the BISystemUser. You will either have to create this user in AD or use an existing AD user and then specify its credentials in Enterprise Manager (expand Weblogic Domain > bifoundation_domain (right click) > Security > Credentials). You will need to set system.user credential under oracle.bi.system map. Make sure your AD user's password never expires or you will run into problems in a few weeks time!
    Paul

  • Error while copy query between infocubes

    I was trying to copy a query between infocubes and ended with error message.
    Query copied from Infocube A to Infocube B. Infocube B has an additional dimension with 2 char's when compared to infocube A.
    Using transaction RSZC, I tried to copy the query, but ended up with following error..
    1.Program error in class COPY_QRY_TO_CUBE method : UNCAUGHT_EXCEPTION
    2.An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
    3.The system tried to insert a data record, even though a data record with the same primary key already exists
    I also tried using function module RSZ_I_COPY_QRY_TO_CUBE, which was of no help. I get the following message with the function module...
    1. Program error in class RS_TESTFRAME_CALL method : UNCAUGHT_EXCEPTION
    2. An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
    3. The system tried to insert a data record, even though a data record with the same primary key already exists
    I have also tried a solution in BW expert by using debugging mode of the above function module, again this was of no help..
    I am BI 7.0 SP09...
    Any ideas, Please....
    Thanks,
    RR
    Message was edited by:
            Ray R

    Hello,
    Are you trying to copy Business Content delivered Queries?
    I had also got this error when copying over all queries from one cube to another. Reason for this message was plain simple - I did not realise that the sender Cube had Business Content Query which we cannot copy over using RSZC as system tries to create another query with suffix as 0****_1. We cannot create query in SAP user namespace. Error message is different then the reason behind it.
    Thanks
    Ravi

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • Is it possible to use parameter in a user query with subquery ?

    Hi ,
    i need to use parameter ( [%0] ) in user query using a subquery , but i have errors message when i execute the query 
    example :
    SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode]  =N'[%0]'
    union all
    SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode]  =N'[%0]'
    works fine
    but ( exactly the same query in the subquery )
    Select t2.Docnum ,t2.cde , t2.fact from
    SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode]  =N'[%0]'
    union all
    SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode]  =N'[%0]'
    ) t2
    return an error message
    the same query without parameter works fine too :
    Select Docnum ,cde , fact from
    SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode]  ='C1'
    union all
    SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode]  ='C1'
    ) t2
    Is it possible to use parameter in a subquery ?
    thanks

    Try this one:
    declare @cc nvarchar(20)
    set @cc=/*Select c.cardcode from OCRD c where c.cardcode=*/'[%0]'
    Select Docnum ,cde , fact from
    SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode]  =@cc
    union all
    SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode]  =@cc
    ) t2

  • Error Executing Database Query

    I have a web application written in CF8 with Oracle 11g as the back end. This application has been used very often for more than 6 years. Currently I am moving to CF10 and did only a little modification to the CF codes. When I ran the new application in my test server, everything seems to be working just fine except when it calls an Oracle Package. This action produces an error:  Error Executing Database Query The strange thing is everything work before and after calling the procedure, I tested using cfabort This Oracle Package is still working in production server (CF8)  but not when it is called by CF10. My question is: Is there any changes for CF10 when calling a procedures? or is there any hotfix that I'm not aware of? The code is as follow:   SELECT case trim(to_char(SYSDATE, 'DAY')) WHEN 'MONDAY' then '1' else '2' end AS TodaysDate                 from dual     
                SELECT Count(other_id) AS NoRecFound     FROM gl_dup_ids_ssns     WHERE Trim(create_date) = 
                SELECT Count(other_id) AS NoRecFound     FROM gl_dup_ids_ssns     WHERE Trim(create_date) =         CF codes to Stop the process and email admin                                                             
                  Error Executing Database Query shows up when it hit to run cfstoredproc. The codes are exactly the same as in CF8, this template was not modified. Exceptions 14:03:53.053 - Database Exception - in /home/space/users/www/GL/glproc.cfm : line 93     Error Executing Database Query. 

    mega_L wrote:
    SELECT case trim(to_char(SYSDATE, 'DAY')) WHEN 'MONDAY' then '1' else '2' end AS TodaysDate                 from dual     
                SELECT Count(other_id) AS NoRecFound     FROM gl_dup_ids_ssns     WHERE Trim(create_date) =
                SELECT Count(other_id) AS NoRecFound     FROM gl_dup_ids_ssns     WHERE Trim(create_date) =         CF codes to Stop the process and email admin                                                            
    Surely, that cannot be the actual SQL, as it is obviously invalid.

  • 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

  • Error Executing Database Query.coldfusion.sql.DatabaseConnectionException: Timed out trying to establish connection

    My coldfusion service crashes intermitantly and when I check
    the application logs the error that I see for the time frame is the
    one below. Does anyone know where I might begain to solve this?
    Thanks!
    Error Executing Database
    Query.coldfusion.sql.DatabaseConnectionException: Timed out trying
    to establish connection The specific sequence of files included or
    processed is: E:\wwwroot\lifeworks\default.cfm

    I'm no expert, but thought I would try to be helpful.
    I was getting this same error on a regular basis.
    The short term fix was to restart the ODBC server service.
    The long term fix was twofold:
    1. I recreated the ODBC connection in ColdFusion
    Administrator to use the system connection (I was using the SA and
    PW for login).
    2. I created a second user ODBC connection as well as the
    system one under ODBC in Windows Server 2003.
    I haven't had the problem since.
    I also read a pretty good set of "stuff" to try from the help
    area:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_17277
    Hope this helps.

  • Link user query to required print layout

    Hi all,
    I tried linking my user query to a required print layout for user reports.
    I have followed the same procedure as given in  (Query PLD.pdf ) but when I try to save ,
    I get the following error
    Items were found with the same exclusive no [Message 101-19 ]
    Can anybody help me with this
    Thanks
    Nirmala B.

    finally got it

  • Error executing dB Query   help??

    I'm creating a simple content management system with DW &
    CF using an Access DB. I set up the DB in the CF Administrator as
    Access with unicode.
    My DB has several tables...users, usertypes, events,
    eventtypes, reviews.
    I built the usertype admin pages with no problems. Everything
    is working well and my pages are interacting well with the
    usertypes table in the db. I'm currently building the user admin
    pages and now I'm having problems when I try to add records into
    the users table. On my add page I've created a recordset with all
    of my usertypes in it. Also, I'm using the record insertion form
    wizard in DW.
    I'm getting the following error:
    Error Executing Database Query.
    Syntax error in INSERT INTO statement.
    The error occurred in
    C:\CFusionMX7\wwwroot\pentanglecf\admin\users\add.cfm: line 64
    62 : <cfelse>
    63 : NULL
    64 : </cfif>
    65 : )
    66 : </cfquery>
    BTW, I'm using Dan Short's very good DW 8 Dynamic Development
    tutorials on Lynda.Com. Has anyone used this before? Any help is
    greatly appreciated.
    Luis
    Casegama.Com

    Thanks Ken but I think I had posted the incorrect code for a
    few minutes before I made the correction. Below is both the CF code
    and the SQL command (also up above). I'm still having issues and
    any help is greatly appreciated.
    thanks,
    Luis
    Casegama.com
    <cflock scope="Session" type="ReadOnly" timeout="30"
    throwontimeout="no">
    <cfset
    MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
    <cfset
    MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthor ization",DE(""))>
    </cflock>
    <cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR
    ListFind("1,2",MM_UserAuthorization) EQ 0>
    <cfset MM_referer=CGI.SCRIPT_NAME>
    <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_referer=MM_referer & "?" &
    CGI.QUERY_STRING>
    </cfif>
    <cfset MM_failureURL="login.cfm?accessdenied=" &
    URLEncodedFormat(MM_referer)>
    <cflocation url="#MM_failureURL#" addtoken="no">
    </cfif>
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND
    FORM.MM_InsertRecord EQ "form1">
    <cfquery datasource="#Request.DSN#">
    INSERT INTO Users (Username, Password, FirstName, LastName,
    EmailAddress, Admin, Allowed, UserTypeID)
    VALUES (
    <cfif IsDefined("FORM.Username") AND #FORM.Username# NEQ
    "">
    '#FORM.Username#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.Password") AND #FORM.Password# NEQ
    "">
    '#FORM.Password#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.FirstName") AND #FORM.FirstName# NEQ
    "">
    '#FORM.FirstName#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.LastName") AND #FORM.LastName# NEQ
    "">
    '#FORM.LastName#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.EmailAddress") AND
    #FORM.EmailAddress# NEQ "">
    '#FORM.EmailAddress#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.Admin")>
    Yes
    <cfelse>
    No
    </cfif>
    <cfif IsDefined("FORM.Allowed")>
    Yes
    <cfelse>
    No
    </cfif>
    <cfif IsDefined("FORM.UserTypeID") AND #FORM.UserTypeID#
    NEQ "">
    #FORM.UserTypeID#
    <cfelse>
    NULL
    </cfif>
    </cfquery>
    <cflocation url="index.cfm">
    </cfif>
    <cfquery name="rsUserTypes" datasource="#Request.DSN#">
    SELECT *
    FROM UserTypes
    ORDER BY UserType ASC
    </cfquery>

  • Error of modified query in VO

    Hi,
    I extended a VO by modifying its query to the following:
    SELECT * FROM (select ptv.project_number,
    ptv.project_id,
    ppp.organization_id,
    ptv.task_number,
    ptv.task_name,
    ptv.task_id
    from pjm_project_parameters ppp,
    pjm_tasks_v ptv,
    csi_item_instances cii,
    eam_org_maint_defaults eomd
    where ppp.project_id = ptv.project_id(+)
    and substr(ptv.task_number, 12, 7) = eomd.accounting_class_code
    and eomd.object_id = cii.instance_id
    and eomd.organization_id = ppp.organization_id
    and cii.instance_number = :asset_number
    The execution is fine on the first run but once a value is chosen and the user wants to modify it by clicking again on the small magnifier icon on the jsp page we get this error when we click on go we get the following error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select ptv.project_number,
    ptv.project_id,
    ppp.organization_id,
    ptv.task_number,
    ptv.task_name,
    ptv.task_id
    from pjm_project_parameters ppp,
    pjm_tasks_v ptv,
    csi_item_instances cii,
    eam_org_maint_defaults eomd
    where ppp.project_id = ptv.project_id(+)
    and substr(ptv.task_number, 12, 7) = eomd.accounting_class_code
    and eomd.object_id = cii.instance_id
    and eomd.organization_id = ppp.organization_id
    and cii.instance_number = :asset_number) QRSLT WHERE (( TASK_ID = :3 AND UPPER(TASK_NUMBER) like :4 AND (TASK_NUMBER like :5 OR TASK_NUMBER like :6 OR TASK_NUMBER like :7 OR TASK_NUMBER like :8))) ORDER BY task_number
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:8210)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3916)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13759)
    It seems as oracle is trying to set a parameter that does not occur inside the query what can be done in order to solve this issue?
    Cheers,
    Carl

    I just figured something REALLY weird that might be the cause of the problem.
    If i repeatedly reproduce the error page the query changes and the parameters increment...
    here is an example
    first error: and cii.instance_number = :asset_number) QRSLT WHERE (( TASK_ID = :3 AND UPPER(TASK_NUMBER) like :4 AND (TASK_NUMBER like :5 OR TASK_NUMBER like :6 OR TASK_NUMBER like :7 OR TASK_NUMBER like :8))) ORDER BY task_number
    second error: and cii.instance_number = :asset_number) QRSLT WHERE (( TASK_ID = :4 AND UPPER(TASK_NUMBER) like :5 AND (TASK_NUMBER like :6 OR TASK_NUMBER like :7 OR TASK_NUMBER like :8 OR TASK_NUMBER like :9))) ORDER BY task_number
    third error: and cii.instance_number = :asset_number) QRSLT WHERE (( TASK_ID = :5 AND UPPER(TASK_NUMBER) like :6 AND (TASK_NUMBER like :7 OR TASK_NUMBER like :8 OR TASK_NUMBER like :9 OR TASK_NUMBER like :10))) ORDER BY task_number
    As it can observed the number of the parameter increment! why? This explains why in the first few execution it works and then the IDs of the parameters get out of sync and this is why i get an error.
    Does anyone have any idea how i can resolve this issue,
    Cheers,
    Carl

Maybe you are looking for

  • How to create a custom focus manager in jdk1.4

    Dear All, I'm now trying to create a form for user to submit data. The key tab are easily to tab between textfields in html, you can set whatever order you want. But when I tried to create a form using java, I found very hard to do so. Any reference

  • How to call a cross platform OS command in Scenario?

    Dear all, I have two servers, server W & server L, which is in Windows & Linux platform respectively. I installed ODI agents in both servers. Then I created a scenario which contains a procedure with a Windows OS command. I run it successfully if I k

  • Problem in Pavilion dv6-6050se webcam

    can't start integrated webcam of my computer and when start cyberlink youcam give me next message " Warning no webcam detected. try pluging in a webcam into your computer now . if you are using an itegrated camera make sure that it is turned on." how

  • Firewire port on Motorola QIP-7216

    I want to record to my computer and was told I could do it this way... I plugged in the cord but I cannot find any drivers... I am using Windows 7 64-bit. The following 3 things poped up with no drivers found: http://i39.tinypic.com/4q31a0.jpg

  • Remove duplicates for list object

    Hi, I have retrieved all the xml node values in List<object>. Now, I want to remove all the duplicates objects from that list. Example: If the object has n properties, I should remove only duplicate objects that have same values in all the n properti