PUT QUERY RESULT ON ONE ROW INSTEAD OF MULTIPLE ONE

Hi
I have two tables with the column id_table1 to join them.
My first table "table_one" contain 3 fields and one record.
id_table1 : 1
table1 : project1
date_project : 2005/08/01
My second table "table_two" contain 3 fileds and 3 records which contain the id 1 on the join column.
id_table2 : 1
table2 : pdf
id_table1 : 1
id_table2 : 2
table2 : excel
id_table1 : 1
id_table2 : 3
table2 : text
id_table1 : 1
If i did a simply join, the result is appear in 3 lines:
1 project1 2005/08/01 excel
1 project1 2005/08/01 pdf
1 project1 2005/08/01 text
Is this possible to have this result in one query :
1 project1 2005/08/01 excel pdf text
I mean to have the result in one row and a separated column for each item of the table2.
We know how to do it with one column concatened ("excel pdf text") but not with separated column
("excel" "pdf" "text")
Thanks if someone has a solution.
Alexandre

SQL> select e.job, d.dname from emp e, dept d where e.deptno = d.deptno;
JOB       DNAME
CLERK     RESEARCH
SALESMAN  SALES
SALESMAN  SALES
MANAGER   RESEARCH
SALESMAN  SALES
MANAGER   SALES
MANAGER   ACCOUNTING
ANALYST   RESEARCH
PRESIDENT ACCOUNTING
SALESMAN  SALES
CLERK     RESEARCH
CLERK     SALES
ANALYST   RESEARCH
CLERK     ACCOUNTING
14 rows selected.
SQL> select e.job,
  2  max(decode(d.dname,'RESEARCH',d.dname,null)) "Research",
  3  max(decode(d.dname,'SALES',d.dname, null)) "Sales",
  4  max(decode(d.dname,'ACCOUNTING',d.dname,null)) "Accounting"
  5  from emp e, dept d where e.deptno = d.deptno
  6  group by job
  7  /
JOB       Research       Sales          Accounting
ANALYST   RESEARCH
CLERK     RESEARCH       SALES          ACCOUNTING
MANAGER   RESEARCH       SALES          ACCOUNTING
PRESIDENT                               ACCOUNTING
SALESMAN                 SALESRgds.

Similar Messages

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Put query result in cells like

    hi how do you
    Put query result in cells like
    Table:
    ROWS AND COLUMNS in cells / grids.
    just like an excel sheet but in html result?
    thanks

    this is the tutorial code.
    where do i put the code here to make the cells/record like?
    thanks!
    <cfquery name="Myqueryname"
    datasource="#Request.MainDSN#">
    SELECT
    CompanyID,
    CompanyName,
    Address,
    City,
    State,
    ZipCode,
    Comments
    FROM
    Company
    ORDER BY
    CompanyName ASC
    </cfquery>
    <html>
    <head>
    <title>CF TUTORIALS</title>
    <link rel="stylesheet" href="styles.css">
    </head>
    <body>
    <h1>All CO Listings</h1>
    <table>
    <tr>
    <td><b>ID</b></td>
    <td><b>Name</b></td>
    <td><b>Address</b></td>
    <td><b>City</b></td>
    <td><b>State</b></td>
    <td><b>ZIP Code</b></td>
    <td> </td>
    </tr>
    <cfoutput query="Myqueryname">
    <tr>
    <td>#CompanyID#</td>
    <td>#CompanyName#</td>
    <td>#Address#</td>
    <td>#City#</td>
    <td>#State#</td>
    <td>#ZipCode#</td>
    <td>
    <a href=" ALL Emps.cfm?CompanyID=#CompanyID#">ALL
    Emps</a>
    <a href=" AddCO Form.cfm">AddCO</a>
    <a href="
    Editco.cfm?CompanyID=#CompanyID#">Editco</a>
    <a
    href="CoDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
    </td>
    </tr>
    </cfoutput>
    </table>
    </body>
    </html>

  • Query Results: Retrieve All Rows?

    I was looking for a feature that will allow me to choose to return "all records" to the Query Results window. The current behavior is to fetch 50 records at a time (e.g. fetch 50 records as you scroll through the results = s-l-o-w). What I'd like to do is "Retrieve All Rows" then use to the scroll bar to "smoothly" scroll to the last record. For example, the 8.0.6 version of Query Builder had this functionality and in SQL Developer 3.0, if I right-click on the results. I can choose to "Count Rows...", seems like this would be a perfect place to put a "Retrieve All Rows" option.

    Hi,
    My advice: do something only if there is a business case for it; satisfying your curiosity can get surprisingly expensive.
    You have already read about using Run Statement to execute a SQL statement, then Ctrl-End to auto-scroll to the end. You can try the same for Run Script, but first you will probably need to increase the value of Tools|Preferences|Database|Worksheet|Max rows to print in a script. Of course, taking either of these approaches slows things down due to displaying output and scrolling. Same with SQL*Plus. And, as mentioned previously, Java memory management in SQL Developer can cause slow downs and hangs if the result set is large enough.
    Here is a way to minimize that delay, avoid hangs, and get a more repeatable result:
    1) Save some query to, say, C:\Temp\AllCustomers.sql. For example, "select * from customers;" or "select id from customers;".
    2) Run it from a SQL Developer worksheet using Run Script (F5), or from the SQL*Plus command line, with a script like this:
    set timing on
    set termout off
    spool C:\Temp\AllCustomers.lst
    @C:\Temp\AllCustomers.sql
    spool offEven then you will see that the timing results will vary. Maybe "select *" runs much slower than "select id" because the logical output lines are long and get wrapped into multiple physical output lines in the file. Minimize that by setting linesize to a longer value (but only in SQL*Plus -- it isn't supported in SQL Developer) and repeat the test to see. Maybe SQL*Plus runs it much faster than SQL Developer because one is a command line environment and the other a GUI tool with more overhead. Or maybe the SQL Developer JVM is near its size limit and lots of Java garbage collection is slowing it down. Simple question, complicated answer.
    Regards,
    Gary
    SQL Developer Team
    P.S.: And if by chance you are using a version of SQL Developer so old it does not include the output time in the query result tab's toolbar, using Run Script with set timing on is your only recourse.
    Edited by: gggraham on Oct 27, 2011 4:54 PM

  • Multiple BI Query Results into one Table

    Hi All
    Can I embed Multiple queries into one table using VC?
    I have data in different BI sources(Info Areas) like sales and distribution,Shipments etc. Can I write any universal query to retrive data from multiple sources?(If any???)

    Hi Jan Pasha,
    My model contains two BW queries which uses UNION and sent result to one table.
    I tried using UNION also but when I use it I am able to see no records to select in result table.
    I donot have any coloums in common. Is it pre-requisite for using UNION?

  • Result in same row instead of two rows

    I have to select same field on two different condition ie.
    select
    (case when data_type_id = 1 then hrscycles else 0 end) totalhours
    ,(case when data_type_id = 10 then hrscycles else 0 end) totalcycles
    from mytable
    Problem is query is returning 2 rows whereas i want result in single row.Is there any other solution?

    select (case when data_type_id = 1 then hrscycles else 0 end) totalhours,
    (case when data_type_id = 10 then hrscycles else 0 end) totalcycles
    from mytableyour query in the above will return two columns and will return multiple rows depending on the data your table have.
    maybe you want single column?
      select (case when data_type_id = 1 then hrscycles
                   else 0
              end) attribute1
        from mytable
      union all
      select (case when data_type_id = 10 then hrscycles
                   else 0
              end) attribute1
      from mytableor if you want a multiple rows into a single column:
    SQL> select * from pivot_tab;
          COL1 COL2
             1 a
             1 b
             1 c
             2 h
             2 h
    SQL> select p.col1,
      2         substr(max(substr(sys_connect_by_path (p.col2,','),2)),1,60)
      3         as col2
      4    from (select col1,
      5                 col2,
      6                 row_number() over (partition by col1 order by col1, col2) rn
      7            from pivot_tab) p
      8  start with p.rn = 1
      9  connect by p.rn = prior p.rn + 1
    10  and prior p.col1 = p.col1
    11  group by col1;
          COL1 COL2
             1 a,b,c
             2 h,h
    SQL>

  • How to - extract query result set in CSV and make multiple files if result set is huge.

    I have a query which returns millions of rows. I need to extract those rows in CSV files. Having said that i want to keep these files under a limit of 500 MB . Result set can be distributed among multiples files but each file can not be > 500 MB in size.
    How to achieve this?

    You may use this standard! procedure from Blushadow and produce something useful for your need. https://community.oracle.com/message/6499123#6499123

  • SQL query result shoes value ids instead of value names

    Hi All,
    Pleaes i need help.
    When selecting top 1000 result from a table, it give me a lot of result taht are useful for me. But one column named "subcategory", it give me the Subcategory ID instead of Subcategory NAme
    The Subcategory Information are taken from another column that belong to another table (sometimes from another DB) 
    I would like to substitue (or somethink similar) the subcategory ID's with Subcagtegory names.
    here details:
    Date
    Category Name (CATEGORY)
    Subcategory ID (ITEM ID)
    Date
    Name of Table 1   belonging to Another DB 1 in Altro DB 
    Item ID, that is   present in  a Column of Table 1 
    Date
    Name of Table 4   belonging to Another DB 1 in Altro DB 
    Item ID, that is   present in  a Column of Table 4
    Date
    Name of Table 1   Belonging to Another DB 1 in Altro DB 
    Item ID, that is   present in  a Column of Table 1 
    Date
    Name of Table 2   Belonging to Another DB 1 in Altro DB 
    Item ID, that is   present in  a Column of Table 2
     Can you help me please?
    thanks

    I think what you need is a simple join
    ie like below
    SELECT t.[Date],t.CATEGORY,s.SUBCATEGORYNAME,.. other columns
    FROM YourTable t
    INNER JOIN AltroDB.dbo.SUbCategoryTable s
    ON s.IDField = t.ITEMID
    IDField is field corresponding to ITEMID value in subcategory table.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • UTL_SMTP to send all the query result in one mail

    Hello All,
    I have a procedure for Oracle User Password Expiry Notification via mail using UTL_SMTP
    Also, I have created a table (email_address) to store the email addresses
    TableName: EMAIL_ADDRESS (username, email)
    USERNAME
    EMAIL
    HR
    [email protected]
    SH
    [email protected]
    SAMPLE
    [email protected]
    TEST
    [email protected]
    My PL/SQL
    declare
    crlf VARCHAR2(2)  := chr(13)||chr(10);
    CURSOR c1 IS SELECT
    e.alternate_name,e.email,e.cc,u.expiry_date, round(u.expiry_date-sysdate) as date_diff
    FROM dba_users u, email_address e
    WHERE u.username=e.username;
    username VARCHAR2(50);
    email VARCHAR2(250);
    expire_date varchar2(50);
    date_diff  varchar2(50);
    sender VARCHAR2(40) := '[email protected]';
    message VARCHAR2(200);
    mailhost VARCHAR2(30) := 'x.x.x.x'; 
    mail_conn UTL_SMTP.connection;
    BEGIN
    message:=' user will expire in '; 
    OPEN c1;
    LOOP
    FETCH c1 INTO username,email,expire_date,date_diff;
    EXIT WHEN c1%NOTFOUND; 
    mail_conn := UTL_SMTP.open_connection(mailhost, 25);
    UTL_SMTP.helo(mail_conn, mailhost);
    UTL_SMTP.mail(mail_conn, sender);
    UTL_SMTP.rcpt(mail_conn, email);
    UTL_SMTP.data(mail_conn, 'To: ' || email || crlf || 'Subject: ' || '[Test Mail]: Oracle User Password Expiry Reminder(user: '|| username ||')' || crlf || 'Password of ' || username||message||' '||date_diff||'days'||' (Expiry Date: ' || expire_date ||');
    UTL_SMTP.quit(mail_conn);
    END LOOP;
    CLOSE c1;
    END;
    But when I execute the above PL/SQL, I am getting 4 different mails having each user password expiry information.
    But I want all the user password expiry information in one mail.
    Is it possible??

    declare
    crlf VARCHAR2(2)  := chr(13)||chr(10);
    CURSOR c1 IS SELECT 
    e.alternate_name,e.email,e.cc,u.expiry_date, round(u.expiry_date-sysdate) as date_diff 
    FROM dba_users u, email_address e 
    WHERE u.username=e.username;
    username VARCHAR2(50); 
    email VARCHAR2(250);
    expire_date varchar2(50);
    date_diff  varchar2(50);
    sender VARCHAR2(40) := '[email protected]';  
    message VARCHAR2(200);
    final_message varchar2(1000);
    mailhost VARCHAR2(30) := 'x.x.x.x';  
    mail_conn UTL_SMTP.connection; 
    BEGIN 
    message:=' user will expire in ';  
    OPEN c1; 
    LOOP 
    FETCH c1 INTO username,email,expire_date,date_diff; 
    EXIT WHEN c1%NOTFOUND;  
       final_message := final_message || 'user: '|| username ||')' || crlf || 'Password of ' || username||message||' '||date_diff||'days'||' (Expiry Date: ' || expire_date || '): ';
    END LOOP; 
    CLOSE c1;
    mail_conn := UTL_SMTP.open_connection(mailhost, 25); 
    UTL_SMTP.helo(mail_conn, mailhost);
    UTL_SMTP.mail(mail_conn, sender); 
    UTL_SMTP.rcpt(mail_conn, email);
    UTL_SMTP.DATA(mail_conn, 'To: ' || email || crlf || 'Subject: ' || '[Test Mail]: Oracle User Password Expiry Reminder('||final_message||')';
    UTL_SMTP.quit(mail_conn);
    END;

  • Query result area on the first row instead of last row

    Hi BI experts,
    I want to display the result of  the BI query at the first row instead of last row.Could somebody help me how to accomplish this.
    I tried with the layout->move result area but could not be possible.
    I need your kind suggetion.
    Thanks.

    hi jyuoti,
    Further, open your query in query designer, look at the query property,  under the tab "rows/columns"
    change the result position of rows to "Below", you can see the preview there itself.
    This should solve your problem.
    Best Regards,
    *Assign points if you find the answer useful.

  • Odac 12.1 Oracle.VsDevTools Cannot edit query results

    I am running Windows 7 64-bit and Visual Studio 2010
    I installed ODTwithODAC121010 successfully.
    In Visual Studios Help>About it shows: Oracle Developer Tools for Visual Studio 12.1.0.1.0
    Issue:
    After updating to odac 12.1 I can no longer edit/insert data into the query builder results pane.
    I have relied on this capability in previous versions of odac.
    Has this feature been removed?
    I've connected to multiple Oracle 11g dbs with same results below:
    I get the following response when I attempt to edit a field in the query results pane:
    No row was updated.
    The data in row 10 was not committed.
    Error Source: .
    Error Message: Unable to parse expression.
    Correct the errors and retry or press ESC to cancel the change(s).
    I get the following response when I paste a new row in the query results pane:
    No row was updated.
    The data in row 11 was not committed.
    Error Source: Oracle.VsDevTools.10.0.
    Error Message: Object reference not set to an instance of an object.
    Correct the errors and retry or press ESC to cancel the change(s).
    Is there something I need to do to enable this?
    What are some good alternatives if this capability is no longer supported?

    Hi George Pertea,
    Thanks for the reply.
    I am in the edit query mode and also the query tool bar is enabled.
    But my "view sql" button is disabled,I cannot click on it.
    I am logged in as "Admin" , so what is the problem.
    I was able to do that in XI R2 before.
    Please help me!
    Thanks

  • How to pass query result to HTML table?

    Hi,
      i want to get the query result in HTMl table instead of Display Grid. how to do it? i searched in help, it suggests use icommand to do this. but i dont know how to pass the select query result to HTML table.. please help me.
    -senthil

    Hi Senthil,
    You can create an icommand query. You can then use the icommand retrieval methods to capture and manipulate the query data.
    (http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/iCom
    mand_Reference.htm)
    Basically what we did was, use the getColumnCount() and getRowCount() methods, once you have these two numbers you can set two for loops and use String getValue(int ColID, int RowID) , within the for loops you can generate the inner html content and write the values either in a html table or html form (which is what we did). This seems to work well, I'm still playing around with it and may post this approach on sdn by end of this week.
    Mahwish

  • How can I get Numbers to return the first row in a group of VLOOKUP query results instead of last one?

    I'm trying to query from one table (call it Table1) a batch of rows in another table (Table2) using VLOOKUP on a date specified in the first table (Table1). My problem is it's returning the last incident in Table2 of the requested date instead of the first incident. This really breaks the OFFSET scheme I'd like to use to collect the rest of the items for that date. Is there some way to compel VLOOKUP to return the first row of query results, not the last?
    NOTE: I see I've asked this before, but forgot to go back and look at responses given. It's been a while and I've limped along until now with the way things were. I'm actually trying to delete this questions, so if you see it, ignore it. I suppose if someone can tell me real quick how to delete a stupid question, that might be helpful.

    you cannot delete a post yourself.  You can flag the post an request a moderator remove.

  • Iterate query result - put specific rows in a collection and do output

    JDeveloper 11.1.1.3.0
    Oracle Lite: 10.2.0.1.0
    Browser: IE 7
    Hi,
    please help me in working on following requirement:
    1. Iterate the View Object Query Result
    2. Do some calculation on the Rows, lets say:
    Concatination of column1 and column2 and place it in a non database Attribute "column3"
    3. How to handle/place the non database attribute?
    4. Fetch specific rows from the query result; there should be a comparison, like checking master and detail hierachy struktur:
    Take Column1_ID (Master) check in columns2_ID (Detail), when found detail take this Row and place it in a buffer (Maybe ArrayList, or something like that)
    5. Show the Chace(ArrayList) to user, in a form of View Object, with standard functions like sorting and filtering
    Till now my process of solving the above requiremnts are:
    To Point 1:
    Created a service method in Application Implementation Class
       public void iterateEmp(){
         EmployeesVOImpl vo = getEmployeesVO1();
         while (vo.hasNext()){
          EmployeesVORowImpl row = (EmployeesVORowImpl)vo.next();
          System.out.println(row.getEmployeeId() + " | " + row.getFirstName() + " | " + row.getLastName() + " | " +  row.getEmail());   
          //row.setCalcCol(row.getFirstName() + "," + row.getLastName());
         }To point 2:
    Added an attribute to the View Object, with updateable and Queryable options. Place it on the JSPX Page.
    With setter method, filled with values, for example (non Database Attributes Name is CalcCol):
    Name:
    //see above code
    row.setCalcCol(row.getFirstName() + "," + row.getLastName());When doing so, on initial Call the values will be representated, but when sorting o filtering will be done, the values then will be erased.
    3. Added an Attribute in View Object "Attributes Panel".
    Here the XML Code of the View Object:
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EmployeesVO"
      Version="11.1.1.56.60"
      BindingStyle="OracleName"
      CustomQuery="true"
      ComponentClass="model.EmployeesVOImpl"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="model.EmployeesVORowImpl">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <SQLQuery>
        <![CDATA[select employee_id, first_name, last_name, email from employees]]>
      </SQLQuery>
      <ViewAttribute
        Name="EmployeeId"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="6"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="EMPLOYEE_ID"
        Expression="EMPLOYEE_ID"
        SQLType="NUMERIC">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="22"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="FirstName"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="FIRST_NAME"
        Expression="FIRST_NAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="LastName"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="25"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="LAST_NAME"
        Expression="LAST_NAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="25"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Email"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="25"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="EMAIL"
        Expression="EMAIL"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="25"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="CalcCol"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR"/>
      <AttrArray Name="KeyAttributes">
        <Item Value="EmployeeId"/>
      </AttrArray>
    </ViewObject>To Point 4:
    There should be a specific sort order, which i have to code in ADF.
    Just to give an overview:
    Colum1 and Column2 (nothing to do with the emp table) have relationship. Several hierachies are existing in the Query Result.
    For identifying the start point of any of these hierachies, i have to iterate through the Query Result and fetch these start point
    and buffer it in an array or something like that.So in the end i have to get the same query Result but with different Sort Order.
    How to buffer theses Rows (Array?) and show in a View Object?
    Can we use the same view Object for solving that, or should we use another View Object which catches the new Result Set?
    To Point 5:
    The Result should be, as mentioned above, a View Object including new Result Set, which can provide standard behavior (sort, filter)
    I hope the requirement is defined clearly enough, so maybe you can make some suggestions on that.
    Thank you for replies.
    Edited by: user9198377 on 13.07.2011 02:52

    Hi.. You can do this without DB View. Have CalcCol transient attribute in VO. Instead of iterating VO rows and setting CalcCol attr, generate View Row Impl class. Inside getCalcCol(), write your logic. This will be called during each and every request so that transient attr data won't become null during sorting and filtering. If your VO is entity driven, do the same in Entity impl class
    Raghu
    Edited by: Raguraman on Sep 5, 2011 9:48 AM

  • Displaying SQL Query results in rows instead of Columns

    Hi,
    I'm fairly new to Oracle so forgive me if this is a really stupid question.
    I used Mysql for a while and if I wanted to display query results in rows instead of columns I could end the SQL command with '\G' instead of a semicolon.
    This would give me output like...
    Column_1: AAAA
    Column_2: BBBB
    Column_3: CCCC
    Instead of the normal
    Column_1 Column_2 Column_3
    AAAAAA BBBBBBB CCCCCCC
    Is there an equivalent in SQLPlus to the MySQL \G termination?
    Thanks.
    John

    > so forgive me if this is a really stupid question.
    It is certainly not a stupid question, but pivoting is a very frequently asked and answered question:
    [url http://forums.oracle.com/forums/search.jspa?threadID=&q=pivot&objID=f75&dateRange=all&userID=&numResults=15]http://forums.oracle.com/forums/search.jspa?threadID=&q=pivot&objID=f75&dateRange=all&userID=&numResults=15
    In 11g you have special PIVOT and UNPIVOT functions.
    Regards,
    Rob.

Maybe you are looking for

  • Sony HVR-HD1000E capture setting in FCP 6.0.6

    One of my clients has a Sony HVR-HD1000E mini-dv camera & contacted me when they were having trouble capturing video. The camera captures at HDV 1080i50, so set FCP to this but says it cannot communicate with the camera. If I set FCP to DVCPRO HD-108

  • Domain constraint not being generated

    Hello, I have a case where a logical model was reverse engineered from a database, along with the constraints. Now domains have been created to represent those constraints and the columns on the entities have been updated to reflect these domains, an

  • Upgrading to v.7

    I want to download iTunes v.7 , but I got some questions. I know that there are 3 key files to backup v.6 library and settings : 1. my documents\my music\iTunes\iTunes library.itl 2. X:\Documents and Settings\username\Application Data\Apple Computer\

  • I cannot paste pictures into the body of an email whether on Gmail or AOL. It is very frustrating. Can you help?

    I cannot paste pictures from a website or a document into the body of an email. I use Gmail and AOL and cannot insert pictures. No problem on my old PC, just my MacBookPro. Using MountainLion. Any instructions to solve my problem?

  • Book on oraclebi spreadsheet add-in

    Does anyone know if there's any commercial book (not manual, readme, online help) specifically covering the add-in? djoni