Search an ID in concatenated by stragg

Hi there,
Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
Sample data
with person as(
select 1 as pid, 'person1' as name from dual union all
select 2 as pid, 'person2' as name from dual union all
select 3 as pid, 'person3' as name from dual union all
select 4 as pid, 'person4' as name from dual union all
select 5 as pid, 'person5' as name from dual union all
select 6 as pid, 'person6' as name from dual
function_type as (
select 1 as ftid, 'function1' as name from dual union all
select 2 as ftid, 'function2' as name from dual union all
select 3 as ftid, 'function3' as name from dual union all
select 4 as ftid, 'function4' as name from dual union all
select 5 as ftid, 'function5' as name from dual union all
select 11 as ftid, 'function11' as name from dual
person_function_types as(
select 1 as pid, 1 as ftid from dual union all
select 1 as pid, 2 as ftid from dual union all
select 1 as pid, 3 as ftid from dual union all
select 2 as pid, 1 as ftid from dual union all
select 2 as pid, 5 as ftid from dual union all
select 3 as pid, 2 as ftid from dual union all
select 3 as pid, 3 as ftid from dual union all
select 3 as pid, 4 as ftid from dual union all
select 4 as pid, 5 as ftid from dual union all
select 5 as pid, 1 as ftid from dual union all
select 6 as pid, 11 as ftid from dual
person_function_view as(
select p.pid,
       p.name,
       stragg(distinct ft.ftid) as function_ids,
       stragg(distinct ft.name) as function_types
from   person_function_types pft
  left join person p
    on p.pid = pft.pid
  left join function_type ft
    on ft.ftid = pft.ftid
group by p.name
select pfv.name,
       pfv.function_types
from   person_function_view pfv
where  pfv.function_ids like '%1%'
Problem
The result of this query should be person all persons with function_ids containing 1.
How ever the result of this query returns person6 containing function_id 11.
Understandable that 11 is like %1% ... how can I avoid this?
Thanks in advance!
Kind regards,
Metroickha

Hi,
you can use regular expression.
Actually I could not test completely your query as I don't have STRAGG in my DB. There are several new alternatives to STRAGG. On 11g you can use LISTAGG.
Anyway assuming that using STRAGG after the comma you have one space you can do in this way:
select pfv.name,
       pfv.function_types
from   person_function_view pfv
where  regexp_like(pfv.function_ids ,'(^|, )1(,|$)');If STRAGG don't put a space after the comma then remove the space after the comma in the regular expression pattern:
where  regexp_like(pfv.function_ids ,'(^|,)1(,|$)');Regards.
Al

Similar Messages

  • Writing a search function

    Hello Folks,
    I have written the below mentioned search() function which takes a 'one word' as an input parameter and searches a couple of CLOB datatype columns in my product table and returns the name and id of the corresponding product.
    ---  SEARCH FUNCTION ----
    ---  THE USER ENTERED KEYWORD IS SEARCHED IN THE PRODUCT DESCRIPTION COLUMN AND PRODUCT TAGS COLUMN
    function search (search_string varchar) return datacursor as dataset datacursor;
    begin
              open dataset for
              select prod_key,prod_name from dim_product
              where contains (prod_keyword, concat(concat('%',search_string),'%')) >0 or contains (prod_desc, concat(concat('%',search_string),'%')) >0;    
    return dataset;
    end search;
    note :
    type datacursor is ref cursor;The code is working fine. Now I want to expand this function from one word search to many words that the user passes into the function to search the table. How can I achieve that?
    Thanks!
    Arun

    You will allow your users to pass a long string of words.
    You will have written some code which parses that string and separates it into individual search words. This code will probably strip out any words supplied which Oracle Text considers to be stop words. You might also want to strip out things like 'AND' and 'OR', 'NOT' and "BT' (and anything else which can screw up Oracle Text syntactically, like brackets and other punctuation that has specific meaning to Oracle Text).
    You will then write code to construct a meaningful search term, by re-concatenating the separate search words into a single search string that contains syntactically-correct AND or OR or NOT joins.
    You then modify your existing code to use this new search string
    If, for example, I type "Beans, Pie and Chips", your code would turn this into "Beans", "Pie", "Chips". Then you'd concatenate that to be "Beans|Pie|Chips" (or maybe 'beans and pie and chips'). Then you'd stick that into your existing contains syntax.
    You will have to make up business rules for how users are allowed to type stuff in. Are they allowed to type in things like "Beans and (Pie or Chips)", for example? Do you simply dictate that 'all search terms will be combined' (and thus concatenate them with forced ANDs), or do you allow for ORs, ANDs and a mixture of the two? Do you allow NOTs? (One time I did this, I had to write 'parsing code' which, if it saw a minus in front of a word, knew to add that back into the final string with NOT in front of it, for example. So we allowed users to type things like "beans pie -chips" and that would become "(beans and pie) not chips".
    You will also have to make up rules about string delimiters. Do you allow users to comma-delimit their search terms, space-delimit them or a combination? If you are doing space delimiters, you'll have to loop round the input string until all multiple spaces are reduced to single spaces. Then you can break the string into its separate words before re-concatenating them into a syntactically-correct contains clause.
    Hope that helps a bit,
    Regards
    HJR

  • Setting up a web app search field that searches all web app data

    Hi BC forum
    We have this web site - bridgerd.com.au - and we are finding limitations with the web app search bar (where it says: Search Bridge Rd). This search bar will only search for data within the Web App 'description field'. We're wanting it to work a little more like the site search module, where it searches all content of a particular web app - including data from different fields.
    Obviously this would be a great out-of-the-box feature for BC, and it seems to be an annoying limitation. Has anyone overcome this issue before? Is there a way to search all fields by concatenating a bunch of hidden fields into one submitted search using java script. Or could we using java script to copy the same entered search value to all fields whilst hiding all but the main search field?
    Cheers

    Actually, let me clarify this... Is there a way to expand the "Keyword" field search in web apps past the limits of only searching the "Content" field?
    OR
    Is it possible to include the custom fields in our web app to the search criteria? When I add the web app to the page, it seems BC will only add the default web app search fields. If I can add the custom web app search fields, I may be able to employ my theory as per last post.
    Cheers

  • Fuzzy searching and concatenated datastore query performance problems.

    I am using the concatenated datastore and indexing two columns.
    The query I am executing includes an exact match on one column and a fuzzy match on the second column.
    When I execute the query, performance should improve as the exact match column is set to return less values.
    This is the case when we execute an exact match search on both columns.
    However, when one column is an exact match and the second column is a fuzzy match this is not true.
    Is this normal processing??? and why??? Is this a bug??
    If you need more information please let me know.
    We are under a deadline and this is our final road block.
    TIA
    Colleen GEislinger

    I see that you have posted the message in the Oracle text forum, good! You should get a better, more timely answer there.
    Larry

  • Concatenated datastore fuzzy searches and performance...

    Oracle 8.1.7:
    I am using the concatenated datastore and indexing two columns.
    The query I am executing includes an exact match on one column and a fuzzy match on the second column.
    When I execute the query, performance should improve as the exact match column is set to return less values.
    This is the case when we execute an exact match search on both columns.
    However, when one column is an exact match and the second column is a fuzzy match this is not true.
    Is this normal processing??? and why??? Is this a bug??
    If you need more information please let me know.
    We are under a deadline and this is our final road block.
    TIA
    Colleen GEislinger

    This is more information about our scenario:
    We have two groups in the datastore:
    concat:
    1.) hierarchy:(example text) 321826 325123 543123
    2.) page: Actual document text.
    321826 325123 543123 represents ids in a hierarchy structure. As you move from left to right the number of times the number occurs is less so there should be less exact matches.
    Example: In this index all pages have 321826 as the first value. A few pages have 543123 and all others will have some other number as the last value.
    if I do this query:
    contains(concat,(321826 within hierarchy ) and ('personnel') within page)
    it takes about 10 seconds because it 321826 will hit all pages.
    if I do this query:
    contains(concat,(543123 within hierarchy ) and ('personnel') within page)
    it takes only about 1 second because it 543123 will hit just a few pages.
    BUT:::::::
    Fuzzy search....
    if I do this query:
    search A.) contains(concat,(321826 within hierarchy ) and ?('personnel') within page)
    it takes about 30 seconds because it 321826 will hit all pages. This is okay for performance for this.
    BUT if I do this query:
    search B.) contains(concat,(543123 within hierarchy ) and ?('personnel') within page)
    it takes about 30 seconds even though 543123 will hit only a few pages.
    This should be faster than 30 seconds because you're searching over only a fraction of material for the fuzzy search part.
    We've played with different variations on the () and the '' but nothing seems to change this.
    Any advice on how to make search B.) faster??
    We don't understand why see the different speeds in the exact match and we DON'T see the different speeds in the fuzzy search...
    I can send you some test data with the index and query scripts if you want.
    Our indexes are on large tables (2,000,000) rows.
    TIA
    Colleen Geislinger.

  • Bursting using a Concatenated Data Source

    Greetings,
    I am trying to burst a report using a concatenated data source. I have a bursting SQL query set up that works fine, but I am unsure how to handle the "Split By" option. I have a data model that pulls data from multiple queries, like this:
    DETAILS_A
    select * from table_a
    where payee_id in (:p_payee_id)
    DETAILS_B
    select * from table_b
    where payee_id in (:p_payee_id)
    So, if I choose to "Split By" Details_A_Row/Payee_ID, then the data from Details_A is split appropriately, but the reports I generate don't split the information from Details_B properly. I end up with reports where one payee has information for another payee from the Details_B data source. How can I specify that the report should also split/filter the info from Details_B?
    To put it another way, what I'd really like to do is go through a list of parameters (payee IDs in this example) and generate a report for each parameter. Is Bursting the most effective way to do this?
    From searching the forums, it seems like I might be able to accomplish this using Data Templates as my Data Model instead of SQL Queries. Am I on the right track with that? If so, you guys have any helpful links on how to create Data Templates?
    I am using BI Publisher version 10.1.3.4
    Any help is appreciated!
    Martin

    For data template samples, check the following out and then download the zip file (you may not be able to run the reports, but you can view the code)
    http://blogs.oracle.com/xmlpublisher/2009/06/data_template_progression.html
    Thanks,
    BIPuser

  • Search on interactive report

    is there anyway to search hidden columns? I've got a 'Comments' column that I don't need to have display, yet want the user to be able to search on it.
    Thanks in advance...
    Sorry everyone - I see I've got two posts of this same question - my bad - Monday morning and forgot I had already done it last week. Still need some help, though.
    Edited by: userRRRYB on Mar 8, 2010 7:38 AM

    EDITIED - ALBERT!
    Thanks - so I've got an interactive report and have a Title column and a link column, which is the actual path to where a document with that title is stored on our server. The folders where the docs are stored all contain a space in the name (Active Docs) and therefore a %20 gets plopped in the path. It would be easy enough to just change these folder names but I am in the process of re-developing a ton of ancient Access Databases, all of which that are still in use and contain links to these same documents. Therefore in this transition time users would not be able to get to the links while they are still using those databases. I could copy the folders with a rename for my new project deleting the spaces but this doesn't seem to be the answer. There's gotta be a way to blind the html to the space??
    Here's an example of a path I'm using:
    file://server-name/departments/Documentation/Documents/Obsolete Docs
    I've tacked on the file name in a form by taking the field that holds the path above and concatenating it with the file name so the end result looks something like
    file://server-name/departments/Documentation/Documents/Obsolete Docs/F-001.doc
    but the system sees it as file://server-name/departments/Documentation/Documents/Obsolete%20Docs/F-001.doc and therefore can't find it.
    Thanks!
    Edited by: userRRRYB on Mar 8, 2010 10:56 AM

  • How to read ,compare and search  unicode in we8mswin1252 ?

    HI,
    I having face a trouble while reading and search Unicode for my project module  and its totally dependent  on Unicode data for displaying and retrieve operation in oracle 11g  sql develop.
    code is  as following in ORACLE 11G SQL DEVELOPER
    FLOW IS ....
    1. Procedure
    create or replace PROCEDURE VR_CRONICA_CHECKDUPLICATE
      iv_UFirstName in nvarchar2  DEFAULT NULL,      --Added for Unicode  31-DEc-2014 Jimmy
      iv_UMiddleName in nvarchar2  DEFAULT NULL,   --Added for Unicode  31-DEc-2014 Jimmy
      iv_ULastName in nvarchar2  DEFAULT NULL,      --Added for Unicode  31-DEc-2014 Jimmy
      v_StatusID OUT NUMBER,
      v_Per_ID OUT NUMBER,
      v_Version OUT NUMBER,
      pResult out TYPES.cursortype
    AS
      cur_hdl int;
      --cur_hdl_TotalRecs int;
      strSQL                    VARCHAR2(32767);
        strSQLWhere          VARCHAR2(4000);
       v_UFirstName nvarchar2(50) := iv_UFirstName;
       p_UMiddleName nvarchar2(50) := iv_UMiddleName;
       p_ULastName nvarchar2(50) := iv_ULastName;
        p_UFirstName  nvarchar2(255) :=v_UFirstName;
          iv_Per_ID NUMBER(10,0);
          iv_Version NUMBER(10,0);
    BEGIN
    DBMS_OUTPUT.PUT('VR_PersonRecord_CheckDuplicate' );
    begin
    cur_hdl := dbms_sql.open_cursor;
    --cur_hdl_TotalRecs:=dbms_sql.open_cursor;
    strSQL  := ' ';
    strSQL  :=  strSQL || '
                                    SELECT
                                                    CAST(PER_ID AS number(8,0)) AS PER_ID,
                                                    CAST(Version AS number(8,0)) AS Version,
                                                     INTO
                                                     iv_Per_ID,
                                                     iv_Version
                                   FROM
                                   VitalRecords_Search_CurrentDoc WHERE' ;
                                      IF p_ULastName is not null THEN
                                              BEGIN
                                                  strSQLWhere  := ' trim(UPPER (U_LASTNAME)) = TRIM(UPPER(:p_ULastName ))';
                                              END;
                                      END IF;
                                      IF p_UFirstName is not null THEN
                                                strSQLWhere  :=  strSQLWhere || '
                                                  AND  TRIM(UPPER (U_FIRSTNAME)) = TRIM(UPPER(:p_UFirstName|))';
                                    END if;
                                      IF p_UMiddleName IS NOT NULL THEN
                                            BEGIN
                                                      strSQLWhere  :=  strSQLWhere || '
                                                        AND  TRIM(UPPER (U_MIDDLENAME)) = TRIM(UPPER(:p_UMiddleName))';
                                            end ;
                                      end if ;
                                      v_Per_ID :=  iv_Per_ID;
                                     exception
                                                        when no_data_found then
                                                                                  begin
                                                                                      v_Per_ID:=0;
                                                                                      v_Version:=0;
                                                                                      v_StatusID := 0 ;
                                                                                  end;
                                          end;
    --IF pResult%ISOPEN THEN
    --CLOSE pResult;
    --END IF ;
    open pResult for
                                  select PER_ID  ,
                                              Version  ,
                                              U_FIRSTNAME  ,
                                              U_MIDDLENAME  ,
                                              U_LASTNAME 
                                  from table(readDWSeachPersons1(cur_hdl));
    END;
    .Function
    create or replace FUNCTION READDWSEACHPERSONS1
            (cur_hdl int)
                      RETURN
                                         DWSeachPersonsTypeTableType1
    PIPELINED IS
            PER_ID  NUMBER(10);
            Version  NUMBER(10);
            U_FIRSTNAME NVARCHAR2(500) ;
            U_MIDDLENAME NVARCHAR2(500) ;
            U_LASTNAME NVARCHAR2(500) ;
    BEGIN
          dbms_sql.define_column(cur_hdl, 1, PER_ID);
          dbms_sql.define_column(cur_hdl, 2, Version);
          dbms_sql.define_column(cur_hdl, 3, U_FIRSTNAME   ,500);
          dbms_sql.define_column(cur_hdl, 4, U_MIDDLENAME   ,500);
          dbms_sql.define_column(cur_hdl, 5,  U_LASTNAME   ,500);
      LOOP
      -- fetch a row
               IF dbms_sql.fetch_rows(cur_hdl) > 0 then
                                -- fetch columns from the row
                                   dbms_sql.column_value(cur_hdl, 1, PER_ID);
                                   dbms_sql.column_value(cur_hdl, 2, Version);
                                   dbms_sql.column_value(cur_hdl,  3, U_FIRSTNAME  );
                                   dbms_sql.column_value(cur_hdl,  4, U_MIDDLENAME  );
                                   dbms_sql.column_value(cur_hdl,  5, U_LASTNAME   );
                                           PIPE ROW (DWSeachPersonsType1(PER_ID,Version,U_FIRSTNAME,U_MIDDLENAME,U_LASTNAME));
                         ELSE
                               EXIT;
              END IF;
      END LOOP;
      RETURN;
    END;
    3. Type
    create or replace TYPE DWSeachPersonsType1 AS OBJECT
    PER_ID  NUMBER(10),
    Version  NUMBER(10),
    U_FIRSTNAME NVARCHAR2(500) ,
    U_MIDDLENAME NVARCHAR2(500) ,
    U_LASTNAME NVARCHAR2(500)
    4. TYPE
    create or replace TYPE DWSeachPersonsTypeTableType1 AS TABLE OF DWSeachPersonsType1;
    error is coming like :
    ORA-01003: no statement parsed ORA-06512: at "SYS.DBMS_SQL", line 1450 ORA-06512: at "A0_SJFRM_9AUG_JAYESHB.READDWSEACHPERSONS1", line 16
    so,friends let me sugges solution regarding asap..its very urgent ..

    Hi
    because you have such a hurry, you have done bad design i think Why separating responsibilities of executing SQL in table function that way?
    You cannot have any advantage from separation because it is not general code. SQL is created here and there is function that defines columns to that SQL.
    Developer has no clue what it is executing until searching code for that cursor parameter. That SQL concatenation sucks also.
    That code is not easy to maintain or test or comprehend quickly or at all
    At least to me that is a big mess.
    Suggest that you do that simplest logic as possible and add that missing parse there.

  • Does ECC 6.0 Provide a Search-as-you-type Enhancement for Sold-To Party Field?

    In our quest to continually simplify the creation of sales orders, I would like to know if SAP has provided any way to simplify the search and entry of the customer sold-to or ship-to party.  What I am looking for is a way to enter the customer's name (or other customer search criteria such as city) in a single field and have it search-as-you-type.  This is also known as instant search, auto-complete and auto-suggestion.
    We would like to eliminate the clicks it takes to use the standard F4 search help.
    One of our internal developers has created a web-based (.NET) application that brings in SAP data for writing sales orders for a specific segment of our business.  This tool allows you to find the ship-to party by typing in the customer's state, city, zip, address or name in the Ship-To field.  The instant search feature narrow's the list down as you type.  What he has done is written SQL to concatenate the customer name, customer number and address information, and then provided a search-as-you-type feature on top of this.
    Fictious Example of concatenated data (State, City, Customer Name, Address, Zip, SAP Customer Number):
    WA Seattle, Home Depot, 11616 Aurora Ave N, 98133, 18394978
    Typing any of the above information in the field will search for matches and bring back results as you type.
    I would like to know if ECC 6.0 has any similar feature that can be used in VA01 to accomplish the same thing.
    Thank you.
    Rob Scofield

    I don't have access to the code our developer used but again, I am referring to a .NET browser-based application.  We extract a subset of SAP data using Attunity (say, every hour) and the SAP data is stored in a separate SQL Server database.  This database is used by a few browser-based applications we have developed.  For example, we have an application that allows external customers or internal employees the ability to look-up the status of an order.  The first thing you enter is the customer.  In some cases, this may be the Ship-To.  In other cases, the Sold-To.  The user can simply enter some part of the customer and records are searched for a match, as you type.  In our case, the lookup is occurring in SQL Server, not directly in SAP.  The developer took a simple approach of using some SQL query magic (it may be in a SQL Server Stored Procedure), to concatenate the relevant customer information that most people use to lookup a customer - Customer Name, Address, Customer Number.  So as you type, this entire concatenated string is searched and the list of potential "hits" is narrowed as you type.
    The paradigm is similar to Google's Search as you type (SayT), which you can read about here:
    http://www.theverge.com/2012/7/11/3152186/google-search-as-you-type-instant-results-merchants
    http://code.google.com/p/search-as-you-type/
    Or auto-complete: https://support.google.com/websearch/answer/106230
    This is nothing new in the web commerce world.
    I was told by an SAP rep that there might be an enhancement in SAP ECC (SAPGUI Desktop) that could do something similar.  However, I never heard back from him and was wondering if anyone else had heard of something.
    This is another example of how it seems SAP has fallen behind in their UI and search capabilities; and they need to catch-up.  For those of us that have used SAP for many years, F4 seems straight forward and we sometimes don't understand why so many users don't also find it simple.  The answer is, other vendors have made it more simple and with the consumerization of apps, SAP needs to get there.
    Rob

  • PL?SQL block for string concatenation

    Hi,
    I have written the following procedure for concatenating the strings from different tables. This is working fine if I run this is SQL commands. But If I put the same in HTMLDB report region, I am getting error "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-06550: line 1, column 8: PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor"
    I am not able to resolve this.. Please help me..
    DECLARE
    CURSOR C_Lscape
    IS
    SELECT PL.pl_id pl_id,PL.partner_name partner_name,
    PL.area area,PL.region region,PL.country country,
    PL.tier tier,PL.type type,PL.category category,
    PL.market_segment market_segment,PL.parent parent,
    PL.geo_focus geo_focus,PL.opn_id opn_id,PL.opn_level opn_level,
    PL.opn_status opn_status,PL.opn_expirydate opn_expirydate,
    pd.types types,pd.apac apac,pd.region pd_region,
    pd.country pd_country,pd.value value,pd.sub_value sub_value,
    acc.acc_territory_assigned acc_territory_assigned,acc.industry industry,
    acc.industry_segment industry_segment,acc.solution_segment solution_segment,
    acc.product product,acc.solution_name solution_name,acc.apac acc_apac,
    acc.region acc_region,acc.country acc_country,
    ad.agreement_type agreement_type,ad.adreement_date adreement_date,ad.credithold_status credithold_status,
    ad.agreement_number agreement_number
    FROM PARTNER_LANDSCAPE_PL PL
    ,PARTNERLANDSCAPE_DETAILED PD
    ,AGREEMENT_DETAILS AD
    ,ACCELERATE_SOLUTION ACC
    WHERE PL.pl_id=pd.pl_id
    AND ACC.PL_ID=PL.PL_ID
    AND AD.PL_ID=PL.PL_ID
    AND (( PL.partner_name=:p18_partner
    AND PL.partner_name!='%null%')
    OR ( PL.country=:p18_country
    AND PL.country!='%null%')
    OR ( PL.region=:p18_region
    AND PL.region!='%null%')
    OR ( PL.area=:p18_area
    AND PL.area!='%null%')
    OR ( PL.category=:p18_category
    AND PL.category!='%null%')
    OR ( PL.market_segment=:p18_marketsegment
    AND PL.market_segment!='%null')
    OR ( PL.tier=:p18_tier
    AND PL.tier!='%null%')
    OR ( PL.GEO_FOCUS=:p18_geofocus
    AND PL.GEO_FOCUS!='%null%')
    OR ( pd.sub_value=:p18_industry
    OR :p18_industry!='')
    OR ( pd.value=:p18_gtmi
    OR :p18_gtmi!='')
    OR ( pd.value=:p18_productfamily
    OR :p18_productfamily!='')
    OR ( pd.sub_value=:p18_solutionarea
    OR :p18_solutionarea!='')
    l_lscape VARCHAR2(4000);
    BEGIN
    FOR i IN C_Lscape
    LOOP
    l_lscape := i.pl_id||' : '||i.partner_name||' : '||i.area||' : '||i.region||' : '||i.country||' : '||i.tier||' : '||i.type||' : '||i.category
    ||' : '||i.market_segment||' : '||i.parent||' : '||i.geo_focus||' : '||i.opn_id||' : '||i.opn_level||' : '||i.opn_status
    ||' : '||i.opn_expirydate||' : '||i.types||' : '||i.apac||' : '||i.region||' : '||i.pd_country
    ||' : '||i.value||' : '||i.sub_value||' : '||i.acc_territory_assigned||' : '||i.industry
    ||' : '||i.industry_segment||' : '||i.solution_segment||' : '||i.product||' : '||i.solution_name
    ||' : '||i.acc_apac||' : '||i.acc_region||' : '||i.acc_country||' : '||i.agreement_type||' : '||i.adreement_date
    ||' : '||i.credithold_status||' : '||i.agreement_number;
    END LOOP;
    dbms_output.put_line(l_lscape);
    END;
    Regards,
    Pa

    I'm doing something similar to what you want to accomplish.
    First, I created a view that joins the master and detail tables together. The view uses the STRAGG function ahead of time to concatenate multiple details into one "column" (or field).
    Next, in my report region, the SQL query lloks like :
    SELECT   dep_id, dev_st, oper_tp, sig, NAME,
             commod, commod_group,
             MIN (usgs_num) KEEP (DENSE_RANK FIRST ORDER  BY mt_rec ASC) usgs_num,
             MIN (model_name) KEEP (DENSE_RANK FIRST ORDER  BY mt_rec ASC) model_name,
             MIN (country) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) country,
             MIN (state_prov) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) state_prov,
             MIN (county) KEEP (DENSE_RANK FIRST ORDER  BY l_line ASC) county,
             MIN (lat_dec) KEEP (DENSE_RANK FIRST ORDER  BY g_line ASC) lat_dec,
             MIN (lon_dec) KEEP (DENSE_RANK FIRST ORDER  BY g_line ASC) lon_dec,
             mas_id, mrds_id
    FROM     NEW_MASTER_QUERY1
    WHERE    dep_id IN
        (SELECT dep_id
         FROM search_table where &P3_WHERE_CLAUSE. )
    &P3_SEARCH_AREA.
    GROUP BY dep_id, dev_st, oper_tp, sig, NAME, commod, commod_group, mas_id, mrds_idEach of the lines above with the MIN() function are "fields" which come from different child tables. My view is getting data from 6 tables, and I only display the data in one line.
    Hope this helps some.
    Bill Ferguson

  • How to add Value Table or Search Help for a field which is on Standard SAP?

    Hi All,
        I have a field HERST (tcode IE01) which doesnt have any value table or search Help. I have the same field in a Z table which I should display for the standard screen field in tcode IE01. So Pls suggest me on this.
        Thanks in advance.
    Regards
    Jaker.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

  • How to add a search help for a field in Screen Personas?

       I just started learning to use a Screen Personas, and I want to know how to add a search help for a field.
       I found a property in the help document named "IsLookupSupported". Is it the key?  But I saw it was gray in the field I created, and its value is "false". I could not change it.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

  • Search Function in APEX 4.2.3 doesn't work propertly

    Hi,
    I have an issue in APEX 4.2.3
    When I perform a search in the "Search Application" box, I don't get any results.
    I have to try again in the next search box and so I get this message:
    report error:
    ORA-01489: result of string concatenation is too long
    I've tried the same search string in the same application en APEX 4.2.2 and it fetch the right results anytime.
    Someone knows about this issue ?
    Thanks!

    Hello Mario,
    there is an issue with the unpatched 4.2.3 that affects the application search results. More details are available on our Known Issues page:
      http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-423-known-issues-2015120.html
    I have not heard of any ORA-01489 problems with search before, though.
    Regards,
    Christian

  • How to search two columns and return a value in the same row to a cell?

    Identification
    Diameter
    Soak
    3" Tank (inches/kft)
    AWG
    mils
    Code
    Strands
    Shield
    Conductor
    Insulation
    Semi-Con
    Days
    SD
    Injection
    Soak
    Total
    2
    175
    00
    7
    External
    0.288
    0.692
    0.752
    60
    0.4
    3.6
    20.0
    23.6
    2
    220
    00
    7
    External
    0.284
    0.764
    0.864
    75
    0.4
    3.6
    20.0
    23.6
    2
    260
    00
    7
    External
    0.284
    0.844
    0.944
    90
    0.4
    3.6
    21.8
    25.4
    2
    320
    00
    7
    External
    0.288
    0.964
    1.064
    110
    0.4
    3.6
    24.3
    27.0
    2
    345
    00
    7
    External
    0.288
    1.014
    1.114
    115
    0.4
    3.6
    25.6
    29.2
    Length
    3"
    4"
    AWG
    mils
    Soak
    SD
    Injection (3")
    Injection (4")
    650
    2
    320
    I want to input two values, AWG and mils and return the value in the Days column. 
    In the instance of what I am showing ....   AWG=2 AND mils=320 so Soak=110 ....
    I want to search the columns (AWG) AND (mils) to return a value in the column (Days) for that row into cell H10 (Soak)  ...
    So far I have toyed with LOOKUP, INDEX and MATCH ....

    SCW,
    I'm sure there is a clever way to cascade functions to avoid adding an auxiliary column in your practice table, but to me it wouldn't be worth the aggravation. I would add a column that concatenates Columns A & B, AWG & mils. This column can be anywhere and would be Hidden. Let's say your new column is Column N.
    In Column N, fill the body rows with:
    =A&"-"&B
    As good Numbers programming form would indicate, let's name the Practice Table Practices and only put the practices in that table. In another table where you do the lookup, let's call it Program, we will have the calculation/lookup.
    Based on your example, I'd guess that AWG may be in Column D and mils in Column E of your Program table, and the Soak lookup in Column F. If I'm wrong, adjust the column id.
    In Column F, write:
    =OFFSET(Practices::I$1,MATCH(D&"-"&E, Practices::N,0)−1, 0)
    The hyphen in the concatenated representation of the combination of AWG and mils is just tp make it more readable.
    As I'm sure you know, you could use other approaches, but since I had you put your aux column at the end of your Practices table, OFFSET with MATCH is a clean approach. INDEX could be used too.
    Here's an illustration:
    Regards,
    Jerry

  • How to add a search help to a field  Bank Type in Transaction FK02

    Dear All,
         How to add a search help to a field  Bank Type in Transaction FK02.
         Is there any possibilty of using  exit or searc help or domain to solve this problem.
            Thanks in Advance..
    Thanks,
    Lakhsmi.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

Maybe you are looking for

  • File to XI scenario

    Hi All I have a scenario where, XI has to read a file and process it. File format is like this: One Header Record with 3 fields Multiple data records with around 20 fields One footer record with 3 fields Now, while reading data from the file, how wil

  • CS4 macbook pro, cannot print to pdf. Well, I can but it does nothing...

    I'm running CS4 on my macbook pro which is running OS X 10.2.6. When I print my indesign or illustrator file to the PDF 9.0 option I get nothing, not even a dialog box asking me to save the pdf file. I've checked and re-checked my distiller setting t

  • Parallels for iBook G4

    I have a PC user who sent me a file that downloaded on my desktop as setup.exe I can't open the file. He states that if I had Parallels I could open it. Does that software work with the iBook G4? I don't want to download it and find out it does not w

  • Polish language

    I have been asked to translate some existing patient information leaflets into Polish. I have the text (as a PDF) but when I cut and paste into InDesign3, I lose all the accented letters. I only have English and USA under languages. I use Windows XP.

  • CC updater for CS6 not working

    Just got a notice that there's an update available for PS CS6 through the cloud. It churns and rumbles for several seconds and then tells me there's an error. See... for details. The details don't tell me anything I understand. (U44M1P7) Then clickin