LIKE operator in multiple-row subqueries

Hello,
in a test i saw 2 questions:
Which operator can be used with a multiple-row subquery?
A. =
B. LIKE
C. BETWEEN
D. NOT IN
E. IS
F. <>
Answer: D
and
Which two statements about subqueries are true? (Choose two.)
A. A single row subquery can retrieve data from only one table.
B. A SQL query statement cannot display data from table B that is referred to in its
subquery, unless table B is included in the main query's FROM clause.
C. A SQL query statement can display data from table B that is referred to in its subquery,
without including table B in its own FROM clause.
D A single row subquery can retrieve data from more than one table.
E. A single row subquery cannot be used in a condition where the LIKE operator is used for
comparison.
F. A multiple-row subquery cannot be used in a condition where the LIKE operator is used for
comparison.
Answer: B & D
But in the last question, why F is not correct? because the 1st question says that only NOT IN can be used in multiple-row subqueries. I'm confused
Thanks

only two, but what principle applies if not specified? First two correct?
however, in explanation i saw something like this (regarding to the 2nd question)
Incorrect Answers
A: A single row sub-query can retrieve data from more than one table.
C: A SQL query statement cannot display data from table B that is referred to in its subquery,
unless table B is included in the main query's FROM clause.
E: A single row sub-query can be used in a condition where the LIKE operator is used for
comparison.
F: A multiple-row sub-query can be used in a condition where the LIKE operator is used for
comparison.
so, at F: can be used or nor? they aren't so clear. only which operators can be used in multiple-row subquery?

Similar Messages

  • Query on  Multiple-Row subqueries

    Multiple-row subqueries:
    -->"They should not be used with the NOT IN operator in the main query if NULL is likely to be part of the result of the subquery "
    -->"They can be used to retrieve multiple rows from a single table only"
    But i checked the following example
    select a.n1
    from t1 a
    where a.n1 not in (Select *
                 from t2 b)Where t2 contains null values
    And query is giving no error
    So the second option is correct i feel.
    Could you suggest me
    Edited by: josh1612 on Mar 7, 2010 10:38 PM

    -->"They should not be used with the NOT IN operator in the main query if NULL is likely to be part of the result of the subquery "Here is a simple example, there is no value in T2 for the column No as 1 but still you dont get any row. That is because NULL means UNKNOWN. You cant use it in comparison.
    create table t1(no integer)
    create table t2(no integer)
    insert into t1 values(1)
    insert into t2 values (null)
    insert into t2 values (2)
    select *
      from t1
    where t1.no not in (select no from t2)
    /Now delete the null value and try
    delete from t2 where no is null
    select *
      from t1
    where t1.no not in (select no from t2)
    /

  • Multiple-row subqueries

    "Multiple-row subqueries should not be used with the NOT IN operator in the main query if NULL is likely to be a part of the result of the subquery"----Is this statement correct?

    gOMzY wrote:
    And i am sure that this is also correct:
    Multiple-row subqueries use the < ALL operator to imply less than the maximum - - - - - - - - - Correct?It would depend on the sub-query. This IN query:
    SQL> with t as (
      2     select 1 id, 'ABC' type from dual union all
      3     select 2, 'DEF' from dual union all
      4     select 3, 'GHI' from dual union all
      5     select 4, 'JKL' from dual),
      6  t1 as (
      7     select 'ABC' col1 from dual union all
      8     select 'JKL' from dual)
      9  SELECT * FROM t
    10  WHERE type IN (SELECT col1 FROM t1);
            ID TYP
             1 ABC
             4 JKLis exactly equivalent to:
    SQL> with t as (
      2     select 1 id, 'ABC' type from dual union all
      3     select 2, 'DEF' from dual union all
      4     select 3, 'GHI' from dual union all
      5     select 4, 'JKL' from dual),
      6  t1 as (
      7     select 'ABC' col1 from dual union all
      8     select 'JKL' from dual)
      9  SELECT * FROM t
    10  WHERE type = ANY (SELECT col1 FROM t1);
            ID TYP
             1 ABC
             4 JKLThere is no < ALL either implied or explicit required by definition.
    John

  • Multiple Row JCheckBox

    By default, JCheckBoxes are set up to take one row of text. In our Swing UI, the screen width is limited (no horizontal scroll bar) and we would like to put multiple rows of text in a single JCheckBox - similar to a JTextArea. What is the best way to do this?
    Thanks,
    Jamie

    Hi.
    Just write a multi-line renderer (ListCellRenderer) for the combobox and set it using setRenderer.
    Here an example code from a table, should be no problem to make a list cell renderer out of it...
    package MyFrstJava.components.layout;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    * Provides a simple cell Editor which can show multiple lines using a
    * JTextArea. However the row height must be set to show the whole text
    * by the user itself.
    class MultiLineTableCellRenderer extends JTextArea implements TableCellRenderer {
    /** the empty border, if not has the focus */
    protected final static Border emptyBorder = BorderFactory.createEmptyBorder(1,2,1,2);
    /** the border set during cell has focus */
    protected final static Border focusBorder = UIManager.getBorder("Table.focusCellHighlightBorder");
    * Constructor initializes the text area
    public MultiLineTableCellRenderer() {
    setLineWrap(true);
    setWrapStyleWord(true);
    setOpaque(true);
    * From TableCellRenderer
    * Depending on the params, the properties of the textarea are set
    * and the text area (this) will be returned
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    if (isSelected) {
    setForeground(table.getSelectionForeground());
    setBackground(table.getSelectionBackground());
    } else {
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    setFont(table.getFont());
    if (hasFocus) {
    setBorder(focusBorder);
    if (table.isCellEditable(row, column)) {
    setForeground( UIManager.getColor("Table.focusCellForeground") );
    setBackground( UIManager.getColor("Table.focusCellBackground") );
    } else {
    setBorder(emptyBorder);
    setText((value == null) ? "" : value.toString());
    return this;
    Hope this helps

  • How insert multiple rows in oracle version 8.1

    Hi All,
    I have table date_rng in which i have cloumns date_mnth and date_yr and like to insert multiple rows such (01,2011),
    (02,2011),(03,2011) etc using single insert statement.And i am using oracle 8.1 version so i do not have option of insert all into .please help me..
    Thanks
    Srini

    YOu can use this format
    insert into <table> select <column_value> from dual union all select <column_value> from dual union all ....

  • Selecting multiple rows in a block

    In a multi record block, I would like to select multiple rows by double clicking on them. The backgroung color of all the selected rows should change to Blue.
    If I change the color using set_item_property, the color of all the rows change. If I set using set_block_property, it changes only for the current row. when I go to the next record, the color is set back to normal. Using set_record_property on the status of the record can be set.
    Can someone help me to achieve this?
    Thanks in advance

    I answered this in your other, duplicate, post.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Multiple row subquery with like operator

    can any1 give me an example where we can use a multiple row subquery with the like operator.I read it can be used but when i tried it gives the following error
    select * from gagan_emp where ename like (select ename from gagan_emp where deptno=10)
    ERROR at line 1:
    ORA-01427: single-row subquery returns more than one row

    The right part of 'LIKE' is permitted only single value expression
    (including subquery that returns single value),
    is not permitted multiple values.
    -- Examples (but.... not so good)
    select * from gagan_emp e0
    where exists
    (select ename from gagan_emp e1 where deptno=10
    and e0.ename like e1.ename)
    select * from gagan_emp e0
    where exists
    (select ename from gagan_emp e1 where deptno=10
    and e0.ename = e1.ename)
    select * from gagan_emp e0
    where ename = any
    (select ename from gagan_emp e1 where deptno=10)
    select * from gagan_emp
    where ename like
    (select ename from gagan_emp e1 where deptno=10 and rownum=1)
    ;

  • Problems with multiple row operations in a dataTable

    Dear fellows,
    I have a strange problem, i want to do multiple row deletion in a dataTable. Can any one tell me a better way to do it. Because the way i am doing it, it is causing me strange problems. In some places it start working and in some it dont.
    The way i am doing it, it has the following code:
    <h:form>
    <h:dataTable id="list" value="#{availableRoomsList}"  var="RoomTypes" >
    <h:column>
         <f:facet name="header">
                 <h:outputText value="Select"/>
           </f:facet>
                 <h:selectBooleanCheckbox value="#{roomSelection[RoomTypes]}" >
                   </h:selectBooleanCheckbox>
    </h:column>
    <h:column>
         <f:facet name="header">
              <h:outputText value="Available Date"/>
         </f:facet>
         <h:outputText value="#{RoomTypes.availableDate}"/>
    </h:column>
    <h:column>
         <f:facet name="header">
              <h:outputText value="Available Rooms"/>
         </f:facet>
         <h:outputText value="#{RoomTypes.noOfRooms}"/>
    </h:column>
    </h:dataTable>
    <h:commandButton value="delete Selected Rooms" action="#{RoomResvAction.deleteRooms}" />
    </h:form>Now the back end code that i am using is as follows:
         private List<HotelRoomTypes> availableRoomsList;
          Map<HotelRoomTypes, Boolean> roomSelection = new HashMap<HotelRoomTypes, Boolean>();
             public String deleteRoom(){
                  System.out.println("In the delete selection method aad.");
                  try{
                       for (HotelRoomTypes item: availableRoomsList) {
                          Boolean selected = roomSelection.get(item);
                          if (selected!=null && selected) {
                               roomSelection.put(item, false);
                               //deleteRoom(item);
                  }catch(Exception e){
                       //e.printStackTrace();
                  return null;
             }The problem with the JSF code is when i click the command button it do not calls the associated action method with it. i dont know what is the problem with the code.
    And as far as the backend code is concern it should work fine.
    can anybody help me on this matter.

    thanks BalusC ,
    I will see this example and let you know, thanx for the help.
    but also please try and see my code and tell me what is wrong in it. because at some places it works and at some it simply dont . dont know why?
    well once again thanx for the help

  • Query for Multiple Rows as XML

    Ok I've seen this topic in the forums, but have failed to get this to work within my process. Basically I have a process that has a user fill out a form, and upon submittal the form writes it's information to a database (via a data connection within the form that invokes a separate process upon submittal.), once this is done the main process is invoked and it's first step is to query that same database and bring back the data in a lower (now exposed) portion of the form that contains certain fields that track the issue history. The query brings back the xml document and I store it in an xml variable (xml_output). I then take this information and use the Set Value object to assign the returned nodes values to the location fields in the form. This works if the query returns only one row. But once the form is moved beyond the initial Task Assignment, (first user), and query returns more than just one row, the added nodes to not show up on the form, i.e I still just get information about the first row in my form. From what I've read the form should be able to recognize the xpath expression, and bring back all the nodes, by in a sense using instance manager to create an instance for each node on the form. My question is how can I get this to work. Jasmin if your still out there... Help!
    Also We're using Adobe LiveCycle ES 8.0
    created the process using Workbench
    the form was reader enabled and saved as a dynamic PDF.
    Thanks
    Mike

    Ok have done the binding of the schema to the form, and I'm getting the information to flow as it's supposed to.  The problem I'm having now, (I know I'm having a bunch.) is that once I've placed the form into my process, and I use the set value operation to pre-fill information I get the form to flow, but the rest of the information that was previously filled in is blank.  So I have checked the variable and nothing wrong there.  It appears the problem is how I'm using the set value operation.  If I don't use the set value operation, the form retains it's information.  And if I use the set value by trying to set the subform value, the form retains it's information, but no pre-fill.  I'm going to try to be a little more detailed here.  The xml that is returned looks like this:
            0016-03-30
            Mike
            Public Works
            alone in the dark
            Type sleep
            -1
            Council
            FYI
            Important
    Flowed and positioned are actual subforms on the form that have their properties set as their names indicates.  The entire path is /form1/Page1/flowed/positioned .  The way I was able to get the form to flow correctly upon the injection of this xml data, was to bind the subforms in the form in this manner, positioned[*].  Designer didn't place the [*] for me so I had to do this myself.  But once I previewed the document, the form pre-populated and created the necessary number of subforms and placed information into the fields correctly.
    Now on the process side, I have created an xfaform variable that stores the form (bound to xsd.)  information, and another xml variable that stores the query return that looks like the xml listed above (has an xsd associated with it for navigating xpath).  My first operation performs the query (JDBC- Query Multiple Rows as XML) and stores it into the xml variable.  The next step of the process is the Set Value operation which is supposed to inject the xml data retrieved from the query into the form.  Initially I tried the an xpath similar to the following:
    /process_data/object/data/form1/page1/flowed/positioned = /xml_data/flowed/positioned.
    No dice.  On this one the form retains the information filled out by the user (didn't explain this earlier, the form is filled out first, and upon submittal the process starts.), but doesn't pre-populate the bottom part of the form.  Next I tried the following xpath:
    /process_data/object/data/form1/page1/flowed = /xml_data/flowed/positioned.
    This time it retained the form information which was filed in by the user, but the bottom part is becomes hidden!  Didn't understand this.  But I started to kinda think that I had to navigate he xpath in order to correctly inject the xml into the form.  That being said my next attempt was:
    /process_data/object/data/form1/page1 = /xml_data
    My thinking was that if on location, I stop at page1, the xml in the variable will allow it to navigate correctly through the form.  Well it worked, but too well.  The top part of the form is blank, but the bottom portion is pre-populated correctly.  Now I'm stuck.  Not sure how to get the rest of the information in the form.  I thought about creating variables form each of the fields and then re-populating them after the injection of xml, but that didn't seem practical.  I'm almost positive it's something I'm not doing correctly with xpath.  Anyway, thanks for all your help on this.
    Mike

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • How do I insert multiple rows from a single form ...

    How do I insert multiple rows from a single form?
    This form is organised by a table. (just as in an excel format)
    I have 20 items on a form each row item has five field
    +++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
    +Product| qty In | Qty Out | Balance | Date +
    +------------------------------------------------------------------------+
    +Item1 | textbox1 | textbox2 | textbox3 | date +
    + |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
    +------------------------------------------------------------------------+
    +Item 2 | textbox1 | textbox2 | textbox4 | date +
    + |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
    +------------------------------------------------------------------------+
    + Item3 | textbox1 | textbox2 | textbox3 | date +
    +------------------------------------------------------------------------+
    + contd | | | +
    +------------------------------------------------------------------------+
    + item20| | | | +
    +------------------------------------------------------------------------+
    + + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Database Structure
    +++++++++++++++++
    + Stock_tabe +
    +---------------+
    + refid +
    +---------------+
    + item +
    +---------------+
    + Qty In +
    +---------------+
    + Qty Out +
    +---------------+
    + Balance +
    +---------------+
    + Date +
    +++++++++++++++++
    Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
    Please anyone help me out, on how to get this concept started.

    Hello,
    I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
    Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
    Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
    I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
    Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
    In your code view, the Custom Trigger will look something like this:
    function Trigger_Custom(&$tNG) {
    if($tNG->getColumnValue("Item_1")) {
    $item1 = $tNG->getColumnValue("Item_1");
    $textbox1_1 = $tNG->getColumnValue("Textbox_1");
    $textbox1_2 = $tNG->getColumnValue("Textbox_2");
    $textbox1_3 = $tNG->getColumnValue("Textbox_3");
    $date1 = $tNG->getColumnValue("Textbox_3");
    $queryAdd = "INSERT INTO Stock_table
    (item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
    $result = mysql_query($queryAdd) or die(mysql_error());
    This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
    $tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
    // Add columns
    $customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
    There will be one for each field you created with the Custom Form Wizard.
    Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
    Hope this helps.
    Shane

  • Merging multiple rows in to a single row (when rows meet merging criteria)

    Hi 
    I have a scenario to merge multiple rows in to a single rows when the data in those rows fall in merge criteria .Below is how my data is 
    Now the merging logic for the above rows is , we need to combine multiple rows in to a single row when the data in those rows permits us to do in that way. Simply saying , its like sandwich where we combine multiple things to a single piece.The output for
    the above rows should be
    Here  we combined Row 1 ,2, 3 in to a single row as the data in those rows permits to merge in to single row. But the row 4 cannot be combined to any of those rows because the data in those rows doesn't permits us do a merge ( As the value of the column
    JobSource for the row 4 is different from the other rows ) .
    My original data has 56 columns , but for readability i kept only 9 columns. 
    can you please throw some idea on how to achieve this scenario. I know we need to use CTE for achieving this, but i am not able succeed in doing an iteration on multiple rows.
    Appreciate your response .

    Thanks for your reply .
    Rule for merging is simple . First of all there is no unique row identifier for each row , the fact table is not having an identity column in the database . I called row 1 , row 2  etc in my post above only to make better explanation of my scenario.
    The rule for merge is below. 
    1) we can combine only when the data in a column for one row is null & the data in same column for the other row is not null . It should also satisfy the condition where the data in other columns should conflict each other.
    2) Data for all columns for the merging rows should not be conflicting (i.e. we should not merge the rows when the data in a column is not equal to the same column in the other row
    ,considering not null value)
    Steps in merging the above source data :
    1) Consider the case of row 1 and row 2 in the source, we can combine these rows as the data is satisfying the rule 1 for columns (Jobsource,Flight, Package,Update,Iscancelled
    ,Result, Severity) and columns (JobID and RuleName ) fall under rule 2.  we merge these two rows in to a single row and keep in that in the table.
    2) Then the resulting row is again merged with the second row which is present above by applying the rule 1 and rule 2 . Below would be output of merge operation.
    Now there would be only two rows in the output . But these rows cannot be merged as the data doesn't satisfy the merge rules 2 . As Jobsource for the row 1 in the above output is "PresubmissionSource" which is not equal
    to "PostSubmission" jobSource which is in row 2. So these two rows are left unmerged .So the above two rows would be the output of merge operation on my source data.
    This process has to be repeated for all the rows in the table. As of now my table as 92 Million rows with 56 columns which need to be considered for merging rows. I replicated my scenario in 9 columns and 4 rows to understand better.

  • Delete multiple rows from table/list control

    Hi,
    I want to have a table control in which a user can enter different entries, like this:
    My program would read each entry at a time and do something.
    However, I would like to give the user ability to delete multiple entries at once, like in an Excel spreadsheet - that is, the user selects multiple rows and presses "Delete" key and those entries get deleted. The Labview table does not allow this it seems - I can only delete one entry at a time - or I have to right-click and select Data Operations->Cut Data, which is awkward.
    Is there a control better suited to what I want to do? I tried a Llist control, but it behaves in the same manner.
    Thanks in advance!
    Solved!
    Go to Solution.

    You could write your own routine.  Use an Event Structure with a Key Down event.  If the delete key was pressed and the table has focus delete the elements that are selected.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Displaying multiple rows in a form layout problem?

    HI,
    I displayed multiple rows using form layout,but form browse buttons displaying one row multiple times like if i click next it is displaying same rows in next page also ?
    how can I prevent this?
    very urgent
    Thanks in advance

    Set the table range size property to the number of rows you want to display.
    Then as a post-generation action, drag and drop the Next Set and Previous Set operations of your View Object usage as buttons onto your page.
    Then move the button code to a custom template, and uncheck group-level checkbox "Clear Page Definition before generation" to preserve the NextSet and PreviousSet action bindings.
    Steven Davelaar,
    JHeadstart Team.

  • Retrieve multiple row single column output as single string

    hii
    I have query like "select country_name from country_master where <condition>".
    This query results in multiple rows. I want those multiple rows as a string like "country1, country2, contry3".
    I know i can write a function/cursor to achieve that but want to know if we have a way to get that within the query itself.
    Thanks

    In 10g...
    SQL> select dname from dept;
    DNAME
    ACCOUNTING
    RESEARCH
    SALES
    OPERATIONS
    IT SUPPORT
    SQL> ed
    Wrote file afiedt.buf
      1  select ltrim(sys_connect_by_path(dname,','),',') as depts
      2  from (select dname, row_number() over (order by deptno) rn from dept)
      3  where connect_by_isleaf = 1
      4  connect by rn = prior rn + 1
      5* start with rn = 1
    SQL> /
    DEPTS
    ACCOUNTING,RESEARCH,SALES,OPERATIONS,IT SUPPORTIn 11g, you can use the LISTAGG analytical function.

Maybe you are looking for