Insert single column

Hi all.
What is the sql statement for insert a single column to  the table?
Let say i gt a student table and a admino column.
Thank

u can never insert a single column.
atleast u should insert blanks to the other fields.
inserting a row is possible , inserting single column will not be a normalised table.
by the way u can update a single column.

Similar Messages

  • Inserting single column in crosstab

    Post Author: millercepbs
    CA Forum: WebIntelligence Reporting
    Does anyone know of a way to insert only a single column in a crosstab table? Every time I try to insert a column, I get a column added next to each existing column. The problem is, I can't delete a single column either, so I cant add and then delete the extras. I would like to add a single column for things like a sum for each row, but I don't want it next to each column.

    Post Author: Sujitha
    CA Forum: WebIntelligence Reporting
    Hi
    Did you find a solution.I guess it can only happen when u add a column beside the header and change the color Bg color same as the column value.I had the same problem but luckily I had to add just after the header.

  • Inserting single column in internal table

    Hiii,
    I have to insert data into a single column of a internal table from a field.The rest of the columns of the internal table are already filled.
    wats is the syntax for it?? plz reply soon...its very urgent.

    Hi,
    try this
    data idx type sy-tabix.
    loop at itab.
    itab-fld1 = 'some value'.    " your empty field
    modify itab index idx.
    endloop.
    Regards,
    V.Balaji
    Reward if Usefull...

  • Insert single column into oracle table

    i have a table t1 in whcih only one column is there
    Create table t1
    a number);now i need to load this column from a excel sheet.
    it have many rows and many column but need only corresponding column.
    please suggeest any way apart from external table and sql laoder.
    thanks

    No problem if you have thousands of rows.
    Say the value you want to insert is in column A of your excel file.
    In column B use the following formula:
    =CONCATENATE("insert into t1 values (";A1;");")And copy this formula to all other rows.
    Then select all the B column, copy it and paste it in a notepad file.
    Call the file as you want, for example c:\ins.sql
    open sqlplus and run
    SQL> @c:\ins.sqlAt the end don't forget to commit...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

  • Using sql load insert multiple fields data into a single column in database

    Hi ,
    I have my log file in sun OS box something like this
    =======
    (07/29/2009 00:02:24.467) 367518 (07/29/2009 00:02:26.214) 949384011
    (07/29/2009 00:02:26.236) 3675 (07/29/2009 00:02:28.207) 949395117
    (07/29/2009 00:02:28.240) 337710 (07/29/2009 00:02:30.621) 949400864
    =============
    I am trying to insert the data into oracle data base as follows.
    =============================
    column1 : (07/29/2009 00:02:24.467)
    column2 : 367518
    column3 : (07/29/2009 00:02:26.214)
    column4 : 949384011
    ===========================
    Can anyone help me with the control file format?
    someone suggested me the code below.
    ==========
    LOAD DATA
    INFILE 'D:\work\load.txt'
    INTO TABLE sample
    (col1 POSITION(02:24) char,
    col2 POSITION(27:32) INTEGER EXTERNAL,
    col3 POSITION(35:57) CHAR,
    col4 POSITION(60:68) INTEGER EXTERNAL
    ===========
    but this works only for the fixed length data? Please help

    user11744904 wrote:
    Hi ,
    I have my log file in sun OS box something like this
    =======
    (07/29/2009 00:02:24.467) 367518 (07/29/2009 00:02:26.214) 949384011
    (07/29/2009 00:02:26.236) 3675 (07/29/2009 00:02:28.207) 949395117
    (07/29/2009 00:02:28.240) 337710 (07/29/2009 00:02:30.621) 949400864
    =============
    I am trying to insert the data into oracle data base as follows.
    =============================
    column1 : (07/29/2009 00:02:24.467)
    column2 : 367518
    column3 : (07/29/2009 00:02:26.214)
    column4 : 949384011
    ===========================
    Can anyone help me with the control file format?
    someone suggested me the code below.
    ==========
    LOAD DATA
    INFILE 'D:\work\load.txt'
    INTO TABLE sample
    (col1 POSITION(02:24) char,
    col2 POSITION(27:32) INTEGER EXTERNAL,
    col3 POSITION(35:57) CHAR,
    col4 POSITION(60:68) INTEGER EXTERNAL
    ===========
    but this works only for the fixed length data? Please helpIs the requirement to load all data in a single column or multiple columns? The thread subject and body are conflicting.

  • How to insert from one table to another (multiple columns to single column)

    I want to insert data from table1 into table2 and the data looks in 3 columns as below
    Table1     
    RepNm ObjNm DbNm
    123     abc def
    456     def xyz
    789     123 456
    and the data in table2 should be display as
    Table 2
    ObjNm
    123
    456
    789
    abc
    def
    xyz
    the dupes should get eliminated and only the distinct values should be inserted into a single column in table2 from multiple columns in table1

    How do you want to handle nulls? If there is a null in any value of a column, do you want to insert it?
    Then,
    WITH T
         AS (SELECT LEVEL colnum
               FROM DUAL
             CONNECT BY LEVEL <= 3)
    SELECT DECODE (colnum,  1, RepNm,  2, ObjNm,  3, DbNm) as ObjNm
      FROM table1, T;if you dont want to insert nulls then,
    WITH T
         AS (SELECT LEVEL colnum
               FROM DUAL
             CONNECT BY LEVEL <= 3)
    SELECT DECODE (colnum,  1, RepNm,  2, ObjNm,  3, DbNm) AS ObjNm
      FROM table1, T
    WHERE DECODE (colnum,  1, RepNm,  2, ObjNm,  3, DbNm) = DECODE (colnum,  1, RepNm,  2, ObjNm,  3, DbNm)G.

  • Displaying Document Name With The Summary in a Single Column Using Document Library View.

    Hi All,
    I have a question that relates to SharePoint Document Library Views. I want to view the Documents name with the summary in a single column. Below image shows an example of it. I need this within a SharePoint Document Library. Also I want the height of the
    row to be increased more than the default height. I cannot figure it out how to do that? Could you someone help me to do this. I have inserted the Document Library as an App Part to the page. 
    So could you someone help me to solve this matter?
    Thanks and regards,
    Chiranthaka

    HI Chiranthaka,
    You can create DataView webpart using SPD and then modify the display template according to your need.
    http://deannaschneider.wordpress.com/2012/07/10/item-counts-dvwp-sp2010/
    Hope this will help to solve your problem.
    Best Regards,
    Brij K

  • Displaying Document Name & The Summary in a Single Column Using Document Library View

    Hi All,
    I have a question that relates to SharePoint Document Library Views. I want to view the Documents name with the summary in a single column. Below image shows an example of it. I need this within a SharePoint Document Library. Also I want the height of the row
    to be increased more than the default height. I cannot figure it out how to do that? Could you someone help me to do this. I have inserted the Document Library as an App Part to the page. 
    So could you someone help me to solve this matter?
    Thanks and regards,
    Chiranthaka

    HI Chiranthaka,
    You can create DataView webpart using SPD and then modify the display template according to your need.
    http://deannaschneider.wordpress.com/2012/07/10/item-counts-dvwp-sp2010/
    Hope this will help to solve your problem.
    Best Regards,
    Brij K

  • Excel source multiple column values to oledb destination single column in ssis 2012

    Excel sheet has 4 columns which is filled with data till 500 rows on each column. I want to insert those excel data into single column(PolicyIds) and am using oledb destination. In excel souce i dont hav any column header. Can anyone suggest me how can i do
    this effectively. (May be i can use script task to get range of data and use it as SQL variable). Is there any best approaches.
    Sample excel
    A          B             C             D
    1001     1005       1009        1013
    1002     1006       1010        1014
    1003     1007       1011        1015
    1004     1008       1012        1016

    Inside Excel Source, use Data Access Mode - SQL Command as below:
    select F1 from [Sheet1$] where F1 is not null
    union all
    select F2 from [Sheet1$] where F2 is not null
    union all
    select F3 from [Sheet1$] where F3 is not null
    union all
    select F4 from [Sheet1$] where F4 is not null
    -Vaibhav Chaudhari

  • Unique row based on two columns and single column

    Dear Members,
    I have a table which contains duplicate rows, for which a query should be able to fetch the unique row from the table. Here the unique is not based on one column, but it should be on two columns and also check for uniqueness on one column.
    create table addr ( firstname varchar2(10), lastname varchar2(10), area varchar2(3));
    insert into addr values('bob', 'james', '1');
    insert into addr values('bob', 'james', '1');
    insert into addr values('harry', 'bert', '1');
    insert into addr values('jimmy', 'bert', '1');
    insert into addr values('sam', 'mac', '1');
    insert into addr values('sam', 'knight', '1');
    insert into addr values('tom', 'sand', '1');
    insert into addr values('cat', 'mud', '1');
    The output of query should contain 3 rows.
    bob - james
    harry - bert or jimmy - bert [ either one of them, but not both ]
    sam - mac or sam - knight [ either one of them, but not both ]
    tom - sand
    cat - mud
    SELECT firstname, lastname as total from addr WHERE area = '1' GROUP by firstname,lastname; This does not take of single column duplication..
    Any suggestions..

    SQL> with t_data
    as
    select 'bob' as firstname, 'james' as lastname, '1' as area from dual union all
    select 'bob', 'james', '1' from dual union all
    select 'harry', 'bert', '1' from dual union all
    select 'jimmy', 'bert', '1' from dual union all
    select 'sam', 'mac', '1' from dual union all
    select 'sam', 'knight', '1' from dual union all
    select 'tom', 'sand', '1' from dual union all
    select 'cat', 'mud', '1' from dual
    SELECT
            firstname,
            lastname,
            area
    FROM
                    SELECT
                            t.*,
                            row_number() over(partition BY firstname order by 1) rn,
                            row_number() over(partition BY lastname order by 1) rn1
                    FROM
                            t_data t
    WHERE
            rn     = 1
    AND rn1 =1 ; 
    FIRSTNAME       LASTNAME        AREA
    bob             james           1
    cat             mud             1
    jimmy           bert            1
    sam             knight          1
    tom             sand            1
    SQL>

  • Convert rows to single column

    Hi All
    Need some assistance, i have a table where i want the output to be a single column
    ex: select from t1;*
    query output_
    rownum col_1
    1     8217
    2     6037
    3     5368
    4     5543
    5     5232
    i would like the result to be : *8217,6037,5368,5543,5232*
    thanks for your help in advance.
    i did look on the web but can't find a solution that is easily understood.

    Hi,
    855161 wrote:
    thanks for responding quickly.
    the link example seems not to work for me:
    below is the information you have requested:Below is some of what I requested. The CREATE TABLE and INSERT statements seem to be missing.
    1. duplicate values have no effect
    2. list doesn't need any order
    3. Version 10.2.0.5.0 For that, I recommend the user-defined aggregate function called STRING_AGG in the Oracle Base page, but called STRAGG by most of the people who use it. You have to copy and run about 60 lines of code from the Oracle Base page, or from AskTom one time, but once you have it installed, the job is as simple as
    SELECT  MIN (rnum)       AS rnum     -- ROWNUM isn't a good column name, since it's the same as a pseudo-column
    ,       STRAGG (count_1)  AS count_1_list
    FROM    table_x
    ;Hundreds of other jobs you have in the future will be just as easy, and you won't have to go through the installation process again.
    Relevant information:
    1. table columns : count_1
    all rows should become a single row with ',' in between
    example:
    select * from t1;
    output:
    Rownum count_1
    1 8217
    2 6037
    3 5368
    4 5543
    5 5232
    Desired results :
    Rownum count_1
    1 8217, 6037, 5368, 5543, 5232
    Edited by: 855161 on Dec 11, 2012 1:25 PMThe main problem with STRAGG is that it doesn't create a list in order. You said that's not an issue in this case, but if you ever do need output in order, then the best option in Oracle 10 is the SYS_CONNECT_BY_PATH technique. The main Oracle-Base page shows how to use SYS_CONNECT_BY_PATH in Oracle 9. Of course, that works in all later versions too, but in version 10 a simpler way, using CONNECT_BY_ISLEAF, became available. See the Oracle-Base Comments Page for the eaiser Oracle 10 technique.

  • Inserting a Column on a report

    How do I insert a column with fixed contents into a report? I currently have two columns on the report and I'm doing a Union so I need to insert a 3rd column with a fixed text based on the criteria. For example, the inserted column for the first section would say "AAAAAAA", the inserted column for the 2nd section would say "BBBBBBB", etc... How can this be done?

    Insert any column into your report and position it where you want your static text column to appear. Click the fx button to edit the column's formula and replace the entire column formula with your desired text enclosed in single quotes.
    'AAAAAAA'
    Mike L

  • Converting a single column table into a two-column table

    Hi everybody
    What I'm trying to do is convert a single column table into a two-column table. Here an example:
    Table A (single column):
    ID1
    ID2
    ID3
    ID4
    ID5
    Table B (two-column) should be:
    ID1 ID2
    ID3 ID4
    ID5
    I already did it by looping through a cursor and making an insert every 2 rows, but don't like performance.
    Is there an easier/faster way to do this?
    Thanks in advance
    Oscar

    with t as (
               select 'ID1' col1 from dual union all
               select 'ID2' from dual union all
               select 'ID3' from dual union all
               select 'ID4' from dual union all
               select 'ID5' from dual
              ) -- end of sample table
    select  col1,
            col2
      from  (
             select  col1,
                     lead(col1) over(order by col1) col2,
                     row_number() over(order by col1) rn
               from  t
      where mod(rn,2) = 1
    COL COL
    ID1 ID2
    ID3 ID4
    ID5
    SQL> SY.

  • SQL*Loader - How to combine Flat File 3 columns and put into one single column

    Receive a flat file delimited by comma. Want to combine Flat File last 3 columns and put into one single column(Table).
    e.g.
    Flat File
    100,239,30,20,30
    While inserting into table want to combine last 3 columns and insert into invoice number column.
    302030

    It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
    Vijay

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

Maybe you are looking for