How to pass wild card '%'  value from the parameter to the query

Hello everyone,
I have following 2 problems
1) I was trying to do some thing like below
select * from emp
where ename like 'J%'
for this i have used the following code
select * from emp
where ename like :P_ENAME
and before running the query in the parameter box i entered J%. But my report returns an error which says INVALID PARAMETERS REQUESTED.
2) I have a req of passing both comma separated and wild card for the same parameter. If we take the same example as above,
user should be able to enter
a) JASON, SMITH, JOHN OR b) J%
I have used comma separated value option of the parameter for the csv values and its working fine, but i need to add the wild card feature also to the same parameter.
Can anyone please help me with these things?????
Thanks in advance!!
Raghu

Hi Raghu,
I guess you are in older version, You have to get into latest version to use %, it should work well
you should use where ( ename like :P_ENAME ) or ( ename in (:P_ENAME)) for both the condition to satisfy.

Similar Messages

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • How to pass a string value from XL sheet cell to SQL query.

    Hi,
    I am using SQL query in XL sheet to fetch some data. for that i am using ODBC connection. Now I want to pass a string from XL sheet Cell value in the where clause of Select statement, Please let me know how to do this.
    Below is My code:
    nge("A4").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=xyz;PWD=xyz;SERVER=xyz;" _
    , Destination:=Range("A4"))
    .CommandText = Array( _
    "SELECT CRYSTAL_REPORT1.PROJECT, CRYSTAL_REPORT1.OBJECT" & Chr(13) & "" & Chr(10) & "FROM NAIODEV.CRYSTAL_REPORT1 CRYSTAL_REPORT1" _
    .Name = "Query from gg"
    Thanks,
    Priya

    What does "XL" (whatever that is) have to do with Crystal Reports which is what you are obviously working with have to do with the Oracle database?
    The rules for using Crystal with Oracle are quite clearly described in all the Crystal Reports docs ... you MUST use IN OUT ref cursors unless you are doing direct table or view access.

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • How to remove Credit Card number from the account

    Dear Sir/Madam,
    Someone used my Creadit card to buy credit and I agreed initially.
    Now i want to remove my creadit card number from her account and disallow her to use it. But it seems the credit card infomation can not be removed and she still can buy credit using my credit card.
     I checked with her account and it seems my credit card number is always shown there, no matter how I try.
    May I know how can I do?
    Thanks
    Solved!
    Go to Solution.

    Hi,
    You can delete a credit card if you have used it to buy Skype Credit, but you cannot delete a card that is being used for recurring payments (a subscription or Auto-recharge). You have to cancel the recurring payment first.
    To delete a credit card:
    1. Sign in to your account:
    http://www.skype.com/go/myaccount
    2. In the Account details section, click Billing & payments.
    3. On the Payment settings page that appears, click Stored payment details, and then next to the credit card you want to delete, click the Delete button.
    For more help with updating your credit card details, visit:
    https://support.skype.com/faq/FA10486/
    Hope this helps.
    Rod
    If you found this answer helpful, please give Kudos. If it resolved your issue, mark it as a solution to help others. Thanks!

  • SQL Query: How to pass list of values to the IN operator

    Hi,
    I'm trying to pass a list of values to the WHERE <a> IN <list>
    I dont want to use dynamic cursors (REF CURSOR). Is this possible using Oracle SQL?
    Please let me know.
    My program:
    DECLARE
    list_of_ids := '10, 20, 30';
    SELECT MAX(sal) INTO max_sal FROM employee WHERE emp_id IN (list_of_ids);
    END;
    Thanks in Advance,
    Niko

    You do not want to pass a comma separated list. You want to pass a collection. So
    CREATE TYPE num_tbl
    AS
    TABLE OF NUMBER;
    DECLARE
      l_list_of_ids num_tbl := num_tbl( 10, 20, 30 );
    BEGIN
      SELECT max(sal)
        INTO max_sal
        FROM employee
       WHERE emp_id IN (SELECT * FROM TABLE( l_list_of_ids ));
    END;
    /Justin

  • How to pass line item values in the table paramer of FM

    Hi all,
    When i will give the import of  the FM as VBELN"sales order number.
    I want to display all the line items for "PO Quantity in the out put of the FM.
    For this i thnk i have to pass the line item values in the table parameter of the FM.
    Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
    Please give a example.
    Thanks

    Sub pLoopThroughPivotFields()
    Dim oItem As Excel.PivotItem
    Dim oField As Excel.PivotField
    Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
    For Each oItem In oField.PivotItems
    oField.CurrentPage = oItem.Name
    'Put your copy code here
    DoEvents
    Next oItem
    End Sub
    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

  • How to pass input field value from one region to another ?

    What I am trying to do :
    I have one page with 1 region with one text field and an apply button and a report region.
    I want to be able to enter a value in the text field, click on apply and exploit this value in the source of the report region.
    Of course, I want the the value in the text field remains after the click on the apply button.
    What I cannot control with my try :
    1 the text field is always wiped off after the push on the apply button, no matter what kind of "do not clear the cache" setting I have found, and no matter the "take this value for this parameter" setting I have done every where I have found it.
    2 (but I think that this is related to 1) I cannot get working the conditional display of the report region on a NOT NULL condition of the above region text field.
    I have tried the code of the page 23 of the customertracking demo packaged apps, but the button properties shown are not the same than what I can find in my apps : I guess this is a difference in apex version normal feature.
    I think that what I am trying to achieve must be terribly simple but I cannot see it.

    Ok I have found out that it was now an interactive report that has to be done for this kind of situation, and that in my case, I needed to enable a detailled report.
    Now I have another question : one of my field is rich text : how to render it in my detailled report ?

  • How to clear asset scrap value from the asset

    Hi,
    An asset has been partially retired in 2007 and transfered the balance to other asset. There is a scrap value in the same asset and still appearing in scrap value field of asset explorer. This is giving an error in asset year end closing. Please give a solution to solve this issue. The scrap value is visible in the asset under Planned values tab and there is zero net book value.
    Regards
    Paroy

    Dear Markus,
    I dont mean somebody would search for me. I replied to your query to get inputs from various people. Someone might have faced a similar issue, they may have a solution or someone might have known and implemented a Note.
    I think the main purpose of these forums is knowledge sharing and quick solution to an issue which a person in question could not figure out.
    Regards
    Paroy

  • How to pass a large value to a parameter of a service

    Hi Everyone,
    I need to execute service GET_SEARCH_RESULTS and want to provide values to its parameter QueryText. I am calling the service in the following manner:
    http://localhost/idc/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=<$keyTagID$>&ftx=&AdvSearch=True&SortField=xAvgRating&ResultCount=5
    hence passing <$keyTagID$> to QueryText. Now in my case, this variable <$keyTagID$> is becoming very large consequently making the whole of above URL very big. Its crossing the permissible limit of 2038 characters by Internet Explorer. Thus error 'URL too large' comes when I am executing the service.
    Please suggest me how to execute the service 'GET_SEARCH_RESULTS', so that I can provide a large value to the parameter QueryText. I thought of making use IdocScript function 'executeService', but so far as I know this function accepts only one argument which is service name. Thus how to provide values to parameters of a service with 'executeService' function?
    Thanks & Regards,
    Ashish Gupta

    Hi,
    To send large arguments over HTTP you have to post them, basically setting up a form similar to this:
    <form action="<$HttpCgiPath$>" method="POST">
    <input type="hidden" name="IdcService" value="GET_SEARCH_RESULTS"/>
    <input type="hidden" name="QueryText" value="<$keyTagId$>"/>
    <input type="hidden" name="ftx" value=""/>
    <input type="hidden" name="AdvSearch" value="True"/>
    <input type="hidden" name="SortField" value="xAvgRating"/>
    <input type="hidden" name="ResultCount" value="5"/>
    <input type="submit" name="submit" value="submit"/>
    </form>
    I'm not sure how much that helps if your users are currently just clicking a link. You could hide the form somewhere and have your link execute a javascript function which then posts the form.
    David

  • How to pass VO1 return value to VO2 parameter?

    Hi Friends,
    I have two VO's, in a page.
    In the First VO1 i am pass 2 parameters then this vo return one single value ex: 1234
    Now my Second VO2 i want to pass Parameter , first VO1 result value.
    How to achieve this.
    But i don't want to capture VO1 result value in the form.
    Could you please any body Explain how to achieve this Requirement.
    Thank Advance.
    Rkrao.

    Ramu,
    //Modify the code as per your requirement
       String position = null;
       //First VO
       OAViewObject vo = (OAViewObject)findViewObject("EmployeeVO1");
       if(vo!=null)
                     vo.executeQuery();
                     OARow row = (OARow)vo.first();
                     position = (String)row.getAttribute("PositionCode");
    //Pass the same value to the new VO as your value returned will be into position variable
       OAViewObject vo = (OAViewObject)findViewObject("ManagerVO1");
       if(vo!=null)
                     vo.setWhereClauseParam(0,position );
                     vo.executeQuery();
       Regards,
    Gyan
    Edited by: Gyan on Feb 23, 2011 1:30 AM

  • How to acquire two signal values from the same GPIB

    I have a power meter which provides two values,  the power and wavelength simultaneously.  So when I'am giving in the GPIB write command probe a joint command is not provided by ILX light wave. So how can i get the values simultaneously.
     Please help

    Hi perumpadapu,
    you should read the manual of your device/software. There you should find the answer.
    Or ask the customer support for that device.
    As long as you don't even provide a name of your device we cannot provide much more help!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to pass Presentation Variable Value from Main Report to Detail Report

    Hello,
    I've 2 reports that is attached to each other. In my main report i've several report prompts and i am using i"s prompted" on my detail report to attach them.
    But 2 of my report prompts are presentation variables(Names : FIRST, SECOND). Both are in date format. I've a filter in my main report like;
    "ASSIGNMENTS_F"."EFFECTIVE_START_DATE" BETWEEN @{FIRST} AND {SECOND}
    It works fine when i run the main report. But when i click on the numbers, i see that i can not filter my detail report with the chosen values for 2 presentation variables. It just shows all the dates.
    I've tried adding both presentation variables in both reports as columns and adding 'is prompted' filter to them. But did not work either.
    I just cant pass the written values for presentation variable prompts to detail report..
    Please help :)

    Hi,
    What you can try is refer the filte condition in the main report to the detailed report with the option--> Filter based on another request.
    Or you try creating another intermediate report which will refer the main report filters and pass the filters to the detailed report.
    Hope this helps.
    Regards
    MuRam

  • How to get multiple values from the db using select

    hi all,
    i am using oracle 9i database
    i created a procedure
    create or replace procedure sample_proce
    as
    to_i varchar2(50)
    begin
    select to_id into to_i from sample where flag in('y');
    dbms_output.put_line('hai'|| to_i);
    end;
    when i executed this procedure the following error occurred.
    error at line 5 fetching too many rows.
    but when i execute the select query alone i can able to view all the rows.
    how to resolve it

    i used the following procedure
    create or replace procedure sample_proc
    as
    begin
    for s in(select to_id from sample where flag='y')
    loop
    dbms_output.put_line(s.to_id);
    end loop.
    end;
    it is executed fine. i can able to fetch all the rows.
    how to pass all these values into the another procedure.
    we usually pass only one value into another procedure, i do no how to pass all the values . please help me.
    Thank u.

  • How to get a value from the previous element (XSLT/XPATH gurus ahoy!)

    Hi All,
    I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
    Here's a simplified data example to illustrate the problem.
    <ROW>
    <START_DATE>01-01-1980</START_DATE>
    <END_DATE>01-01-1988</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-1988</START_DATE>
    <END_DATE>01-01-1990</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-2000</START_DATE>
    <END_DATE>01-01-2005</END_DATE>
    </ROW>
    With the data above, I should print two lines:
    01-01-1980 - 01-01-1990
    01-01-2000 - 01-01-2005
    I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
    Thanks & Regards, Matilda

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

Maybe you are looking for

  • I have FF on USB, got sync code, closed FF on USB, opened FF on desktop, clicked 'have sync acct,' won't let me add device (USB) please help.

    I have FF5 on a portable device (a USB drive). I set up a sync account from that and have the code. I want to sync the FF on the USB with FF on the my various desktops, starting with my WIN 7 home desktop. On home DT, went to Options, Set up Sync, cl

  • Referencing fields from interactive report

    Nevermind! Hi, I'm working with an interactive report for the first time and I'd like to direct the "edit" button for a record to another page so I can use that record's data in the new page. How do I get the other page to reference the record I sele

  • What computer(s) do you recommend for photoshop painting?

    Hi, I have a 4-year Packard Bell laptop computer that running on its last legs. So it's time for me to buy a new computer. I plan on mainly using it for digital painting with photoshop cs6. Therefore a computer that's very compatible with the newest

  • Block based on procedure

    I have a created a pacakage Pacakage specification TYPE ERROR_REC IS RECORD ( ID tbl.ID%TYPE, ORGL_STAMP tbl.ORGL_STAMP%TYPE, ORGL_USER tbl.ORGL_USER%TYPE, DEL_FLG tbl.DEL_FLG%TYPE, START_DT tbl.START_DT%TYPE, END_DT tbl.END_DT %TYPE); -- cursor vari

  • PSE 12 Verschieben funktioniert nicht mehr

    Hallo ihr Lieben, ich bin neu hier im Forum und hoffe ich bin hier richtig, wenn nicht bitte verschieben Und zwar habe ich folgendes Problem: Ich habe mein Photoshop Elements 12 jetzt ca fünf Wochen nicht genutzt, habe es also Vorgestern wieder einma