How to get multiple records using fn-bea:execute-sql()

Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AM

Hi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat

Similar Messages

  • Unable to use fn-bea:execute-sql() in an XQuery in Workspace Studio 1.1

    When we create an XQuery file in Workspace Studio 1.1 (ALSB 3.0), we are unable to use fn-bea:execute-sql(). It throws an error saying "unknown function". It doesnt allow us to publish the XQuery file to ALSB instance due to the "unknown function" error. However if we directly upload this file to ALSB console, it accepts it and the execute-sql function also works grrat. Can you please let us know if we have to configure anything on the Workspace studio to be able to use XQuery Extensions for Service Bus ? Or can you please let us know if we should declare any namespace in the XQuery file to use fn-bea:execute-sql() in Workspace studio ?

    It sounds like a bug. Can you please contact bea support?
    Gregory Haardt
    ALSB Prg. Manager
    [email protected]

  • How to get multiple values using HttpSession.getAttribute(java.lang.String)

    Hey Guys
    I'm trying to find a way to get multiple values using the following method
    HttpSession.getAttribute(java.lang.String)
    Here's the scenerio. Its a already written application and now i'm trying to make some changes. earlier in the jsp page a combo box was used and value was retrieved in the servlet using the getAttribute method of Session. Now I'm using a html multiple selection list and have to retrieve all the values selected in the list in the servlet. Can anyone please suggest me how to do that. HTTPRequest class has a method getParameterValues which will let me do that but i have to do is using HTTPSession.
    Thanks for your time to read this

    I'm not sure what you are trying to do. You can only use session.getAttribute to retrieve something that has already been stored in the session with a previous setAttribute. If you need to store multiple values under one attribute name using setAttribute, you can store an array, or an ArrayList or whatever type of Collection you want. The request.getParameterValues method is the only way you can retrieve form parameters than can have multiple values. If the servlet hasn't already processed these parameters and put them into the session for you, you have to use request.getParameterValues.

  • How to Delete Multiple Records using selectbox in jsf

    Hi!
    My Senario is I want to delete multiple records using checkbox. After selecting multiple records when i click the delete button the selected
    rows shuld be deleted.if am doing like this but the edit ,delete for each row functionality is not working.
    <h:selectBooleanCheckbox id ="bcb" value="#{item.empno}">
    </h:selectBooleanCheckbox>
    But other functionality is not wokring.
    Can any one plz tell how to select the multiple records and how to send the id to the serverside.
    I want code code for jsp and as well as backingBean how to accaess .
    Any Reply shuld be apreciated

    You may find this article useful as well: http://balusc.blogspot.com/2006/06/using-datatables.html
    Check the chapter "Select multiple rows" for two generic ways to select multiple rows in a datatable.

  • Insert query using fn-bea:execute-sql() function

    Hi ,
    How to use sql insert query in Xquery function fn-bea:execute-sql().
    Could you please anyone help me on this.
    Regards
    Rajesh.

    Hi
    Can i use stored procedure in that function to include insert query?
    could you please suggest me on this.
    Please provide some links or tutorial on that.
    Regards
    Rajesh

  • How to get multiple records from internal table through BDC

    PERFORM DYNPRO USING:
      'X'  'SAPMM61L'  '0500',
      ' '  'BDC_OKCODE'  '=NEWC',
      'X'  'SAPMM61L'  '0500',
      ' '  'BDC_CURSOR'  'PLPTU-PLWRK(01)',
      ' '  'BDC_OKCODE'  '=TAKE',
      ' '  'PLPTU-PLWRK(01)' '2531'. (2531 is a plant)
    This is the recording used to get plant via BDC of MS31.
    Using this code i can get only single plant...
    If i want to get multiple plants from an internal table,how i can change this code?
    Since it is a recording i cant put this code in LOOP..ENDLOOP.
    Suggest any method for doing this....
    Awaiting for ur reply...

    Hi,
    While recording also record the scroll down button.
    The you can place different plant in the BDC using loop and endloop
    Regards
    Arun

  • How to get Multiple records from functions

    Hi Everyone
    Im new to this stuff. Im trying  through JCO. As far as the single recordsets like data of customer or article are concerned i get it through an array.
    But i wanted to retrieve
    1- Whole tables like (all articles)
    2- Selected articles. or Customer order details (articles in PO)
    That means multiple records in one go.
    Later on ill display it in JTables.
    Like for the past three days i was googling around. Thought like this ones not for my stomach. Came across this Forum. Thought its worth posting a request.
    Here is the code
    public String[] KSearch(String Knr) throws Exception{
                            String[] Result=new String[11];
                            IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
                            if (ftemplate == null)
                                    throw new Exception("Funktionstemplate nicht gefunden");
                            JCO.Function function = ftemplate.getFunction();
                            JCO.ParameterList input = function.getImportParameterList();
                            input.setValue(Knr,"FieldName");
                       JCO.Client client = JCO.getClient(Con.conPoolId);
                       client.execute(function);
                       JCO.ParameterList output = function.getExportParameterList();
                       Result[0]=output.getString("NAME");
                       Result[1]=output.getString("VORNAME");
                       Result[2]=output.getString("GDATE");
                       Result[3]=output.getString("TELEFON");
                       Result[4]=output.getString("MAIL");
                       Result[5]=output.getString("STRASSE");
                       Result[6]=output.getString("PLZ");
                       Result[7]=output.getString("ORT");
                       Result[8]=output.getString("KONTO");
                       Result[9]=output.getString("INSTITUT");
                       Result[10]=output.getString("BLZ");
                                                                                    JCO.releaseClient(client);
                       return Result;
    now instead of a single record what if im expecting a number of records, like what if i need customer over 25. Which means more than one. I have to get in tabular format so that i can display it in JTables.
    Hope it a bit illustrative.
    Regards
    Edited by: Aaron Maleck on Jan 5, 2008 7:35 AM

    public String[] KSearch(String Knr) throws Exception{
    String[] Result=new String11;
    IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
    if (ftemplate == null)
    throw new Exception("Funktionstemplate nicht gefunden");
    JCO.Function function = ftemplate.getFunction();
    JCO.ParameterList input = function.getImportParameterList();
    input.setValue(Knr,"FieldName");
    JCO.Client client = JCO.getClient(Con.conPoolId);
    client.execute(function);
    // Maybe here you should use a JCO.Table Class to get the //ExportParameters such as
    JCO.Table output = function.getTableParameterList().getTable( "tabelname" );
    // so you can use setRow() Function to get the information of the //relevant record. such as the 3. Costum
    output.setRow(3);// Record Number
    Result[0]=output.getString("NAME");
    Result[1]=output.getString("VORNAME");
    Result[2]=output.getString("GDATE");
    Result[3]=output.getString("TELEFON");
    Result[4]=output.getString("MAIL");
    Result[5]=output.getString("STRASSE");
    Result[6]=output.getString("PLZ");
    Result[7]=output.getString("ORT");
    Result[8]=output.getString("KONTO");
    Result[9]=output.getString("INSTITUT");
    Result10=output.getString("BLZ");
    JCO.releaseClient(client);
    return Result;
    &#65321;am not sure that works. But you can try it. and reply me to tell if it really works as i think.
    Hope helps.
    Amao

  • How to get all records using Invoke-webrequest?/Why Invoke-webrequest returns only first 2000 Records?

    invoke-webrequest content returning only 2000 records though it has around 4000 records in web api.
    The same url if I give in excel oData Data feed I am getting all the records.
    See the below script
    Script:
    $QueryResult= (Invoke-WebRequest -Uri $ODataURI -UseDefaultCredentials)
    [xml]$xmlResult=$QueryResult.content
    foreach($obj in $xmlResult.feed.entry.content.properties)
    $Name=$obj.Name;
    $IsAvail=$obj.isAvail.'#text';
    $PGroup=$obj.PGroup
    I am exporting the above result as a CSV file and my CSV file contains only 2000 records. 
    But,  $xmlResult.feed.Count --> it Shows 4000 Records.
    The same Odata url if I give in excel oData Data feed I am getting all the 4000 records.
    So Please help me how can I get all the records using power shell.
    Thanks
    A Pathfinder..
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi Jo Swa(K.P.Elayaraja)-MCP,
    Would you please also post code which is used to export the records?
    In addition, to use the cmdlet invoke-RestMethod to work on ODate feeds, please refer to this article:
    Interacting with TechEd NA 2012 Schedule using PowerShell v3
    I hope this helps.

  • How to create multiple records using ADF

    Currently working on my first ADF BC and UIX project, and I basically want to create multiple records after a user makes a choice on the screen. I would like to know at what layer should this functionality be implemented?
    Would this be more at the Struts/Controller level, where I have a java class to perform the creation as part of a data action? I ask because, I am not sure if this is feasible at the ADF BC level (View objects and Entity Objects) via some sort of customization, and i am new to the different possibilies avail as part of the ADF framework
    Regards
    Anora
    (Jdeveloper 10.1.2.1 build 1913, Oracle DB 10.1.2)

    I'd put it into the application module. You then can call the method from the controller layer or from an other application module. This way you put it into the business logic, which helps if you ever decide to use a different client approach (like swing).

  • Data merging: how to get multiple records in single text frame?

    Hi
    I'm experimenting with data merging in InDesign CS3. The biggest stumbling block I've come across is trying to get my records to flow as continuous text in a single text frame (which would, ideally, autoflow onto new pages in the document). The records vary considerably in length, and so I can't just create a standard text frame to repeat on the page.
    Perhaps data merging isn't the best way of doing this and I should be learning to script instead. I feel like I'm just one step away, though.
    Any suggestions would be appreciated.

    OK, new scenario now:
    Is it possible to set a text box to auto-resize to fit the content that comes in during the data merge?
    I have placed one of my data fields in a text box with a stroke and fill, and placed this as an anchored object in the main text box with the other fields. The problem is that the length of text in this field varies considerably, and I'd like the text to fit snugly within its box. Ideally this text box would not appear at all if the field is blank for a particular record.
    I hope I've explained all of that clearly enough. Any ideas?

  • How to get next record using next  button

    my database is very large and i awnt to display results 1 page at a time by keeping next button.so when i click next i should get next record.
    help me out

    Re-direct this post under relevant Developer Tools Forums.
    http://forums.oracle.com/forums/category.jspa?categoryID=19
    Regards,
    Sabdar Syed.

  • How to get error's field name when execute sql error

    I want to get the error's field name when execute sql error,but SQLException is not provide corresponding function to get it.
    How can I do for it?

    user523110,
    I believe the "unique constraint" error message displays the name of the constraint, not the column name, as you have posted.
    As far as I know, the only way to extract the column(s) would be to query the data dictionary using the constraint name provided in the error message.
    Also, as far as I know, there is nothing in the JDBC API that can return the names of the columns associated with a given unique constraint.
    Good Luck,
    Avi.

  • How to get multiple records by using group by caluse

    Description of table:
    I have one table Exposureid(primary key),Name,Address,City,State,County,Zip,Occupation .
    Description of Query Result that I want:
    I wanrt all exposureid which has duplicate Address+City+State+Zip+County+Occupation as a single record
    (those exposures that has same address and occupation )

    The GROUP BY clause will give you a list of unique addresses. Adding HAVING COUNT(*) > 1 will give you all addresses that are used more than once.
    A sub-select can then be used to determine which unique rows have these duplicates, e.g.
    select
    from table t1
    where (t1.col1, t2.col2, t3.col3) in
    ( select
    t2.col1, t2.col2, t2.col3
    from table t2
    group by
    t2.col1, t2.col2, t2.col3
    having count(*) > 1

  • How to get multiple records in one row and different column

    Hi All,
    I am using oracle database 11g
    and i have a two tables table_1, table_2
    table_1 having columns
    emp_no
    first_name
    middle_name
    last_name
    email
    and table_2 having columns
    emp_no
    phone_type
    phone_number
    and having entires
    emp_no phone_type phone_number
    1001 MOB 9451421452
    1001 WEMG 235153654
    1001 EMG 652341536
    1002 MOB 9987526312
    1003 WEMG 5332621456
    1004 EMG 59612356
    Now i want the output of values with phone type as MOB or WEMG in a single row with different columns
    emp_no first_name middle_name last_name email mobile officeno
    1001 mark null k [email protected] 9451421452 235153654
    1002 john cena gary [email protected] 9987526312 null
    1003 dany null craig [email protected] null 5332621456
    1004 donald finn sian [email protected] null null
    can i have any inputs to achive this???
    Regards
    $sid

    Frank Kulash wrote:
    sonething like this:Frank, you missed aggregate function (pivot requires one). However main thing is it will cause ORA-01748:
    with table_1 as (
                     select 1001 emp_no,'mark' first_name,null middle_name,'k'last_name,'[email protected]' email from dual union all
                     select 1002,'john','cena','gary','[email protected]' from dual union all
                     select 1003,'dany',null,'craig','[email protected] null' from dual union all
                     select 1004,'donald','finn','sian','[email protected]' from dual
         table_2 as (
                     select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
                     select 1001,'WEMG',235153654 from dual union all
                     select 1001,'EMG',652341536 from dual union all
                     select 1002,'MOB',9987526312 from dual union all
                     select 1003,'WEMG',5332621456 from dual union all
                     select 1004,'EMG',59612356 from dual
    SELECT     *
    FROM     table_1      t1
    JOIN     table_2      t2  ON  t1.emp_no = t2.emp_no
    PIVOT     (    max(t2.phone_number)
         FOR  t2.phone_type  IN  ( 'MOB'   AS mob
                                 , 'WEMG'  AS wemg
            FOR  t2.phone_type  IN  ( 'MOB'   AS mob
    ERROR at line 19:
    ORA-01748: only simple column names allowed hereYou need to:
    with table_1 as (
                     select 1001 emp_no,'mark' first_name,null middle_name,'k' last_name,'[email protected]' email from dual union all
                     select 1002,'john','cena','gary','[email protected]' from dual union all
                     select 1003,'dany',null,'craig','[email protected] null' from dual union all
                     select 1004,'donald','finn','sian','[email protected]' from dual
         table_2 as (
                     select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
                     select 1001,'WEMG',235153654 from dual union all
                     select 1001,'EMG',652341536 from dual union all
                     select 1002,'MOB',9987526312 from dual union all
                     select 1003,'WEMG',5332621456 from dual union all
                     select 1004,'EMG',59612356 from dual
         table_3 as (
                     select  t1.emp_no,first_name,middle_name,last_name,email,
                             phone_type,phone_number
                       FROM     table_1      t1
                       LEFT JOIN     table_2      t2  ON  t1.emp_no = t2.emp_no
    SELECT     *
    FROM     table_3
    PIVOT     (    max(phone_number)
         FOR  phone_type  IN  ( 'MOB'   AS mob
                                 , 'WEMG'  AS wemg
        EMP_NO FIRST_ MIDD LAST_ EMAIL                     MOB       WEMG
          1004 donald finn sian  [email protected]
          1003 dany        craig [email protected] null            5332621456
          1001 mark        k     [email protected]      9451421452  235153654
          1002 john   cena gary  [email protected]    9987526312
    SQL>SY.

  • How to update multiple records using for loop

    Hi I want to update a particular column of few rows in database i had written followin code after that few lines of code and calling action from the task which having commit return ,still it's not updating particular colum.I had debug the code loop is running fine but still changes are not reflecting to database.Let me know if there is any prob with following code snippet.
    RealEstatePropertyUnitDetailsVOImpl realEstatePropertyUnitDetailsVO = RealEstatePropertyUnitDetailsVOImpl)realEstateService.getRealEstatePropertyUnitDetailsVO();
    for(Row row : realEstatePropertyUnitDetailsVO.getAllRowsInRange())
    if("N".equalsIgnoreCase((String)row.getAttribute("RlstdSellYn"))
    || "false".equalsIgnoreCase((String)row.getAttribute("RlstdSellYn")))
    row.setAttribute("RlstdAvlblYn", "Y" );
    System.out.println("RlsthId "+row.getAttribute("RlstdRlsthId"));
    System.out.println("AvlbYN "+row.getAttribute("RlstdAvlblYn"));
    System.out.println("RlstdUnitId "+row.getAttribute("RlstdUnitId"));
    }

    Vishwesh,
    I'd start with something along the lines of ...
        RowSet vo = (RowSet)getRealEstatePropertyUnitDetailsVO();
        vo.reset();
        while (vo.hasNext())
          Row row = vo.next();
          row.setAttribute("Attribute", value);
        }getAllRowsInRange() may exclude some rows outside the "range". Also, the vo.reset is needed since your View Object currency may not be at the beginning of your RowSet.
    Hope that helps.
    Will

Maybe you are looking for

  • Error while running a trusted application in OC4J

    I have created a trusted application to access the CDB and I can directly run this application in the Embedded OC4J and get the right result. The login code is : public ManagersFactory loginCDB(){ FdkCredential credential = new S2SFdkCredential( "orc

  • Output is successfully triggered even after setting SY-SUBRC = 4 in Routine

    Hi All, My requirement is to set the processing status for a output type  [which generates an IDoc]  as Error for the transaction VT02n in case the Shipment Satisfies a particular condition. In order to implement the requirement ,I have created a req

  • I cannot manage my airport express.

    Recently upgraded to a new 2013 iMac on 10.8.3.  I tried to change some setting on my 1st Gen Airport Express and can no longer access the settings.  It will not show up in Apple's Airport Utility.  I still have the original software disc provided by

  • TS1702 after changing apple id, do all apps have to be re-installed under new id

    After changing both my apple id and icloud id (to one and the same), I am unable to instal upgrades to previously installed apps - as my old apple id comes up and I am unable to change/delete it.  I would appreciate any help and/or suggestions. Thank

  • Adobe files not updated in Windows 7

    This is an ongoing source of irritation ... when working on Indesign, Photoshop files, and I save changes, the new date isn't saved, the file always retains the original date. This is a pain since I usually search for the most recent files first. Any