HTML-DB 1.6 SQL Query (Concatenate two columns)

Hi everyone,
My query look like this. But I got this message
ORA-01403: no data found
Sql query(.....returning ... sql
What I can do ? I want to concatenate my two columns in one.
<pre>
-----Résultats de la recherche
BEGIN
DECLARE
requete varchar2(5000);
v_code_type varchar2(2000);
v_ordre varchar2(500);
BEGIN
:P1_NOM_BENEFICIAIRE := REPLACE(:P1_NOM_BENEFICIAIRE,' ', '%');
:P1_NOM_BENEFICIAIRE := REPLACE(:P1_NOM_BENEFICIAIRE,'-', '%');
requete := 'SELECT
(FEUI.NOM_BENEFICIAIRE || ''--'' || FEUI.PRENOM_BENEFICIAIRE) ABC,
FEUI.VALEUR_ID_BENEFICIAIRE,
FEUI.MONTANT,
FEUI.CODE_TYPE_DECLARATION,
FEUI.ANNEE_FISCALE,
FEUI.CODE_ENTITE,
FEUI.ID_FEUILLET_IMPOT,
FEUI.ID_AMENDEMENT,
FEUI.NO_RELEVE_ORIGINAL_PROV,
FEUI.ACRONYME_ID_BENEFICIAIRE,
TYPD.SIGNIFICATION
FROM
S29_FEUILLET_IMPOT FEUI,
S29_TYPE_DECLARATION TYPD
WHERE
(TYPD.CODE = FEUI.CODE_TYPE_DECLARATION) AND
(ANNEE_FISCALE = :P1_ANNEE_FISCALE) AND
(CODE_ENTITE LIKE ''%'' || SUBSTR(:P1_CODE_ENTITE,1,3) || ''%'') OR
(CODE_ENTITE = SUBSTR(:P1_CODE_ENTITE,1,3))
AND
((:P1_NAS IS NULL) OR (:P1_NAS = VALEUR_ID_BENEFICIAIRE))
AND
((:P1_NEQ IS NULL) OR (:P1_NEQ = VALEUR_ID_BENEFICIAIRE))
AND
((:P1_NOM_BENEFICIAIRE IS NULL) OR
((UPPER(NOM_BENEFICIAIRE) || UPPER(PRENOM_BENEFICIAIRE))
LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
((UPPER(PRENOM_BENEFICIAIRE) || UPPER(NOM_BENEFICIAIRE))
LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
((UPPER(RAISON_SOCIALE_LIGNE_1) || UPPER(RAISON_SOCIALE_LIGNE_2))
LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
((UPPER(RAISON_SOCIALE_LIGNE_2) || UPPER(RAISON_SOCIALE_LIGNE_1))
LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
(UPPER(SUBSTR(COORDONNEE_BENEFICIAIRE_SYGBEC,1,80))
LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'')
IF (:P1_CODE_RELEVE = 'A') OR
(:P1_CODE_RELEVE = 'M') OR
(:P1_CODE_RELEVE = 'C') THEN
v_code_type := '(
(FEUI.CODE_TYPE_DECLARATION = ''A'') OR
(FEUI.CODE_TYPE_DECLARATION = ''M'') OR
(FEUI.CODE_TYPE_DECLARATION = ''C'')
else
v_code_type :=
(:P1_CODE_RELEVE = CODE_TYPE_DECLARATION) OR
(:P1_CODE_RELEVE = ''%'')
end if;
WWV_FLOW.DEBUG('V_CODE_TYPE EST EGALE A :' || v_code_type);
v_ordre := 'ORDER BY NOM_BENEFICIAIRE, VALEUR_ID_BENEFICIAIRE,
ID_FEUILLET_IMPOT, ID_AMENDEMENT';
requete := requete || ' AND ' || v_code_type || v_ordre;
RETURN requete;
END;
END;
</pre>
Thanks. Bye

Thank you Scott,
I'm sorry, I should present you a reduce sql command.
I had construct my "long" sql command without concatenation. But, I decide to add a column just beside the other column.
After sending my message on OTN, I tried something else, I decided to copy my sql command without concatenation in an other region. I changed my sql command in the new region by adding my new column and this ''--'' and it works very well. Sometimes, It's really difficult to understand why it doesn't.
Thanks. Bye,

Similar Messages

  • Can't  write right sql query by two tables

    Hello
    Everyone,
    I am trying to get a sql query by two tables,
    table:container
    <pre class="jive-pre">
    from_dest_id     number
    ship_from_desc     varchar
    to_dest_id     number
    </pre>
    table: label_fromat (changeless)
    <pre class="jive-pre">
    SORT_ORDER     number
    PREFIX     varchar2
    VARIABLE_NAME varchar2
    SUFFIX varchar2
    LF_COMMENT varchar2
    </pre>
    the sql which i need is
    a. table CONTAINER 's each column should have LABLE_FORMAT 's PREFIX before and SUFFIX back ,and these columns is connected
    example : the query output should be like this :
    <pre class="jive-pre">
    PREFIX||from_dest_id||SUFFIX ||PREFIX||ship_from_desc||SUFFIX ||PREFIX|| to_dest_id||SUFFIX
    </pre>
    every PREFIX and SUFFIX are come from LABEL_FORMAT's column VARIABLE_NAME (they are different)
    column SORT_ORDER decide the sequence, for the example above: Column from_dest_id order is 1, ship_from_desc is 2,to_dest_id is 3
    b. table LABEL_FORMAT's column VARIABLE_NAME have values ('from_dest_id','ship_from_desc','to_dest_id')
    If table CONTAINER only have one record i can do it myself,
    But actually it is more than one record,I do not know how to do
    May be this should be used PL/SQL,or a Function ,Cursor ,Procedure
    I am not good at these
    Any tips will be very helpful for me
    Thanks
    Saven

    Hi, Saven,
    Presenting data from multiple rows as a single string is called String Aggregation . This page:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    shows many ways to do it, suited to different requirements, and different versions of Oracle.
    In Oracle 10 (and up) you can do this:
    SELECT     REPLACE ( SYS_CONNECT_BY_PATH ( f.prefix || ' '
                                   || CASE  f.variable_name
                                        WHEN 'FROM_DEST_ID'
                                       THEN  from_dest_id
                                       WHEN 'SHIP_FROM_DESC'
                                       THEN  ship_from_desc
                                       WHEN 'TO_DEST_ID'
                                       THEN  to_dest_id
                                      END
                                   || ' '
                                   || f.suffix
                               , '~?'
              , '~?'
              )     AS output_txt
    FROM          container     c
    CROSS JOIN     label_format     f
    WHERE          CONNECT_BY_ISLEAF     = 1
    START WITH     f.sort_order     = 1
    CONNECT BY     f.sort_order     = PRIOR f.sort_order + 1
         AND     c.from_dest_id     = PRIOR c.from_dest_id
    saven wrote:If table CONTAINER only have one record i can do it myself,
    But actually it is more than one record,I do not know how to do In that case, why did you post an example that only has one row in container?
    The query above assumes
    something in container (I used from_dest_id in the example above) is unique,
    you don't mind having a space after prefix and before from_dest_id,
    you want one row of output for every row in container, and
    you can identify some string ('~?' in the example above) that never occurs in the concatenated data.

  • HTML Files on a SQL Query

    Hi All,
    How can we save the results of a sql query in a html files. Am using HTMLDB.
    How to 1. Create HTML files from a sql query in the client drive
    2. Store the HTML File into a specified drive (mapped drive)
    Kindly help.
    Thanks in advance

    You cannot. Not with HTMLDB aka web app server architecture.
    The application tier of HTMLDB resides in Oracle. The user connects to the web tier (Apache).
    Basic architecture. Web user sends a request to web server. Web server processes the user's request, opens a connections to Oracle and runs the application (HTMLDB) in the Oracle Server.
    The application (HTMLDB), within the client-server context, services the web tier. The web tier is its client. The Oracle/HTMLDB server has no idea (and is not interested) in who/where/how/what the web server is in turn servicing. IT IS NOT ITS PROBLEM.
    To deliver that file to the user's drive (if that is the requirement), is the problem of the web server. Not the application tier (HTMLDB) that runs on the Oracle Server. Very likely, the Oracle Server will not even be able to communicate directly with the web user - due to proxies, firewalls, and so on.
    This is why HTMLDB allows you to design the output of a HTML report to be downloadable as a CSV file. This means that instead of returning a Mime Type of TEXT/HTML to the web server and have the web server passing that along to the web user, it returns TEXT/CSV. The browser is (usually) configured to either save that contents it receives from the web server as a file, or to launch a spreadsheet application (Excel/OpenOffice) to receive that data.
    As for submitting a file as a SQL query from a local drive... that is the web user's problem. And the web browser. It needs to have a mechanism in order to provide that file's contents to the web server for processing. The web server talks HTTP - thus that file must be submitted via HTTP. Mapping drives uses NetBIOS as a protocol.. which is something completely different.
    And again, this has nothing to do with the HTMLDB application layer inside Oracle (it will process whatever the web server passes to it).
    Having clients sharing their drives for write access (in order to allow a server to write to it).. that is truly a Horrible Idea (tm). It will open HUGE security holes in a network. It is contrary to the fundemental principles and concepts of designing web-based systems.

  • Result of an SQL query as a Column name of another query

    Hi Friends,
    Can we use a result of a SQL Query as a column name of another table to retrieve data. If so please help me.
    For eg :
    I have a table where is store numbers;
    select col1 from table1 where col1='5';
    and i have another table where .. this value of col is a column name..
    select ( select col1 from table1 where col1='5') from table2;
    Thanks in advance.

    Hi,
    ORAFLEX wrote:
    Hi Friends,
    Can we use a result of a SQL Query as a column name of another table to retrieve data. If so please help me.
    For eg :
    I have a table where is store numbers;
    select col1 from table1 where col1='5';
    and i have another table where .. this value of col is a column name..
    select ( select col1 from table1 where col1='5') from table2;
    Thanks in advance.Do you really mean that?
    select col1 from table1 where col1='5';That query will always return either '5' or nothing. Whatever you're trying to accomplish with that, you can do with an EXISTS query.
    Perhaps you meant to reference two different columns in that query:
    select col1 from table1 where col2='5';In that case, sorry, no, you can't do that without resorting to dynamic SQL.
    If the same column is used throughout the query (but could change every time you run the query), then the dynamic SQL might be pretty easy. In SQL*Plus, for example, you could use substitution variables, defined in another query at run-time.
    If there are only a few possible values that the sub-query could possibly return, and you know what they all are, then you can fake a dynamic query like this:
    SELECT     CASE     ( SELECT  col1
                FROM       table1
                WHERE       col2     = '5'
              WHEN  'BONUS'     THEN  bonus
              WHEN  'COMM'     THEN  comm
              WHEN  'SAL'     THEN  sal
         END     AS col1
    FROM     table2
    ;Sorry to give such a vague answer, but it's the best I can do with the information I have.
    It would help if you posted a little sample data (CREATE TABLE and INSERT statments for both tables), and the results you want to get from that data. If you want to pass a parameter to the query, give the results you want for a couple of different parameters.

  • Concatenate two columns in Obiee 11g

    Hi,
    I am trying to concatenate two columns from same table in OBIEE 11G , i tried all below syntax
    cast("Period"."Year" as Varchar)|| cast ("Period"." Month Name" as Varchar)
    cast("Period"."Year" as char)|| cast ("Period"." Month Name" as char)
    contact(cast("Period"."Year" as char), cast ("Period"." Month Namer" as char))
    I am getting this error as - Invalid Alias Format : Table_name.Column_name require . Plz Help me Guys
    Thanks
    Edited by: Neha on Apr 16, 2012 3:41 PM

    Column forumal example based on vanilla usage tracking RPD:
    cast("Query Time"."Year" as varchar(4)) || "Query Time"."Month"BTW: "Month Name" implies a string already so I doubt you'll need to cast it as one...
    C.

  • Text area with html editor based on sql query

    Hi all,
    I am trying to create a text area with its contents loaded from a sql query returning a blob field.
    I gave the query
    select blob_field from file_subjects where id=41; in the item source valueI am getting an error in the display page like
    ORA-00932: inconsistent datatypes: expected NUMBER got BLOB
         Error      ERR-1019 Error computing item default value: page=5 name=CONTENTS.
    where am i goig wrong..?
    should i go for a pl/sql instead?

    Venket,
    See my previous thread on this (Well I used CLOB rather than BLOB). You will find code examples too. Should be just what you need.
    How to "Bypass" HTMLDB
    -Joe

  • Convert Oracle SQL query to single column output

    Hello All,
    I need to build the query to have multiple columns in a single column with multiple rows.
    select a.customer_trx_id,a.previous_customer_trx_id
    from ra_customer_trx_all a
    where a.customer_trx_id = :customer_trx_id
    here, a.customer_trx_id and a.previous_customer_trx_id are in two columns. I need to bring them into a single column.
    Say: the above output is
    a.customer_trx_id a.previous_customer_trx_id
    123456 87654
    Need to have single column
    As
    123456
    87654
    Please do the needful.
    Thanks,
    Abdul

    Hi,
    Post your question in [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] forum, you would probably get a better/faster response.
    Regards,
    Hussein

  • Concatenate two Columns in OAF

    Dear Friends ,
    I have a OAF Page developed with advanced table , i would like to concatenate first two
    columns . is there any way that i can achieve this ?
    Note : I am using a sear without entity Object ( VO based Search )
    Please share your thoughts .
    Thanks in Advance ,
    Keerthi.k

    There are multiple ways to do it.
    Fully Declarative Way
    1. Add transient variable to your VO.
    Expand Attributes in VO Editor, select the newly created attribute, Check 'selected in query' checkbox.
    in Query Column, give some alias, enter expression as <column1> || <column2>
    Fully Programmatic Way
    1. Add transient variable to your VO.
    2. Capture the event in CO...pass the control to AM...from AM pass the control to VOImpl.
    3. Loop thru VO using an iterator.
    4. create a method in VORowImp to concatenate the two column and populate into the attribute created in step 1 (Use populateAttribute(.., ..) so that the VORow is not dirtied)
    5. for every row, call the method created in step 4.
    Hrishikesh

  • Can Portal Report from SQL Query use where column IN (:bind_variable)

    I would like to create a portal report from sql query with IN (:bind_variable) in the where clause. The idea is that the user would enter comma-separated or comma-quote-separated values for the bind_variable. I have tried this several ways but nothing seems to work. Can this be done?
    Trenton

    Hi,
    Which version of portal are you using. This is a bug. It has been fixed in 30984.
    Thanks,
    Sharmila

  • LOV SQL query dependent on column value

    Hi Gurus,
    I have a tabular form, a column of which I would like to display as a dropdown whose list of values is a SQL query containing a where clause on another column value.
    For example, say the tabular form displays questions, and that the answers to the different questions are to be picked in list of values that are different for each question. I have tried the following queries for the dropdown list of values:
    1- select value_text, value_text from list_of_values_table where question_id=#QUESTION_ID#
    2- select value_text, value_text from list_of_values_table where question_id=:QUESTION_ID
    3- select value_text, value_text from list_of_values_table where question_id=&QUESTION_ID.
    In the 3 cases, I get an error when I run the application saying that the SQL statement is incorrect.
    Any ideas?
    Thanks in advance,
    Guillauem

    Anton,
    Yes, I am creating a region based on a sql query. The query is the following:
    select q.id quest_id, q.name, q.data_type_id, q.lov_flag, a.id answer_id, a.answer_text, a.org_id
    from gwb_questions q left join gwb_answers a on q.id=a.question_id, gwb_answers ans right join gwb_orgs o on ans.org_id=o.id
    where q.MODULE_ID=:P2_MODULE_ID and o.id=:P2_ORG_ID
    Now, in the 'answer_text' column, I would like to display a dropdown containing values that come from a separate table and that depend on the value of the quest_id column. So in the Column Attributes for 'answer_text', I selected Select List (query based LOV) for the Tabular Form Element, and I entered the query mentioned before in the List of Values section (select value_text, value_text from list_of_values_table lov where lov.question_id= ?).
    I am not using any API.
    Does that make sense?
    Thanks for your help,
    Guillaume

  • How to concatenate two column in ALV

    dear,
    How to concatenate two ALV columns
    yatendra sharma

    dear
    I have to concatenate 3 fields
    PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'NAME2' ' ' ' ' 'Customer Address' .
      PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'STRAS' ' ' ' ' 'Street' .
      PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'ORT01' ' ' ' ' 'City'.
    how can we join them
    Yatendra

  • SQL Query between two dates

    Hi,
    Please could someone help me on how to write a query to retrieve the data between two dates.
    created_date format stored in the database column: 9/18/2007 11:34:03 AM
    I tried below but it didn't work
    select * from work_table where created_date beween '9/18/2007' and '03/29/2008'
    I get 'literal doesn't match format string'
    Thanks,

    date datatype is nls dependent -> folllows the nls_date_format database parameter setting inherited by your session.
    Making it short you'll be always safe if you
    select * from work_table where created_date beween to_date('9/18/2007','MM/DD/YYYY') and to_date('03/29/2008','MM/DD/YYYY')Having the time component included you must add + 1 - 1 / 24 / 60 / 60 (plus one day minus one second) to the upper limit if you want to include the last day as a whole
    *** not tested
    Regards
    Etbin

  • SQL to update two columns in TABLE2 from TABLE1

    I know this is a simple question for some of you, but I am new to SQLs, so please help...
    I have two tables TABLE1 & TABLE2 as below, both tables contains more then 50million records:
    SELECT * FROM TABLE1.
    ID                        BUS_FID                WORKID                  STATIONID                 
    28400000117234         245                    13461428.25           16520877.8            
    28400000117513         403                    13461428.25           16520877.8            
    28400000117533         423                    13461428.25           16520877.8            
    28400000117578         468                    13461428.25           16520877.8            
    28400000117582         472                    13461428.25           16520877.8            
    SELECT * FROM TABLE2.
    BUS_FID                    ID                 TRPELID                RELPOS                 WORKID                 STATIONID               
    114                    28400000117658         28400000035396         23.225                                                              
    115                    28400000117659         28400000035396         23.225                                                              
    116                    28400000117660         28400000035396         23.225                                                              
    117                    28400000117661         28400000035396         23.225                                                              
    118                    28400000117662         28400000035396         23.225                                                              
    119                    28400000117663         28400000035396         23.225                                                              
    120                    28400000117664         28400000035396         23.225                                                              
    121                    28400000117665         28400000035396         23.225                                                              
    122                    28400000117666         28400000035396         23.225                                                              
    123                    28400000117667         28400000035396         23.225                                                              
    124                    28400000117668         28400000035396         23.225                                                              
    125                    28400000117669         28400000035396         23.225                                                              
    126                    28400000117670         28400000035396         23.225    Now I tried to use following SQL to update WORKID & STATIONID columns in TABLE2 but failed. BUS_FID in both tables have been UNIQUE indexed and they can be used as primary keys to join these two tables.
    UPDATE (
      SELECT  p.WORKID px,
              p.STATIONID py,
              p.BUS_FID pid,
              temp.WORKID tempx,
              temp.STATIONID tempy,
              temp.BUS_FID tempid
        FROM  TABLE1 temp,
              TABLE2 p
        WHERE pid = tempid
      SET px = tempx,
          py = tempy;
    COMMIT;with above code, Oracle returned following errors:
    SQL Error: ORA-00904: "TEMPID": invalid identifier
    00904. 00000 -  "%s: invalid identifier"Can anyone help me to correct it? Thanks~~~
    BTW, both two tables contains over 50 million records. So, if you have a better SQL to perform the same task, please let me know!
    Appreciated your help at advance.

    Hi,
    984210 wrote:
    Tried to change to
    p.bus_fid = temp.bus_fidit start running.
    Can anyone please explain to me why this is happening? Thanks!!Column aliases (such as pid and tempid in your statement) can't be used in the same query in which they are defined (except in an ORDER BY clause). Elsewhere, you have to refer to the columns by their actual names.

  • Concatenate two columns

    Hi,
    In BI 11g, I am trying to concatenate DAY/DATE Columns.
    1."TM_Details"."Day" || "TM_Details"."Date"
    2.concat("TM_Details"."Day")+concat("TM_Details"."Date")
    But it displays some error, like
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22020] Function Concat does not support non-text types. (HY000)
    SQL Issued: SELECT "TM_Details"."Day" || "TM_Details"."Date" FROM "TMD"
    Thanks
    Kavitha

    Hi kavitha,
    1."TM_Details"."Day" || cast("TM_Details"."Date" as char)This works out perfectly as the syntax is right.But you need to cast it accordingly.
    2.concat("TM_Details"."Day")+concat("TM_Details"."Date")concat(cast("TM_Details"."Day as char),"cast(TM_Details"."Date" as char)) this is the right syntax.
    Before check what is the datatype of day column and Date column as it is erroring out as mismatch.Accordingly convert
    Use cast function to convert it to the format needed and here is the cast syntax cast(column as datatype)
    *UPDATED POST*
    Invalid Alias Format : Table_name.Column_name requiredDont type the table name and column name manually.Please select it from the subject area into the criteria and check if this table name and column name are correct and coming from the same table.
    hope answered.award points.
    Cheers,
    KK
    Edited by: Kranthi.K on May 24, 2011 11:50 PM

  • SQL Query Executing on Column Selection

    All,
    I have a table displayed based on a VO whose query is something like this
    SELECT * FROM (SELECT apps.xxoqt_system_items_v1.SEGMENT1, apps.xxoqt_system_items_v1.DESCRIPTION,
    apps.xxoqt_item_stock_v.ORGANIZATION_NAME, apps.xxoqt_item_stock_v.ORGANIZATION_CODE,
    apps.xxoqt_system_items_v1.RETAIL_PRICE, apps.xxoqt_item_stock_v.ORGANIZATION_ID,
    apps.xxoqt_item_stock_v.RESERVABLE_QTY as OnHand_QTY, apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,
    apps.xxoqt_system_items_v1.PC_CODE, apps.XXOM_SPA_OQT_PKG.GET_NET_PRICE(apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,:bAccountId) as NetPrice,
    apps.xxoqt_system_items_v1.pack_qty, apps.xxoqt_system_items_v1.box_qty, apps.xxoqt_system_items_v1.case_qty
    FROM apps.xxoqt_system_items_v1 ,apps.xxoqt_item_stock_v
    WHERE apps.xxoqt_system_items_v1.INVENTORY_ITEM_ID = apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID AND 1=1) QRSLT  ORDER BY RETAIL_PRICEI have 3 View Criteria defined and they are called pro grammatically through the code. (the 3 VCs have rest of the 2 bind variable one is segment other is organizationCode)
    I have 3 bind variables and all are marked as required.
    I pass all the 3 bind parameter values from my method. All is well and i can see records displayed in the table on the UI.
    The issue is when i click on the column sorting, i get the error
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: segmentIf i remove the required attribute form the 2 bind variables (segment and orgcode), when i click on column sorting my query doesn't take accountID and runs indefinitely long
    SELECT * FROM (SELECT apps.xxoqt_system_items_v1.SEGMENT1, apps.xxoqt_system_items_v1.DESCRIPTION,
    apps.xxoqt_item_stock_v.ORGANIZATION_NAME, apps.xxoqt_item_stock_v.ORGANIZATION_CODE,
    apps.xxoqt_system_items_v1.RETAIL_PRICE, apps.xxoqt_item_stock_v.ORGANIZATION_ID,
    apps.xxoqt_item_stock_v.RESERVABLE_QTY as OnHand_QTY, apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,
    apps.xxoqt_system_items_v1.PC_CODE, apps.XXOM_SPA_OQT_PKG.GET_NET_PRICE(apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,:bAccountNumber) as NetPrice,
    apps.xxoqt_system_items_v1.pack_qty, apps.xxoqt_system_items_v1.box_qty, apps.xxoqt_system_items_v1.case_qty
    FROM apps.xxoqt_system_items_v1 ,apps.xxoqt_item_stock_v
    WHERE apps.xxoqt_system_items_v1.INVENTORY_ITEM_ID = apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID AND 1=1) QRSLT  ORDER BY RETAIL_PRICE DESC
    Oct 9, 2011 3:19:16 PM com.awrostamani.view.TracingViewObjectSqlQueryExecution logQueryStatementAndBindParameters
    INFO: BindVars:(bAccountNumber=null)I am a bit confused here as it looks like the entire query is getting executed for sorting.
    Can someone please tell me what is the issue here ?
    thnks
    Jdev 11.1.1.5
    Edited by: in the line of fire on Oct 9, 2011 2:07 PM
    Edited by: in the line of fire on Oct 9, 2011 3:19 PM

    @Timo, the moment i add the line in the VO create() also tried it adding to the constructor but
    I am getting this error.
    java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis
    However my issue is not with QRSLT but the issue is the query getting fired on column sorting, and in the process bind values are being set as null
    my base query on which table is built is
    SELECT apps.xxoqt_system_items_v1.SEGMENT1, apps.xxoqt_system_items_v1.DESCRIPTION,
    apps.xxoqt_item_stock_v.ORGANIZATION_NAME, apps.xxoqt_item_stock_v.ORGANIZATION_CODE,
    apps.xxoqt_system_items_v1.RETAIL_PRICE, apps.xxoqt_item_stock_v.ORGANIZATION_ID,
    apps.xxoqt_item_stock_v.RESERVABLE_QTY as OnHand_QTY, apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,
    apps.xxoqt_system_items_v1.PC_CODE, apps.XXOM_SPA_OQT_PKG.GET_NET_PRICE(apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID,:bAccountNumber) as NetPrice,
    apps.xxoqt_system_items_v1.pack_qty, apps.xxoqt_system_items_v1.box_qty, apps.xxoqt_system_items_v1.case_qty
    FROM apps.xxoqt_system_items_v1 ,apps.xxoqt_item_stock_v
    WHERE apps.xxoqt_system_items_v1.INVENTORY_ITEM_ID = apps.xxoqt_item_stock_v.INVENTORY_ITEM_ID AND 1=1On click on a button i set the bind parameters value and reexecute the VO. So i get lets say 2 records. Ifi now sort the column, i see the base query is getting fired and the parameter (accountNumber being passed as null, if i unmark the rest of the bind parametes to not required else i get the error message required bind parameter dose not appear in the SQL)
    Edited by: in the line of fire on Oct 9, 2011 5:51 PM
    Edited by: in the line of fire on Oct 9, 2011 6:04 PM

Maybe you are looking for

  • Starting Classic often fails

    I'm trying to start Classic, but it often gets to about 90% and fails. After about 3-4 tries it finally works. I've tried turning off extensions, etc. but nothing seems to help. Any ideas? Thanks in advance, Brian

  • PDF file is blank in external email attachment

    Dear all, I have successfully convert a SAPScript to PDF file and then attach in email to be sent to customer externally. However, the contents in the attachment is blank. It works properly if I remove the email function, and download it to front end

  • My iMessages are coming from my email, how do I get them to come from my phone

    My iMessages are coming from my email, how do I get them to come from my phone number again?

  • Problem with SELECT INTO Query

    Why am I always getting 0 for returnvalue in the following query? create or replace PACKAGE BODY MyPKG AS PROCEDURE SelectCount    returnvalue       OUT      INTEGER AS   BEGIN select COUNT(*) from MyTable into returnvalue; IF( SQL%ROWCOUNT >= 1 )  

  • Bookmark sync not working with large set and maybe javascript bookmark bookmarklets??

    Bookmark sync via iCloud doesn't seem to work for me. I use Chrome as my primary browser but keep a huge set of bookmarks synced to Safari via Xmarks. Basically I either get no bookmarks on my iOS devices (iPhone 4 and iPad 1) or a huge number of rep