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.

Similar Messages

  • Passing multiple character values from parameter form to PL/SQL

    Hi,
    I am passing multiple character values from parametr form into
    the report query and a PL/SQL procedure. It works fine with the
    query, when I use &variable. But, it doesn't compile in PL/SQL,
    so I just used the :variable, but not getting any records in the
    PL/SQL procedure. Any suggestions?
    sincerely,
    gj

    gj / Fedro,
    Only using the &referecne, you can pas a string / multiple character values and this would work for query only.
    The bind parameter in PL/SQL wouls support only single value
    Thanks
    The Oracle Reports Team

  • How to send a String value  from Servlet to  Action class in Struts .

    when iam trying to send string value from Servlet to Struts Action class through Http Session, iam getting null value, iam really in big confusion, help me.

    please elaborate clearly or put you code of both action and servlet here
    Are both of them in same web application

  • How to get the string value from the RichSelectBooleanCheckBox component?

    I added a validator to a RichSelectBooleanCheckBox component which is binded to a String attribute of a View Object.
    I defined the mapping of boolean value to corresponding String value in the corresponding attribute binding in the page definition.
    When the validate() method of my validator was invoked, the new value passed to the validate method() was a Boolean value instead of the converted String value.
    I need to write validate() method generically so that it can handle more than one way of mapping boolean values to String values.
    How can I get the converted String value in my validator method() from the RichBooleanCheckBox component that was also passed to the validate() method as a parameter?

    use:
    int num = Integer.parseInt(s);

  • 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

  • Passing multiple single values from R/3 BAPI to BW Query in VC

    Hi Experts
    I have a VC model where I am calling an R/3 BAPI which is returning a table of customer accounts.  I'm trying to go directly from that BAPI to a BW Query and pass the table of accounts into the BW Query.
    The BW Query has been set up with a variable to accept multiple single values for accounts, and I have mapped the correct output field from the BAPI to the correct input field on the Query.
    The BAPI does not seem to be passing the table of accounts into the Query.   If I hard code a single account in the mapping of the BAPI to Query call, the Query successfully returns the data I expect.
    Can I pass a table of accounts to a BW Query in this way?
    Many Thanks
    Tom

    Hi
    Have you tried with 'Group & Combine' operator. Just add this operator & join your BAPI & BI Query to this. Then in ths configure of this oparator select the 'Accoount' field & gourp the data accordingly. Also specify the aggregation if required. & in the table/chart after the operator select the fields which you want to show.
    I hope this is what you are looking for.
    Regards
    Sandeep

  • How to extract sub string value from a string?

    Hi,
    I need to know how can i extract sub strings from a main
    string, something like this:
    main variable-------->"2087-5E2SE-19-JG7BC"
    i want to split it into like this:
    sub_main_1 variable---------> "2087"
    sub_main_2 variable---------> "5E2SE"
    sub_main_2 variable---------> "19"
    sub_main_2 variable---------> "JG7BC"
    I did the same in flash by using Split and arrays, like this:
    var my_str:String = "2087-5E2SE-19-JG7BC";
    var my_array:Array = my_str.split("-");
    for (var i = 0; i<my_array.length; i++) {
    trace(my_array
    this.aaa1 = my_array[1];
    this.aaa2 = my_array[2];
    this.aaa3 = my_array[3];
    this.aaa4 = my_array[4];
    My question is that how can i do the same in director ?? i
    haven't find any split function in director.
    Thanks in advance,
    Amir

    You do a similar thing in Director using the itemDelimiter,
    which is a
    _player object property in MX2004. By default, it's a comma:
    put _player.itemDelimiter
    It will let you get specific items within a string.
    p = "2087-5E2SE-19-JG7BC"
    _player.itemDelimiter = "-"
    put p.item[1]
    -- "2087"
    You could use it to write yourself a little split function:
    on split(theString, theDelimiter)
    oldDelim = _player.itemDelimiter
    _player.itemDelimiter = theDelimiter
    itemList = []
    repeat with cnt = 1 to theString.item.count
    itemList.add(theString.item[cnt])
    end repeat
    return itemList
    end
    p = "2087-5E2SE-19-JG7BC"
    a = split(p, "-")
    put a
    -- ["2087", "5E2SE", "19", "JG7BC"]
    Dave -
    Adobe Community Expert
    www.blurredistinction.com
    http://www.adobe.com/communities/experts/

  • 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.

  • 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 pass the field value from module pool program to smartform using submit?

    // AT pai of module pool pgm i entered the following: here gv_orderid is my value to be available at smart form(driver pgm) & zmusic_store_smf is the driver program of my smartform.
    gv_orderid= wa-itemid./
    SUBMIT ZMUSIC_STORE_SMF VIA SELECTION-SCREEN
                                  WITH p_order = gv_orderid
                                  AND RETURN.
    //AT driver pgm(zmusic_store_smf):
    START-OF-SELECTION.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'ZMUSIC_SMARTFORM1'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = lv_form
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 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.
    CALL FUNCTION lv_form
       EXPORTING
    *      iv_orderid = is_purchase_item-zorder_id.
    iv_orderid = gv_orderid.
    // here i'm trying to call my smartform('ZMUSIC_SMARTFORM1')  from this driver pgm but unable to access the value of gv_orderid please help me out with this.

    Declare the gv_orderid in modulepool program.
    And Declare the parameter as import parameter in smartform.
    CALL FUNCTION  lv_form
       EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
         i_input                    =  gv_orderid
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5

  • How to retrieve a string value from a PHP function call

    Should this string be the return value of the PHP function?
    Or should it be embedded in the response HTML? Any examples?

    This is what I got so far:
    footer.mxml in Flex Builder 3:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="ts_request()">
    <mx:Script>
    <![CDATA[
    public function ts_request():void {
    timestampRequest.send();
    ]]>
    </mx:Script>
    <mx:Canvas width="836" height="36"
    backgroundColor="#05075C">
    <mx:Label id="timestamp"
    text="{timestampRequest.lastResult.timestamp}" color="#FEFEFE"
    height="20" y="10" textAlign="left" width="221" x="10"/>
    </mx:Canvas>
    <mx:HTTPService id="timestampRequest" url="
    http://www.ABC.com/timestamp.php"
    useProxy="false" method="POST" />
    </mx:Application>
    Here is the timestamp.php on the www.ABC.com web server. I
    have tested the php by directly access it with
    "www.ABC.com/timestamp.php" and it shows the timestamp correctly:
    <?php
    putenv($timezone);
    $Return = "<timestamp>".date("m/d/Y H:i:s", time())."
    CST"."</timestamp>";
    print($Return);
    ?>
    When I run footer.mxml in Flex 3 Builder, I got an error:
    This file cannot be launched.
    Where did I do wrong?

  • How to extract a string value from a varchar column

    Hi,
    I've a varchar2 column which has got xml data. I want to extract the value of some tag <test></test>
    I can't use EXTRACT as the column is not XMLTYPE.
    Please suggest.

    Hi,
    make a new temporary table table wirth columns as the same name as TAGS in your XML.
    extract the XML in a temporary variable.
    pass it to the below proc with the table name created in step1 , it will populate the temporary table with the XML data.
    PROCEDURE prc_save_xml(
    iv_table_name IN VARCHAR2,
    ic_xmlstring IN CLOB,
    on_count OUT NUMBER,
    ov_remarks OUT VARCHAR2,
    ov_status OUT VARCHAR2,
    iv_row_tag IN VARCHAR2 DEFAULT 'ROW'
    ) IS
    insctx dbms_xmlsave.ctxtype;
    doc CLOB;
    BEGIN
    --Get a context handle
    insctx := dbms_xmlsave.newcontext(iv_table_name);
    dbms_xmlsave.setdateformat(insctx, 'YYYYMMDD');
    dbms_xmlsave.setrowtag(insctx, iv_row_tag);
    ov_remarks := 'Inserting now';
    on_count := dbms_xmlsave.insertxml(insctx, ic_xmlstring);
    ov_remarks := 'Inserted now';
    dbms_xmlsave.closecontext(insctx);
    --set return status as Success
    ov_remarks := 'Sucess';
    ov_status := gv_success;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('IN OTHERS :' || SQLERRM);
    ov_status := gv_failure;
    ov_remarks := ov_remarks || ':' || SQLERRM;
    on_count := 0;
    END prc_save_xml;

  • Passing multiple select value from BI publisher to PL/SQL functions

    Hi - I have designed a report which pass parameters (Multi select) into a function to get the output result. When a single parameter value is passed to the function, report is being displayed. When multi select value is passed to the function it is returning the error `wrong number or types of arguments in call to 'F_PROCESS_WAVE_DATA'. When i checked the parameters passed to the function, i can see each multi select value is treated as different value and is assigned to different parameter in the function.
    Any help on passing the multi select parameter into function will be helpful.
    Regards,
    Vikram.

    All - Issue was resolved. I followed the following steps to resolve the issue
    1. Create a PL/SQL table type variable as VARCHAR2 in the database - Say as Larray
    2. Create PL/SQL type record and table for the record in database. Lrec, Ltable
    3. In BI report pass multiple select LOV variable as Larray(variable).
    4. In DB function, Parameter should be defined as LARRAY.
    5. Return PL/SQL table type Ltable from the function.
    Regards,
    Vikram.

  • How to Pass a HEX-Value to AdobeLifeCycle (TA:SFP) .

    Hello all,
    how to pass a HEX-Value to print a BLACK RIGHT-POINTING TRIANGLE?
    I want to pass a HEX value to AdobeLifeCycle (TA:SFP).
    This is done as follwoing:
    *-- Variablen
    DATA hex(2) TYPE x.
    SET BIT: 01 OF hex TO 0,
             02 OF hex TO 0,
             03 OF hex TO 1,
             04 OF hex TO 0,
             05 OF hex TO 0,
             06 OF hex TO 1,
             07 OF hex TO 0,
             08 OF hex TO 1,
             09 OF hex TO 1,
             10 OF hex TO 0,
             11 OF hex TO 1,
             12 OF hex TO 1,
             13 OF hex TO 1,
             14 OF hex TO 0,
             15 OF hex TO 1,
             16 OF hex TO 0.
    The HEX-VALUE ist u201E25BAu201C from the codepage 4110 = BLACK RIGHT-POINTING TRIANGLE, (use TA:SPC to see it).
    I set the HEX-VALUE before i call the PDF-OUTPUT:
    move hex to ls_frmglobal-hex. u201E(the field ist defined as u201ERAWSTRINGu201C)
    Then i call the Output;
    Now call the generated function module
    CALL FUNCTION fm_name
      EXPORTING
        /1bcdwb/docparams = fp_docparams
        frmglobal         = ls_frmglobal
        frmisu            = ls_frmisu
        frminf            = ls_frminf
        connections       = connections
        t_sums            = t_sums
      EXCEPTIONS
        usage_error       = 1
        system_error      = 2
        internal_error    = 3
        OTHERS            = 4.
    The result is u201E25BAu2018 instead of the BLACK RIGHT-POINTING TRIANGLE.
    Can any one have a idea what is goning wrong?
    I know how to print a Triangle on the Designer the quetion is how to pass the Hex-Value from a different codepage than the Stanndard codepage which we use.
    Thanks and regards
    Ibrahim

    I am trying to match \xfa which means that match faas
    a hex value.
    All I want to know is how to use the RE class tocheck
    for a cetain hex value.
    Correction:
    If the data is numeric, it can be matched using a hex,
    or octal representation for the regular
    expression. for instance, the numeric value 6 will be
    matched with either of the following regexes (hex,
    and octal, respectively). Read the API for
    the Pattern class if this doesn't make sense.
    "\06"
    "\006"(Should have checked first...)

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

Maybe you are looking for