Like in Parameter ?

Hi all,
I'm trying to make a report using BI publisher.
I need to have one parameter(Data Type: String). When you enter the text I want to display information for all records that have this string. I need the functionality of '% search'. It means that you don't need to know the exact string to find a record, just some part of it.
I tried this but it's not working the way I need.
select *
from some_table a
where upper(a.n5) like upper(:p_name)
Any Ideas ?
Thank you
Rossy

try this:
select *
from some_table a
where upper(a.n5) like upper(&p_name)

Similar Messages

  • Cursor like input parameter in function

    Hi, All !
    I have a question. I want use cursor like input parameter in function. How can I do this? Please give my an example.

    in fact i have a loop over a cursor :
    LOOP
    tmp_var:=0;
    FETCH contrat_cursor INTO contrat_rec;
              EXIT WHEN contrat_cursor%NOTFOUND;
    treatment1 -- i want to put all this trt1 in a function , and the function , since it depend on contrat_rec, will have a parameter
    end loop;
    in other context i need this function to make some trt in one row of the table contrat
    so i can get this row with select * from contrat where ...
    my question, is this ok when i give contrat_cursor%ROWTYPE as parameter to the function
    and in the second context, when i get back i row from table contrat , how can i give this row as paramer , in contrat_cursor%ROWTYPE form
    i wish it was clear
    Regards
    Elyes

  • Like as parameter

    i am having one problem.. i am working on 1 report.. where i have to give like as parameter.. for example
    and nvl(prod.name,'1') like nvl(nvl('%'||:p_prod_name||'%',prod.name),'1')
    Its working sucessfully on sql window.. But when i run it on bi publisher its giving Invalid Invalid parameters requested.
    Parameter in Bi = Data Type is string and parameter type as text
    please help ..

    Try using instr instead of like by replacing
    and nvl(prod.name,'1') like nvl(nvl('%'||:p_prod_name||'%',prod.name),'1')
    with
    and instr(nvl(prod.name,'1'),nvl(:p_prod_name,'1')) > 0

  • ABAP: How can I create screen like COOIS parameter

    Dear ABAP Experrts,
    How can I create same paremeter screen like COOIS. E,g in production order parameter screen there are many options  but when I create a parameter
    in ABAP program
    SELECT-OPTIONS:
    SO_AUFNR FOR AFKO-AUFNR,
    only one column is displayed . How can I  show same parameter screen for production order.
    Regards
    Aneel

    Dear Mehwish ,
    Thanks for your help. How can I find matchcode for my other columns.?
    I mean I want to use some other parameters also like
    SO_MATNR FOR MAKT-MATNR
    SO_WERKS  FOR T001W-WERKS,
    SO_PWERK  FOR T001W-WERKS,
    SO_AUART FOR T003O-AUART,
    SO_FEVOR FOR T024F-FEVOR,
    SO_VBAK FOR VBAK-VBELN.
    How can I find matchcode object.?
    Regards,
    Aneel

  • When/How to use - "search" parameter type in parameter like other types.

    We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
    I couldn't find any help or release notes on this !
    Thanks
    Ayaps

    I started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
    I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us.

  • How set and get parameter for a session of a portlet (Java)

    I would like get parameter and set parameter for a portlet in portal 9.02. This parameter must be availbale during the session of the portal.
    With Java Servlet
    // I retrieve my session
    HttpServletRequest httpreq = (HttpServletRequest)req;
    HttpServletResponse httpresp = (HttpServletResponse)resp;
    HttpSession session = httpreq.getSession();
    //And after i can get or set some parameter for this servlet
    //Example
    session.setAttribute("MyEmployeeNumber","600000");
    String id = (String)session.getAttribute("MyEmployeeNumber");
    // But with Portlet in portal, i can't do it.
    PortletRenderRequest pr= (PortletRenderRequest)httpreq.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String sUser=pr.getUser().getName();
    ProviderSession session=pr.getSession();
    // But after if i want get or set a value in this session i have a internal error 500
    session.setAttribute("MyEmployeeNumber","600000");
    I would like my parameter is avalaible during a session for a user in each page of the portal, because my portlet is on each page.

    I have almost the same problem. I tried as you suggested, but it doesn't work yet.
    provider.xml
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    My code in my jsp-portlet is
    <%@page contentType="text/html; charset=windows-1252"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.render.PortletRendererUtil"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    import="oracle.portal.provider.v2.ParameterDefinition"
    import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"
    %>
    <%@page session="true"%>
    <%
    PortletRenderRequest pReq = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    String valueSession = (String)pReq.getAttribute("sesion");
    if (valueSession != null) {
    pReq.setAttribute("session", "value1");
    out.println("<br>(1)valueSession != null");
    out.println("<br>(1)valueSession : " + pReq.getAttribute("session"));
    } else {
    pReq.setAttribute("session", "value2");
    out.println("<br>(2)valueSession == null");
    out.println("<br>(2)valueSession : " + pReq.getAttribute("session"));
    %>
    And i always get as result:
    (2)valueSession == null
    (2)valueSession : value2
    Even when i send values (post) at the same page or browsing between tabs:
    I check my provider registration and it has the value "once per session"
    I have portal 9.0.2.2.14
    Thanks

  • Using a URL parameter by the JSP to pull in an html file for dynamic content ??

    I would like to have a simple jsp which could be called from an URL
              with a parameter. I'd like the parameter to be used by the JSP to form
              a filename of a second file. This second will be a chunk of HTML
              which is sucked in to the JSP to form some content in a particular
              HTML table cell.
              The ASP is this :
              <%
              targetPath = Server.MapPath(Request.QueryString("Content")+".txt")
              // makes a variable called targetpath which is a filename called
              something.txt
              Dim filesys, myloadedfile, line
              Set filesys = CreateObject("Scripting.FileSystemObject")
              Set myloadedfile = _
                   filesys.OpenTextFile(targetPath,1,0)
              Do
              // loops round each line of the something.txt file putting them in the
              JSP
                   line = myloadedfile.Readline
              %>
              <%=line%>
              <%
              Loop Until myloadedfile.AtEndOfStream
              myloadedfile.Close
              %>
              Please can someone help me out with some info on the JSP equivalent
              please?
              Thanks Heaps
              Rob
              

              See Content tag on http://www.servletsuite.com/jsp.htm
              This custom tag lets to add any file (even the outisde
              of your web application).
              [email protected] (rob) wrote:
              >I would like to have a simple jsp which could be called from an URL
              >with a parameter. I'd like the parameter to be used by the JSP to form
              > a filename of a second file. This second will be a chunk of HTML
              >which is sucked in to the JSP to form some content in a particular
              >HTML table cell.
              >
              >The ASP is this :
              >
              ><%
              >targetPath = Server.MapPath(Request.QueryString("Content")+".txt")
              >// makes a variable called targetpath which is a filename called
              >something.txt
              >
              >Dim filesys, myloadedfile, line
              >Set filesys = CreateObject("Scripting.FileSystemObject")
              >Set myloadedfile = _
              >     filesys.OpenTextFile(targetPath,1,0)
              >Do
              >// loops round each line of the something.txt file putting them in the
              >JSP
              >     line = myloadedfile.Readline
              >%>
              ><%=line%>
              ><%
              >Loop Until myloadedfile.AtEndOfStream
              >myloadedfile.Close
              >%>
              >
              >Please can someone help me out with some info on the JSP equivalent
              >please?
              >
              >Thanks Heaps
              >
              >Rob
              

  • Passing Parameter in SQL

    How to Passing parameter in SQL.For Example,Table name=&From_Clause.It will asking table name at runtime.How to assign table name based on user.

    Hi,
    796776 wrote:
    It will returm error.what problem in this
    Select * From Emp a,
    (SELECT CASE
    WHEN USER = :UserType
    THEN 'scott.Dept'
    ELSE 'scott.order'
    END AS b
    FROM dual)
    Where a.DeptNo= b.DeptNo &WhereClauseIt's hard to guess, from an example like this with so many errors, exactly what you're trying to do.
    Please post a description of the problem, including CREATE TABLE and INSERT statments for any tables you need (unless you can state the problem using commonly available tables, such as those in the data dictionary or the scott schema), a few values of a parameter (or examples of different user names, if USER acts like a parameter) and the results you want from the same data for each value.
    For example
    "In addition to the scott.dept table, I have a table called my_dept: CREATE TABLE my_dept ...
    which has this data: INSERT INTO my_dept ...
    I need a script such that, when user scott runs it, the results are ...
    but when any other user runs it, the results are ..
    As you can see, the difference is ..."
    Table names must be explicitly given when a SQL statement is compiled. That's why I usggested a preliminary query; so by the time you compiled the main query, the table name would be known and could be passed in a substitution variable.
    If you really want to do it in one query, you can do a UNION of two queries, one of which returns nothing because of the parameter. It's not very efficient.

  • How to pass parameter from unix to oracle

    Hi all,
    Kindly need your help regarding to this problem
    for i in `ls *.dat*`
    do
    echo "File $i"
    sqlplus -s $conn <<END
    set echo off
    set termout off
    set feedback off
    set verify off
    set showmode off
    set pagesize 0
    set recsep off
    spool file_$day
    select nvl((select file_name from abc where file_name=$i),'Files Not Found') from dual;
    spool off
    exit
    END
    done
    I need to pass parameter to the select statement but it failed. The error is
    select nvl((select file_name from abc where file_name=),'Files Not Found') from dual
    ERROR at line 1:
    ORA-00936: missing expression
    It seems like the parameter didnt passed to the query. Need everyone helps. Urgent!
    Many thanks
    Tiiim

    I would have helped you had you not been abusive and called your request urgent. If it is truly urgent call an ambulance or the fire department or Oracle Support.
    We are volunteers and your request is no more important, or urgent, than that of anyone else here.
    An apology would be appropriate.

  • PLSQL - Like statment

    can i add parameter to like statment in PLSQL code :
    select * from abcd where any_value like '%input parameter %'
    thanks

    This should be asked in sql pl/sql forum PL/SQL
    Timo

  • Passing parameter value back from Child region [BTF] to Parent

    Hello,
    I am using Jdev 11.1.1.6. I have a use-case where I need to pass value back from child taskflow to parent.
    Let me elaborate the use-case:
    I have a main page which is implemented as BTF with fragment. This main page contains a child region [again a BTF with fragment].
    I am passing a parameter value from parent page to it's region using taskflow input parameter. Now value for one of the parameter changes inside child/region taskflow and I need to make this value available to main page taskflow.
    This parameter is just pageFlowScope variable, so basically not coming from any VO.
    I know that taskflow can return value via return parameter but I don't know if that is true for taskflow implemented as region in a page.
    Is it possible to communicate the pageFlowScope variable value from child region to it's parent page?
    Thanks,
    Jai

    Hi Frank,
    I tried to follow steps mentioned in your post but encountered error that "The scope of the referenced object #{viewScope.parentBeanName} is shorter than referring object childBeanName"
    Let me explain what I did:
    1. Created a bean parentBeanName in viewScope
    2. Created another bean childBeanName in pageFlowScope
    3. In ChildBean.java, created a private property parentBeanProperty for Class [ParentBean] and generated the accessors
    4. Created a input parameter in region TF as:
    <input-parameter-definition id="__28">
          <name id="__27">parentBeanParam</name>
          <value>#{pageFlowScope.childBeanName.parentBeanProperty}</value>
          <class>ParentBean</class>
          <required/>
    </input-parameter-definition> 5. Since my mainPage contains child page as region. I added parameter to mainPageDef to pass it to child TF, like this
    <parameter id="parentBeanParam" xmlns="http://xmlns.oracle.com/adfm/uimodel"
                       value="#{viewScope.parentBeanName}"/>6. Introduced a client method in childBeanName that is called from UI. There I am retrieving parentBeanParam instance from pageFlowScope and call setter method of my variable inside ParentBean.java
    7. Ran the page but encountered the error.
    Did I miss something somewhere?
    Initially I got error where #{viewScope.parentBeanName} returned NULL due to parentBeanName not instantiated. I created a variable in mainPageDef with it's default value pointing to #{viewScope.parentBeanName.variableName}, which I guess will instantiate the bean in viewScope.
    After this I got error of shorter scope. It never reached to code in Step 6 during execution cycle.
    FYI - My application is based on UIShell and essentially a one page application. Main page referred above is also a jsff based on BTF. I hope, this should not affect this implementation but I thought of at least mention it.
    Thanks,
    Jai
    Edited by: Jai Om on Dec 18, 2012 2:38 PM

  • Passing parameters to like condition

    hi all,
    i am trying to pass a parameters from a form to a report and use this parameter
    in a where condition of the sql query , my problem is that i need to use this parameter in a like statment to bring all the records which are like this parameter
    its not working...
    function AfterPForm return boolean is
    V_WHERE VARCHAR2(200);
    begin
    --:P_called is the parameter sent from the form
    IF :P_called IS NOT NULL THEN
         V_WHERE := '%'||:P_called||'%';
    END IF;
    :P_where := 'AND CALLED like' || V_WHERE;      
    return (TRUE);
    end;
    ----- this is the query----
    SELECT *
    FROM VOIP_CDR
    where substr(VOIP_CDR.CALL_INITIATION_TIME,1,8) between :f_date and :t_date
    &p_where

    What if you change the code like:
    :P_where := ' AND CALLED like' || V_WHERE;
    so add an additional space in front of the AND statement

  • How do I pass the exact datetime parameter in a procedure.

    How do I pass the exact datetime parameter in a procedure.
    Hi All,
    I have a datetime problem which is driving me crazy.
    I need pass a datetime field as a parameter in an oracle procedure exactly as below with timestamp.
    Example: '6/01/2005 5:25:24 AM'
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get an error “INVALID MONTH”
    Next Changed to_date to to_char
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_char('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get a different error, “INVALID NUMBER”
    Next pass the datetime as it is.
    SQL > exec myprod(‘value1’,’value2’,’value3’, '6/01/2005 5:25:24 AM');
    I get an error “INVALID MONTH”
    Here is the my procedure.
    CREATE OR REPLACE PROCEDURE myprod (
    p_value1 varchar2,
    p_value2 varchar2,
    p_value3 varchar2 ,
    p_value4 date )
    IS
    filehandler UTL_FILE.FILE_TYPE;
    va_currentdate DATE;
    BEGIN
    SELECT sysdate
         INTO va_currentdate
    FROM dual;
    END;
    Do you know any solutions for this problem.
    Thanks

    What is your NLS_DATE_FORMAT value?
    There seem to be some implicit data conversions in your arguments.
    SQL> select parameter,value from nls_session_parameters where parameter like '%DATE%';
    PARAMETER                                                    VALUE
    NLS_DATE_FORMAT                                              YYYY-MM-DD HH24:MI:SS
    NLS_DATE_LANGUAGE                                            AMERICAN
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual;
    select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual
    ERROR at line 1:
    ORA-01830: date format picture ends before converting entire input string
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh:mi:ss am') from dual;
    TO_DATE('6/01/20055
    2005-01-06 05:25:24

  • I want to delete a Parameter but it won't let me...

    I want to delete the parameter @Subtitle but it won't let me.
    It has a green check mark beside it and in the Report definition it has the following.
    How do I find where this is and delete it?
    CR 8.5 dev edition
    Kelvin
    +++++++++++++++++++++++++++++++++++++++++++++++++++
    4.0 Formulas
    4.1 Record Selection Formula
         {CIT_RPT_VHINV;1.Condition} = {?@Condition}
    4.2 Group Selection Formula
    4.3 Other Formulas
         Name: {@Subtitle}
         Formula: //if {?@Summary} = 0 then "Details" else "Summary";
         Name: {@ConditionLabel}
         Formula: if {?@Condition} = 310 then "New"
         Else if {?@Condition} = 311 then "Used"
         Else "All"

    It sounds like this parameter used to be in a stored procedure. I see you removed the reference to it in your procedure which is good. I think to make it disappear you could reset the data connection to a brand new one. If you are using ODBC give the DSN a different name. If you are using a native driver use a different driver like OLE DB or ODBC. Then reset the connection back to the original data source in the report. I think this will force the report to recognize it needs to update the connection information. 
    If the problem still exists, I recommend creating a copy of this report and removing half the items.  If you get the parameter still, remove half of the remaining items. Keep doing this till the parameter goes away. Once the parameter is gone undo the changes until you find the item that is causing this. 
    I think you're best bet is to start with resetting the data connection and running it first before setting it back to the original.

  • Receive array of record as a storeprocedure parameter

    Hello!
    Can I receive an array of record in a storeprocedure?
    I have seen that in C sharp you can receive an array of varchar, for example, but I don' t know if it's possible to receive a complex type array like a record or you can only receive a simple type array like output parameter.
    I work with this record:
    TYPE prueba IS RECORD
    TIPO VARCHAR2(30),
    CODIGO varchar2(10),
    DENOMINACION VARCHAR2(55),
    COD_TIPO NUMBER,
    DENOMINACION2 VARCHAR2(55)
    Thanks!!

    Hi, you can't pass array of record to stpred procedure, inside use UDT.
    [See.|http://forums.oracle.com/forums/thread.jspa?messageID=3606898&#3606898]
    Roberto
    Edited by: rober584812 on Sep 19, 2009 5:26 PM

Maybe you are looking for

  • How do I listen to a whole album

    I have to play individual tracks. How can I play a whole album or create a play list on my new iPad?

  • Dynamically changing af:table range navigation

    Hi Steve, I have a requirement of changing range navigation on another variable "items per page" on the table. 1. User can select any number of items to be displayed at a time on page from a drop down with values 10,20,30 etc. 2. I have a valueChange

  • Does a gmail account use a lot of disk space?

    I have recently moved my domain from a pop account to a gmail hosted domain, and my employer has us using gmail. I have made IMAP accounts to get my gmail content in Apple Mail. After a couple of months, my available disk space has gone from 30G to 5

  • ALT+TAB doesn't work properly in Windows 8.1

    Holding ALT+TAB will activate the flip 2D to switch from a window to another. The problem is that this function remains active for a very short time and I'm not able to select the window I want in the foreground. I also noticed that when I put the cu

  • MacBook Air stolen, how do I sync with new one?

    My MacBook Air got stolen a few weeks ago. After trying to recover it, offering rewards, 'find my [Mac]', etc. I bit the bullet and bought myself a new one. I had Time Machine backups, so restored those onto my new MBA and off I was as if nothing had