Is it possible to insert a table value in query output?

Hi,
I am developing a query in which i have to display is a few values from a table in the output. I want to know if it is possible to directly get the values from the table thru the user exit and display in output or should i first put the values of the table into a infoprovider and get it from there in the query?
Regards,
Sujai

Hi Sujai,
You will have to put the values from the table into an infoProvider and then create a query on that infoProvider. Data from table cannot be directly shown in a query.
Hope that helps!
Regards,
Saurabh

Similar Messages

  • Insert into table values from 2 different tables

    Hi ,
    i have 2 tables as below ,
    table A
    ELITE                             FREQ_ITEM                    COMBINED_STR                    SUP   
    ;1;10;2;3;4;5;7;8             ;10;2;3;4;5;8;9                  ;1;2;3;4;5;7;8;9;10            1
    ;10;2;3;4;5;8;9               ;10;2;3;4;5;8;9                  ;2;3;4;5;8;9;10                  2table B
    FREQ_ITEM                   SUB                    ITEM_LEN                      
    ;1;10;2;3;4;5;7;8             2                    8
    ;10;2;3;4;5;8;9               2                    7
    ;10;2;3;4;5;8;9;1             1                    8i want to insert values in Table C as below ,
    insert into table C "ELITE","SUP" from Table A when "SUP" in table A >=2
    Else Select "FREQ_ITEM","SUB" from Table B when "A"."ELITE"="B"."FREQ_ITEM"
    The result should be like below ,
    ELITE                        SUP   
    ;10;2;3;4;5;8;9          2
    ;2;3;4;5;8;9;10        2any help please .
    Edited by: 876602 on 09/10/2011 04:24 ص

    It is not clear what are you trying to do. Based on expected results, something like:
      select  case
               when sup < 2 then elite
               else combined_str
              end elite,
              sub
        from  tableA a,
              tableB b
        where a.elite = b.freq_item
    ELITE                      SUB
    ;1;10;2;3;4;5;7;8            2
    ;2;3;4;5;8;9;10              2
    SQL> SY.

  • How to insert One table value to Another Table

    Hi friends
    Please have a look on this Code. Since i am new Java i am not able to findout the Solution for it
    private void displayavailablity(String selecteditem1)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        String bname,bauthor,bcategory,bref1,bavail,bid;
                        int bref,mid,num;
                        rs = st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                        while(rs.next())
                             bname = rs.getString("BName");                         
                             bauthor = rs.getString("BAuthorandPublisher");
                             bcategory = rs.getString("BCat");
                             bref = rs.getInt("BRef");
                             if(bref==1)bref1="Yes";
                             else bref1 = "No";
                             mid = rs.getInt("Mid");
                             if(mid==0)bavail="Available";
                             else bavail="Issued To:"+mid;
                             bid = rs.getString("BId");
                             System.out.println("Book Name is::"+bname);
                             System.out.println("Book Availabilty::"+bavail);
                             num = st.executeUpdate("insert into BSearch Values('"+bid+"','"+bname+"','"+bcategory+"','"+bauthor+"','"+bavail+"','"+bref1+",')");
                             System.out.println("Inseted in the table");
                        /**ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                        //table.setModel(model);
                        rs.close();
                        //st.close(); */
                   catch(SQLException ex)
         }I trigger this Method when a JComboBox Item is Selected.
    For an example when i select an Item the select Query brings all the Record Equals to the Selected item. Now i want to insert the Selected items with some Modification to Another Table.
    Now the Problem is My Program Inserts Only One Record (Though there are Many Records Equals to Selected Item)
    Please give me a Better Solution
    Thank you

    jolif,
    If you're "new to java" then might I suggest you leave swing until you're "not so new to java"... it involves so many "advanced concepts" (unlike VB) that it constitutes a biohazard... i.e. it's fundamentally inimical to humanoid lifeforms.
    Now... Having duly vented my spleen, try rs.updateRow();

  • SQL Server Multiple JOINS with Table Value Function - query never ends

    I have a query with 4 joins using a table value function to get the data and when I execute it the query never ends.
    Issue Details 
    - Table value function 
        CREATE FUNCTION [dbo].[GetIndicator] 
          @indicator varchar(50),
          @refDate datetime
    RETURNS 
    TABLE
    AS
    RETURN
    SELECT
    T1.Id ,T1.ColINT_1, T1.ColNVARCHAR_1 collate DATABASE_DEFAULT as ColNVARCHAR_1 ,T1.ColNVARCHAR_2 ,T1.ColSMALLDATETIME_1, T1.ColDECIMAL_1, T1.ColDECIMAL_1
    FROM TABLE2 T2
    JOIN TABLE3 T3
    ON T2.COLFKT3 = T3.Id
    AND T3.ReferenceDate = @RefDate
    AND T3.State != 'Deleted'
    JOIN TABLE4 T4
    ON T2.COLFKT4 = T4.Id AND T4.Name=@indicator
    JOIN TABLE1 T1
    ON T2.COLFKT1=T1.Id
    - Query
        DECLARE @RefDate datetime
    SET @RefDate = '30 April 2014 23:59:59'
    SELECT DISTINCT OTHERTABLE.Id As Id
    FROM 
    GetIndicator('ID#1_0#INDICATOR_X',@RefDate) AS OTHERTABLE
    JOIN GetIndicator('ID#1_0#INDICATOR_Y',@RefDate) AS YTABLE  
    ON OTHERTABLE.SomeId=YTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=YTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_Z',@RefDate) AS ZTABLE
    ON OTHERTABLE.SomeId=ZTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=ZTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_W',@RefDate) AS WTABLE 
    ON OTHERTABLE.SomeId=WTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=WTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_A',@RefDate) AS ATABLE  
    ON OTHERTABLE.SomeId=ATABLE.SomeId
    AND OTHERTABLE.DateOfEntry=ATABLE.DateOfEntry
    Other details:
    - SQL server version: 2008 R2
    - If I execute the table function code outside the query, with the same args, the execution time is less the 1s.
    - Each table function call return between 250 and 500 rows.

    Hi,
    Calling function in general is a costly query. And definitely joining with a function 5 times in not an efficient one.
    1. You can populate the results for all parameters in a CTE or table variable or temporary table and join (instead of funtion) for different parameters
    2. Looks like you want fetch the IDs falling to different indicators for the same @Refdate. You can try something like this
    WITH CTE
    AS
    SELECT
    T1.Id ,T1.ColINT_1, T1.ColNVARCHAR_1 collate DATABASE_DEFAULT as ColNVARCHAR_1 ,T1.ColNVARCHAR_2 ,T1.ColSMALLDATETIME_1, T1.ColDECIMAL_1, T1.ColDECIMAL_1, T4.Name
    FROM TABLE2 T2
    JOIN TABLE3 T3
    ON T2.COLFKT3 = T3.Id
    AND T3.ReferenceDate = @RefDate
    AND T3.State != 'Deleted'
    JOIN TABLE4 T4
    ON T2.COLFKT4 = T4.Id AND T4.Name=@indicator
    JOIN TABLE1 T1
    ON T2.COLFKT1=T1.Id
    SELECT * FROM CTE WHERE Name = 'ID#1_0#INDICATOR_X' AND Name = 'ID#1_0#INDICATOR_Y' AND Name = 'ID#1_0#INDICATOR_Z' AND Name = 'ID#1_0#INDICATOR_W' AND Name = 'ID#1_0#INDICATOR_A' AND ReferenceDate = @RefDate.
    Or you can even simplify more depends on your requirement.
    Regards,
    Brindha.

  • PL/SQL insert nested table value into another nested table.

    Hi Guy
    I've created a table with nested table in and inserted some values. note: this is just an example the real table has more values inserted.
    REATE OR REPLACE TYPE tt_hours AS OBJECT(hours INTEGER, data NUMBER);
    CREATE OR REPLACE TYPE tt_day AS VARRAY(7) OF tt_hours;
    CREATE TABLE old_table
    DAY DATE,
    VALUE_hours tt_day
    INSERT INTO old_table
    (day, value_hours)
    VALUES
    (TO_DATE('01/06/2012 22:00:34'),
    tt_DAY(
    tt_hours(1,0.025727),
    tt_hours(2,0.012047),
    tt_hours(3,0.012857),
    tt_hours(4,0.012107),
    tt_hours(5,0.012849),
    tt_hours(6,0.01215),
    tt_hours(7,0.0129)))
    I've also created another table with same structure but with no value inserted.
    REATE OR REPLACE TYPE yy_hours AS OBJECT(thours INTEGER, tdata NUMBER);
    CREATE OR REPLACE TYPE yy_day AS VARRAY(7) OF yy_hours;
    CREATE TABLE new_table ( tDAY DATE, VALUE_thours yy_day )
    I run a select from statement which workout the average of data from old table by group.
    SELECT to_char(DAY, 'Day'), hours, AVG(data)
    FROM old_table n, TABLE(n.value_hours) v
    GROUP BY to_char(DAY, 'Day'), hours;
    How do I insert the result in new_table's ?

    I believe I said
    >
    You basically need to construct the INSERT statement just like you did manually for the first table.
    >
    and instead you used
    INSERT INTO new_table a (tday, t.hours, t.DATA) TABLE(a.value_thours) t This is what you did manually for the first table. Do you see TABLE (...) in here anywhere?
    INSERT INTO old_table
    (day, value_hours)
    VALUES
    (TO_DATE('01/06/2012 22:00:34'),
    tt_DAY(
    tt_hours(1,0.025727),
    tt_hours(2,0.012047),
    tt_hours(3,0.012857),
    tt_hours(4,0.012107),
    tt_hours(5,0.012849),
    tt_hours(6,0.01215),
    tt_hours(7,0.0129)))NO YOU DON'T - you used a tt_DAY constructor for the outer nested table and multiple tt_hours constructors for the inner nested table.
    You need to do the same thing in your INSERT query.

  • Inserting into table whith select query...

    Hi All,
    I am having requirement where
    INSERT into employee_Temp (emp_id,emp_name,emp_email) (select emp_id,emp_name,emp_email from EMP where sal > 300) order by emp_name.
    Here EMP table has Toplink mapping to a java object.So I have constructed the select part of the query using ReportQuery.
    Can you help me in constructing the complete query so that employee_Temp will be populated in one shot.
    I am using Toplink Toplink9.0.3
    Thanks in Advance,
    Ashwin B

    TopLink does not currently support an InsertAllQuery, (10.1.3 added an UpdateAllQuery, and DeleteAllQuery will be supported in 11.1.1).
    You will need to use SQL for your query.

  • Hiding values in Query Output

    Hello,
    I've a web report in which I've embedded a query which has 3 exceptions. The data in columns are numbers 10, 20 or 30. The exceptions are defined like 1-10 as RED, 11-20 YELLOW, 21-30 GREEN. Now while displaying the result I just want to disply the colors not the values as 10, 20 or 30. So where should I hide this, at query level or at the web application level and how?
    Amit

    Hi Amit,
          You can hide the values at the Query level with the option Calculate Single Value as -> <b>Suppress Result</b>. You'll get the exception colors in the report.
    From Query Designer, Context menu of the Key Figure -> Properties -> <b>Calculate Single Value as</b> -> <b>Suppress Result</b>.
    If you want to hide the result also, you can set the option in Calculate Result As -> Suppress Result.
    Assign Points if this helps.
    Regards
    Hari
    Message was edited by: Hari Krishnan K
    Message was edited by: Hari Krishnan K

  • SSIS - Script Task creates a DTS var and using Foreach loop, Execute SQL needs to INSERT into table from this DTS var.

    I have a script task written in C# that creates an array of strings "arrayFields" after parsing a text file. It saves the array of strings in a DTS variable.
    Each row in array represents a row is comma separated and is a row that must be inserted into a table. For example,
    X and Z are fields in the table
    X1, X2,....Xn
    Z1,Z2,...Zn
    I am using a Foreach Loop  to grab each row and then  Execute SQL Task to take each row from the array and insert each field per row in a table,
    The SQL is something like,
    INSERT dbo.table values(field1, field2,...fieldn) arrayFields?
    What should this this INSERT look like?

    I guess you implemented
    Shredding a Recordset
    Based on what I understood (correct me if I am wrong) you have difficulties mapping the input parameters, if so here is the guide
    http://www.sqlis.com/sqlis/post/The-Execute-SQL-Task.aspx
    In short it might look like
    INSERT dbo.table  (ColumnA, ColumnB,...) VALUES (?,?...)
    The syntax for the T-SQL INSERT is http://technet.microsoft.com/en-us/library/dd776381%28v=sql.105%29.aspx
    Arthur
    MyBlog
    Twitter

  • Problem inserting into tables

    Hello All, I hope that someone out there may be able to shed some light on my problem!!
    I have developed a series of JSP pages for my web site (using Tomcat 4.1)to allow a Customer to register themselves with the site. I have developed 3 corresponding JavaBeans to hold the details that the customer enters; a Customer bean, an Address bean and a Payment bean. In my database (MySQL) i have tables corresponding to each of these beans, which simply take the data inserted into a field by the user and create a new instance of each.
    Now, the above is all working fine and the database tables populate themselves exactly as they should; however, to allow a customer to add more than one address, or more than one payment method, I have developed the relationship tables 'hasaddress' and 'haspaymentdetails' to store the relevant id numbers in the database (i.e. hasaddress stores a customerid from the customer bean and an addressid from the address bean).
    Finally, i get round to my question!!..
    I am using the following jsp code to insert data into one such table:
    <------------------------------------------------------------------->
    <jsp:useBean id="registration" class="projectBeans.RegistrationBean" scope="session"/>
    //set the connection
    registration.setConnection(c);
    //retrieve the customer attribute
    projectBeans.Customer customer = (projectBeans.Customer)session.getAttribute("newCust");
    //retrieve the address attribute
    projectBeans.AddressBean address = (projectBeans.AddressBean)session.getAttribute("newAddr");
    //use the addCustomer method in the bean to create a new customer     
    registration.addCustomer(customer);
    //ditto for address
    registration.addAddressDetails(address);
    //populate the hasaddress table with the correct ids
    String table = "hasaddress";
    int customerid = customer.getCustomerId();
    int addressid = address.getAddressId();
    registration.updateRelationship(table, customerid, addressid);Both the addCustomer and addAddressDetail methods work fine, so below is just the code for updateRelationship method in the registrationBean:
    public void updateRelationship(String table, int id1, int id2) throws SQLException
       sta = c.prepareStatement("INSERT INTO "+table +" VALUES(?,?)");
       sta.setInt(1, id1);
       sta.setInt(2, id2);
       sta.executeUpdate();
    }I would expect this method to retrieve the newly assigned customer and address ids and enter them into the hasaddress table; however, when the page compiles and i look at the table it enters 0 for each of the fields (when it should, for example be entering 14 and 16):
    ----------+
    | cid | aid |
    ----------+
    | 0 | 0 |
    ----------+
    so my question is: does anyone have an idea as to why this is happening, or what may be wrong with my code for this to occur?
    Alternatively, am i being dumb and is there some way of getting MySql to handle the updates to the relationship table internally?
    Thanks in advance for any ideas,
    Cheers

    Try to specify you database field as SQL need field names to do updating
    sta = c.prepareStatement("INSERT INTO "+table + "("+ id1+","+id2+ ")"+ VALUES(?,?)");

  • How to insert date with timestamp into table values

    hi,
    I have a table
    create table abc1(dob date);
    insert into abc1 values (to_date(sysdate,'RRRR/MM/DD HH24:MI:SS'))
    but when i see in data base it shows as normal date without time stamp.
    Is it possible to insert into back end with timestamp.
    Thanks..

    First, SYSDATE is a DATE already, no need to convert it to a DATE using the TO_DATE() function.
    The date ALWAYS has a time component, whether or not it is displayed is up to your NLS settings. for example:
    SQL> CREATE TABLE ABC1(DOB DATE);
    Table created.
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY';
    Session altered.
    SQL> INSERT INTO ABC1 VALUES(SYSDATE);
    1 row created.
    SQL> SELECT * FROM ABC1;
    DOB
    02/04/2010
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY HH24:MI:SS';
    Session altered.
    SQL> SELECT * FROM ABC1;
    DOB
    02/04/2010 12:54:57
    SQL> DROP TABLE ABC1;
    Table dropped.

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

  • Using column value is it possible to find the table name in the database?

    Hi all,
    using column value is it possible to find the table name in the database?
    guys i need the table value
    Note:
    oracle-9i
    for example:
    i don't know NIC(column value) in which table in the database.
    Thank you,
    with regards,
    JP.
    Edited by: Guest on Feb 27, 2012 5:42 AM

    Hi,
    As far as I understand what you are asking for I would suggest 4 data dictionaries that will help you to know the table name from the column names
    1. USER_TAB_COLS
    2. ALL_TAB_COLS
    3. DBA_TAB_COLS
    4. COLS
    These can give you detail information about the columns and respective tables at user, schema, dba level. Further information on the table can be found by querying ALL_OBJECTS table giving table_name as Object_name, or you can join the data dictionaries too.
    To know about various data dictionaries avalible in Oracle please query select * from cat;
    Let us know if you need further assistance.
    Twinkle

  • Compare String in a table and insert the common values into a New table

    Hi all,
    Anyone has idea on how to compare a string value in a table.
    I have a Students Table with Student_id and Student_Subject_list columns as below.
    create table Students( Student_id number,
    Student_Subject_list varchar2(2000)
    INSERT INTO Students VALUES (1,'Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History');
    INSERT INTO Students VALUES (2,'Math,Law,Business,Social,Language arts,History,Biotechnology,communication');
    INSERT INTO Students VALUES (3,'History,Spanish,French,Langage arts');
    INSERT INTO Students VALUES (4,'History,Maths,Science,Chemistry,English,Reading');
    INSERT INTO Students VALUES (5,'Math,Science,Arts,Music,Computer Programming,Language arts,History');
    INSERT INTO Students VALUES (6,'Finance,Stocks');
    output
    Student_id     Student_Subject_list
    1     Math,Science,Arts,Music,Computers,Law,Business,Social,Language arts,History
    2     Math,Law,Business,Social,Language arts,History,Biotechnology,communication
    3     History,Spanish,French,Langage arts
    4     History,Maths,Science,Chemistry,English,Reading
    5     Math,Science,Arts,Music,Computer Programming,Language arts,History
    6     Finance,Stocks
    I need help or some suggestion in write a query which can compare each row string value of Student_Subject_list columns and insert the
    common subjects into a new table(Matched_Subjects).The second table should have the below colums and data.
    create table Matched_Subjects(Student_id number,
    Matching_studesnt_id Number,
    Matched_Student_Subject varchar2(2000)
    INSERT INTO Matched_Subjects VALUES (1,2,'Math,Law,Business,Social,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (1,3,'History,Langage arts');
    INSERT INTO Matched_Subjects VALUES (1,4,'History,Maths,Science');
    INSERT INTO Matched_Subjects VALUES (1,5,'Math,Science,Arts,Music,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (2,3,'History,Langage arts');
    INSERT INTO Matched_Subjects VALUES (2,4,'History,Maths');
    INSERT INTO Matched_Subjects VALUES (2,5,'Math,Language arts,History');
    INSERT INTO Matched_Subjects VALUES (3,4,'History');
    INSERT INTO Matched_Subjects VALUES (3,5,'Language arts,History');
    INSERT INTO Matched_Subjects VALUES (4,5,'Math,Science');
    output:
    Student_id      Match_Student_id     Matched_Student_Subject
    1     2     Math,Law,Business,Social,Language arts,History
    1     3     History,Langage arts
    1     4     History,Maths,Science
    1     5     Math,Science,Arts,Music,Language arts,History
    2     3     History,Langage arts
    2     4     History,Maths
    2     5     Math,Language arts,History
    3     4     History
    3     5     Language arts,History
    4     5     Math,Science
    any help will be appreciated.
    Thanks.
    Edited by: user7988 on Sep 25, 2011 8:45 AM

    user7988 wrote:
    Is there an alternate approach to this without using xmlagg/xmlelement What Oracle version are you using? In 11.2 you can use LISTAGG:
    insert
      into Matched_Subjects
      with t as (
                 select  student_id,
                         column_value l,
                         regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
                   from  students,
                         table(
                               cast(
                                    multiset(
                                             select  level
                                               from  dual
                                               connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
                                    as sys.OdciNumberList
      select  t1.student_id,
              t2.student_id,
              listagg(t1.subject,',') within group(order by t1.l)
        from  t t1,
              t t2
        where t1.student_id < t2.student_id
          and t1.subject = t2.subject
        group by t1.student_id,
                 t2.student_id
    STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
             1                    2 Math,Law,Business,Social,Language arts,History
             1                    3 Language arts,History
             1                    4 Science,History
             1                    5 Math,Science,Arts,Music,Language arts,History
             2                    3 Language arts,History
             2                    4 History
             2                    5 Math,Language arts,History
             3                    4 History
             3                    5 History,Language arts
             4                    5 History,Science
    10 rows selected.
    SQL> Prior to 11.2 you can create your own string aggregation function STRAGG - there are plenty of example on this forum. Or use hierarchical query:
    insert
      into Matched_Subjects
      with t1 as (
                  select  student_id,
                          column_value l,
                          regexp_substr(student_subject_list,'[^,]+',1,column_value) subject
                    from  students,
                          table(
                                cast(
                                     multiset(
                                              select  level
                                                from  dual
                                                connect by level <= length(regexp_replace(student_subject_list || ',','[^,]'))
                                     as sys.OdciNumberList
           t2 as (
                  select  t1.student_id student_id1,
                          t2.student_id student_id2,
                          t1.subject,
                          row_number() over(partition by t1.student_id,t2.student_id order by t1.l) rn
                    from  t1,
                          t1 t2
                    where t1.student_id < t2.student_id
                      and t1.subject = t2.subject
      select  student_id1,
              student_id2,
              ltrim(sys_connect_by_path(subject,','),',') MATCHED_STUDENT_SUBJECT
        from  t2
        where connect_by_isleaf = 1
        start with rn = 1
        connect by student_id1 = prior student_id1
               and student_id2 = prior student_id2
               and rn = prior rn + 1
    STUDENT_ID MATCHING_STUDESNT_ID MATCHED_STUDENT_SUBJECT
             1                    2 Math,Law,Business,Social,Language arts,History
             1                    3 Language arts,History
             1                    4 Science,History
             1                    5 Math,Science,Arts,Music,Language arts,History
             2                    3 Language arts,History
             2                    4 History
             2                    5 Math,Language arts,History
             3                    4 History
             3                    5 History,Language arts
             4                    5 History,Science
    10 rows selected.SY.

  • Inserting a Flag value in to a table using Procedure

    Hi All-
    we are trying to write a procedure which can refresh Materialized views in the database and upon success full refresh it should insert a flag value say 'Y' or 'N' into a table can you guys give me your thoughts.

    Earlier, you said
    while i am trying to execute that one it is giving me an error.Multiple people have asked you to tell us what error you received. It is very difficult for us to guess the error that you're receiving and to then guess the solution. Perhaps you don't have permission to the DBMS_SNAPSHOT package, perhaps you mis-spelled the name of the materialized view, perhaps you don't own the materialized view, etc. If you tell us the error you're getting, it's far more likely that we're going to be able to help.
    Other than the fact that you're using the DBMS_SNAPSHOT package rather than the DBMS_MVIEW package, which I haven't seen done since the 8i days, I don't see anything obviously wrong with your implementation. As has been pointed out, the design is problematic-- it makes little sense to record in your own table less information than Oracle will record automatically in the data dictionary and to spend time writing additional code to do that lesser level of logging.
    Justin

  • Trying to insert values into a table inserts the wrong values

    Hi, I'm sure this is quite simple but I don't know why it is happened (Spent about 2 hours debugging my program only to find the error is actually in the SQL insert statement not working properly hehe)
    I have a simple Payment table with the following columns:
    int - ID (primary key)
    int - Amount
    int - Paid
    varchar - Notes
    I try to place a new record into the table as follows:
    insert into payment values (1010,50,1,'Hello')
    but the ID i choose is not added to the record, rather the database assigns a ID instead automatically (it seems to add 1 to the last ID)
    On further inspection this happens for another of my tables too, however for another table, this does not happen and I can assign an ID as I would like.
    When creating my tables I thought I set them all up the same, however I guess not
    Does anyone know the problem?
    Thanks

    Hi,
    Are you are using this INSERT statement in any form??? if so, please check your pre-insert trigger.
    If not, then you may verify it by inserting it through iSQLPlus. If it doesn't insert your data, then check the database triggers associated with INSERT for your table.
    Regards,
    Zaaf

Maybe you are looking for

  • Why won't my iPod touch turn on or charge?

    My iPod touch 4th Generation will not charge or turn on. I have tried to hold the power button and the home button for ten seconds to get it to turn on after I had it plugged into my macbook. iTunes does not recognize it. What do I do now?

  • ARD Access with enabled Firewall not possible

    I got a network and my clients are running mostly Mac OS X 10.5.8 Leopard. When the Firewall is on i am not able to connect with Apple Remote Desktop even though the Firewall automatically enables the ARD service. Does anyone know what to do? My 10.4

  • Dunning procedure in configuration:Define Parametrize External Transactions

    Hi There, We can assign a Dunning Procedure in configuration at "Define and Parametrize External Transactions". Path: Financial Accounting->Contract Accounts Receivables and Payables->Basic Functions-> Posting and Documents->Document->Maintain Docume

  • Multiple Languages in Same GUI

    There are several questions in this forum related to my question, but the answers are old or seem to be incorrect, but I am not sure. I am writing an application where the user is expected to have IME support for English and Russian. The application

  • RMAN-06466: error parsing configuration string (CONFIGURE DEVICE TYPE DISK

    Hi All Windows 2003 and 10.2.0.4 I get the following message when executing show all; connected to rman (I have used grid control 11g for the first configuration of rman. Not sure if it has an impact.) RMAN configuration parameters are: CONFIGURE RET