Problem In Executing Query In JSP-Oracle

I have one Query with some conditions in it. It showing error in JSP page when Run it like FROM keyword not found where expected, but this query running well in Oracle SQL Developer. The query is given below.
SELECT SCC.STACK_ID, S.SEVERITY_LOWER AS SEVERITY, S.LOWERSPECLIMITRISK AS RISK, SCC.SENS, S.NMBR || ' - ' || S.DESCRIPTION AS STACK, 'LSL = ' || S.DESIGNLOWERSPECLIMIT AS "SPEC LIMIT", SCC.ROW_IN_STACK AS "STACK ROW" FROM STACKS S, STACK_CONT_C SCC WHERE S.STACK_ID = SCC.STACK_ID AND (SCC.CONT_ID = :c_id) AND (SCC.SENS < 0) AND (S.DESIGNLOWERSPECLIMIT IS NOT NULL) UNION SELECT SCC.STACK_ID, S.SEVERITY_UPPER AS SEVERITY, S.UPPERSPECLIMITRISK AS RISK, SCC.SENS, S.NMBR || ' - ' || S.DESCRIPTION AS STACK, 'USL = ' || S.DESIGNUPPERSPECLIMIT AS "SPEC LIMIT", SCC.ROW_IN_STACK AS "STACK ROW" FROM STACKS S, STACK_CONT_C SCC WHERE S.STACK_ID = SCC.STACK_ID AND (SCC.CONT_ID = :c_id) AND (SCC.SENS >= 0) AND (S.DESIGNUPPERSPECLIMIT IS NOT NULL) ORDER BY SEVERITY DESC

Your sql string contains double quotes in it. Are you escaping them properly in Java?
Please show your code for invoking this sql statement?
What jdbc driver are you using? oracle thin? oci8? ODBC?

Similar Messages

  • Problem in executing query in browser and bex analyzer

    i am not able to execute query in browser nor bex analyzer...
    problem is that i dont have option to run in bex analyzer in query designer (menu bar seems missing in query designer and how can i get enabled
    and when execute the query in browser using bex query designer ..it prompts me with following error
    URL http://saperpdev.saperpdev.com:8002/sap/bw/BEx call was terminated because the corresponding service is not available
    Note
    ■The termination occurred in system ERD with error code 403 and for the reason Forbidden.
    ■The selected virtual host was 0
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:SAPERPDEV_ERD_02-v:0-s:403-r:Forbidden
    and i tried to open the query from bex analyzer  level
    it prompts me as follows
    macros are disabled because the security level is set to high and digitally signedtrusted certificate is not attached to the macros,to run the macros change the security level to lower settings
    pls suggest me

    hi suman,
    thanks for your response.. but let me be more clear
    i am using sap gui 7.20 front end and when i execute rrmx i am able to navigate to BEx analyzer but when i tried to open a report which i create i get following error message..
    you do not have sufficient authorization for infoprovider zic_proj
    function module  /SDF/AL_MAP_TRANSID_LOGH doesnt exit
    second thing is that i tried from bex query designer to execute the report ..but i am not able to execute the report...
    i hope some connections seems missing..please let me know what to do ASAP..
    and where can i post this question to get fast reply

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Problem in execute query?

    hello all,
    table structure:
    create table cor_dept_mst (dept_locn_code varchar2(6) not null,
    dept_code varchar2(2) not null, dept_name varchar2(200), constraint cordeptmst_pk primary key(dept_locn_code,dept_code));
    in form all 3 feilds dispaly.
    when i save new record.. save successfully.
    but when i execute query records not display (do not pass any value)
    records are display after execute if and only if i pass value to dept_code. in this case i pass 01 for dept_code and all records displaying...
    this very silly error.. i use block where clause.
    please help
    thanks
    yash

    oopss.....
    there was a silly code which halt the execute query...

  • Problem in executing query in RSCRM_BAPI  & output in application server!

    hi Experts,
    We executed a query using RSCRM_BAPI transaction and write it to the application server.We found the following problem.
    In the query we have restricted the keyfigures such that each have 2 decimal places but when we execute the query using RSCRM_BAPI and writing into the application server the more than 2 decimal places are coming in to the file.
    For example:
    In the query the value is 12.12 but in the application server its written as 12.1200000
    So the width gets elongated and some of the keyfigures are truncated.
    We have already have gone through the restrictions in the SAP Note Number 605208
    Please help us to find a solution to get output of keyfigures same as whatever coming in the output of query.
    Thanks in advance
    Somenath

    sorry, i mistakenly sent it in different id....this is my id.......if it is useful assign points to this id...
    Using RSCRM_BAPI, RSCRM_REPORT, suitable for simple query.
    In your query you are using Restricted, calculated keyfigure.in that case RSCRM_BAPI, RSCRM_REPORT has some restriction.
    Check OSS 605208 which describes RSCRM_BAPI restrictions .
    Re: Master Data Datasources
    You can Modify the Wrtiequery abap program for your requirement.
    or
    Create a ABAP program for extracting a bw query and upload it in Application server in csv format.
    Thanks,
    senthil kumar

  • Problems with executing shell script within oracle procedure

    I have procedure that's owned by Semantic user. This procedure calls job scheduler (owned by USER1) which in turn executes a shell script load_semantic.sh (owned by USER1).
    Now, there is a shell script(checkCount.sh)inside of this one (owned by this USER1) that has following contents:
    checkCount.sh
    #!/bin/bash
    MODEL=$1
    sqlplus -S user/pass << EOF
    whenever sqlerror exit 1;
    set echo on
    set verify off
    MERGE INTO SEMANTIC.COUNT_STATISTICS s
    USING (SELECT '$MODEL' AS MODEL, 0 AS NEW_COUNT, SYSDATE AS NEW_DATE, 0 AS OLD_COUNT, SYSDATE AS OLD_DATE FROM dual) t
    on (s.MODEL = t.MODEL)
    when not matched then
    INSERT (s.MODEL, s.NEW_COUNT, s.NEW_DATE, s.OLD_COUNT, s.OLD_DATE)
    VALUES (t.MODEL, t.NEW_COUNT, t.NEW_DATE, t.OLD_COUNT, t.OLD_DATE);
    COMMIT;
    UPDATE SEMANTIC.COUNT_STATISTICS SET  MODEL = '$MODEL', NEW_COUNT = (SELECT COUNT(*) FROM TABLE(SEM_MATCH('{?s ?p ?o}',SEM_Models('$MODEL'),NULL,SEM_ALIASES(SEM_ALIAS('','http://VISION/DataSource/SEMANTIC#')),NULL)) ),NEW_DATE  = SYSDATE,
    OLD_COUNT = NEW_COUNT, OLD_DATE  = NEW_DATE WHERE MODEL = '$MODEL' AND NEW_DATE = (select max(NEW_DATE) from SEMANTIC.COUNT_STATISTICS where MODEL = '$MODEL');
    COMMIT;
    exit;
    EOF
    So when I execute SEMANTIC.PROCEDURE:
    SEMANTIC.PROCEDURE => USER1.JOBSCHEDULER =>USER1.load_semantic.sh =>USER1.checkCount.sh
    It never populates the table SEMANTIC.COUNT_STATISTICS.
    I tried giving all of the permissions but I am probably missing something...
    Maybe fresh eyes can see something that I can't.

    I can't believe I am going to say this but the reason it was not working was because I removed oracle environment path from my script by mistake.
    . /etc/profile.d/oracle.sh
    Ugh...
    Now it is working perfectly.
    Btw, sqlplus does know about shell environment variables.
    THANK YOU GUYS!!! YOU ARE THE BEST!!!!!!!!!!!!!!!!!!
    I ONLY HAVE YOU TO TALK TO WHEN I AM STUCK ON A PROBLEM.

  • BI 7.0 Problem while executing query on Infoset containing Infocubes

    Hi All,
    While executing quey on infoset containing infocubes we are getting following error message.
    EError while reading data; navigation is possible
    EError reading the data of InfoProvider A2PPI103
    EError when generating the SQL statement
    E[IBM][CLI Driver][DB2] DSNT408I SQLCODE = -204, ER ROR:  SAPR3.T00001 IS
    I>> Row: 11 Inc: RAISE_READ_ERROR Prog: CL_RSDRV_VPROV_BASE
    any idea what could be the reason ?

    Hi All,
    it's very interesting the question of HariPrasad because from yesterday i have the same problem in  a similar environment:
    @5C\QError@     Error reading the data of InfoProvider ZC1ITS02
    @5C\QError@     Error when generating the SQL statement
    @5C\QError@     [IBM][CLI Driver][DB2] DSNT408I SQLCODE = -204, ERROR:  SAPBWD.T00002 IS AN UNDEFINED NAME  DSNT41 8I SQLSTATE   = 42704 SQLSTA
    May the SQL generator does'nt work well whit cube and DB2 ??
    If i execute the Infoset with the debbugging option i can see the SQL code:
    ...........FROM "/BIC/PZC1CPROD0" "T00001",
    "T00002"
    WHERE................
    the first table is an infoobject, the second one is the "missing" cube...............
    Hari, did you solve the problem in the meantime ??
    Thank's to all, Ray.

  • Problem in executing query

    Hi
    I am executing a query where the query gets data from a source system through infosets. So query fetch the data by Infosets using synonym concept.We have structure in BW system and synonym is created in the source system pointing to the BW structure. data is not existed physically in BW system. There will be structure in BW but we wonu2019t store any data in BW system. We create link between source system and BW system through database.
    When i execute the query with certian parameters i am not able to pull the data for a particular posting date. But the data for that particular posting date is available in source system. If i execute without poating date or period i am able to see the data for all the posting date except the posting date which earlier i was looking for.
    Can anyone help me out with this, any possible reasons for the issue,
    Thanks in advance
    RRN-KAR

    So , are you searching for a solution still or not ? It is confusing to see 'Pls Ignore' and 'Not answered'.

  • ABAP For HANA as secondary DB problem in execute query decleration.

    Hello Experts,
    I am fetching data from HANA DB as secondary database using ADBC. When I am going to concatenate native SQL query its geting more than 255 char and here is the problem.
    Please suggest how can I deal with more than 255 char string query.
    GV_SQL is query which is string.
    e.g.  GO_RESULT = GO_SQL->EXECUTE_QUERY( GV_SQL ).
    Regards,
    Amol

    Hi Fernando,
         1.Actually I am not facing any problem with ADBC. Just ABAP predefined type STRING is not accepting more than 255 character length.
         2.At the time of concatenating fields, HANA view path and where conditions it is getting more than 255 character, hence at the time execution of query getting failed.
         3.  GV_SQL type string.
    GV_SQL =  |SELECT MANDT....(more than 255 character length)| &&
                       |FROM _SYS_BIC."dev.re.e10.cal.fi.tr/CV_COSTELEMENT_TEST" |
                 && |('PLACEHOLDER' = ('$$IP_BUKRS$$', '{ P_WERKS }')) |.
    GV_SQL storing only 255 character, I wanted a string to store more than 1000 character length.
    Regards,
    Amol

  • Problem while executing query in BEX

    Hello Experts .
    Whenever I execute the standard query based on info cube 0PA_C01 in bex it gives following message for first time , but if excute the same query second time it wont gives the msg . Pls it is very urgent .
    msg :
    Characteristic 0CALMONTH was changed in InfoCube 0PA_C01. Adjust the query
    Characteristic 0EMPLOYEE was changed in InfoCube 0PA_C01. Adjust the query

    Hello Raghavendra,
    welcome aboard!!
    You need to make the change globally and save it by going in the change mode.
    when u next time execute the same after relogin u wont face this issue.
    Hope it helps...
    thanks,
    (pls. dont forget to assign points for helpful answers)

  • Problem with execute query

    Hi all,
    I am modifying a form,
    when i ran this form, in enter query(F7), i enter the value and do F8 but it returns no value
    but value exist in table in database,
    i do not know if i modifyed something related to (F7) and (F8)
    Do you have any idea?
    Thanks!
    Edited by: Tabit7 on 2012-02-27 15:31

    Tabit7 wrote:
    Hi all,
    I am modifying a form,
    when i ran this form, in enter query(F7), i enter the value and do F8 but it returns no value
    but value exist in table in database,
    i do not know if i modifyed something related to (F7) and (F8)
    Do you have any idea?
    Thanks!
    Edited by: Tabit7 on 2012-02-27 15:31In normal stage, i mean, when you press F8 in fresh form does it execute data ?

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • How to implement enter and execute query in ADF

    I am new to ADF and I am trying to create a simple data entry screen in ADF 11g based on a database table. I am looking to implement the equivalent of the Enter Query and Execute Query feature in Oracle Forms. I tried the default operations that are available with the data controls. But they don't seem to have this feature. Can someone help me / point me to how this can be implemented.
    Thanks,
    Srini.

    Thanks Shay. As per your suggestion I have included the Find and Execute buttons for the VO Object and ran the page. I first clicked the Find button and entered by query condition and then clicked the Execute button. At this point I get an error popup asking me to enter values for all the mandatory fields. Am I missing something?
    Regards,
    Srini.

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • Problem use SQL query in coding report with SBO

    Hi everyone!
    I have problem in execute query to delete and create a report with SQL 2000 in SAP.
    Try
            oForm.DataSources.DataTables.Item(0).ExecuteQuery("DELETE FROM rptReport")
    Catch ex As Exception
    End Try
             oForm.DataSources.DataTables.Add("TestReport")
             oForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT     Number, RefDate, Memo        into  rptReport   FROM         dbo.OJDT")
             oTable = oForm.DataSources.DataTables.Item("TestReport")
    This code is error. I don't know how to execute 2 this sql command. Hope everyone help me hix hix!  .

    /Invalid query tree  [300-33]. The SQL error is 8180/
    But search in SQL book hasn't got that err. Some person spoke ExecuteQuery property wasn't support Table Delete and Create, it only support simple Select... I tried to use Recordset but don't success. Can I use "Delete" and "Select ... Into..."   query another style??? Help me, please...!!!

Maybe you are looking for

  • HT203372 The operation can't be completed because the original item for "/" can't be found.

    Just updated to Mountain Lion (10.8) but lost ability to connect with a Windows based network shared folder.  I've taken off the AFP option which appeared to resolve this issue when 10.5 was introduced but it doesn't work on this upgrade.  More than

  • Networking a LaserJet CP1510

    Hi there, I really need some help on this one so if anyone has any ideas I would be grateful. We have the above printer installed on a home network which is setup as follows: Main Modem router: DHCP enabled range 2 - 100 Wired connection to router us

  • Extending range of network

    The airport icon on the menu bar always shows a strong (4 bars) connection to my new dual band Airport Extreme. Yet my ability to connect to the internet becomes intermittent if I am more than 40 feet from the base station with just one or two walls

  • If I buy more iCloud storage, will I then be able to download the new iOS 6?

    If I buy more iCloud storage, will I then be able to download the new iOS6?

  • Error "app.addMenuItem is not a function"

    Hey, New to Acrobat and Javascript in general.  I wanted to be able to create a custom toolbar with four buttons when a document is loaded (we don't want the buttons on the documents themselves), and I copied and pasted the following code into a modu