inserting rows into a single column million

I saw 494020 table rows, and then I added a sr_no column, I want to insert the the number of (1 to 494020) in this column can tell everything. ?

How can insert using rownum.

UPDATE my_table SET column1 = ROWNUM;

Tags: Database

Similar Questions

  • How to insert data into a BLOB column using sql

    Hi all

    How to insert data into the BLOB column directly using sql.
    create  table temp
    (
      a blob,
      b clob);
    
    SQL> /
    Insert into temp  values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
                                      *
    ERROR at line 1:
    ORA-01465: invalid hex number
    
    Please help in this.
    Thank you
    Prakash P

    Insert into temporary values (UTL_RAW. CAST_TO_RAW ('32aasdasdsdasdasd4e32'), 'adsfbsdkjf');

  • How to insert data into the BLOB column

    Hi all

    Can someone help me to insert data in the BLOB data type column?

    The structure of the table is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    (
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER (15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER (15),
    DATE OF LAST_UPDATE_DATE,
    LAST_UPDATE_LOGIN NUMBER (15),
    RECORD_STATUS VARCHAR2 (1 BYTE),
    ERROR_MESSAGE VARCHAR2 (4000 BYTE),
    DATA_FILE BLOB
    )

    I want to insert data into the column DATA_FILE. and this insert statement inside a procedure.

    Please help me as soon as possible because it is very urgent for me

    Thank you and best regards,
    Charrier

    Charrier,

    If you form the string yourself, you can use the function utl_raw.cast_to_raw on your channel.

    http://download.Oracle.com/docs/CD/B12037_01/AppDev.101/b10802/u_raw.htm#997086

    sql> create table t(
      2    id number,
      3    l_blob blob
      4  );
    
    sql> insert into t values(1, utl_raw.cast_to_raw('SampleString'));
    
    1 row created.
    
    sql> commit;
    
    Commit complete.
    
  • Error when inserting rows into a table

    Hello

    We have recently migrated to 9i and 10g. We have a scheduled task on our database who first removes all rows from a table and then inserts them back by selecting the lines of 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when I try to insert rows in the table after you remove all of the lines, I am able to insert the data successfully. However, in 10g, when I try to do the same operation, it fails with error ORA:

    ORA-00001: unique constraint violated

    The same query that works perfectly in 9i fails in 10g

    If anyone has some ideas on how to solve the same, kindly let me know.

    Thanks in advance.

    CrazyAnie wrote:
    Okay, so now the only option that remains is that I have load the data into a local table and then perform the loading.

    May not be the only option, but the safest and cleanest I would say.

    CrazyAnie wrote:
    Also, it would be very kind of you that you might suggest all other possible risk areas where this CHARSET conversion could be a concern.

    I imagine that the main areas of concern will be you are interfacing directly with other databases through database links and using string functions. Otherwise, as long as the manipulation of data is in the same database 10g should not be a problem.

    CrazyAnie wrote:
    I made the migration of my source 9i DB, which is on Solaris to my 10g database which is on Linux and a separate server (which resides in a completely different location) uses exp and IMP. So if I try to export my schema after you change the CHARACTER set and then import it into the target DB, should that help me to get rid of this error? What is an option that can be done?

    I don't think it would be that simple change your database character set, check out this link for discussions about the same:

    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:5783936214008]

  • Divided into a single column

    Hello

    I need to split into single column in the format below:

    SELECT '6500,1100,3200,1233,9000' FROM DUAL;

    Result:

    6500

    1100

    3200

    1233

    9000

    For 11g and above:

    Select regexp_substr (6500, 1100, 3200, 1233, 9000', ' [^,] +', 1, level) suite

    of the double

    connect by level<= regexp_count('6500,1100,3200,1233,9000',="" ',')="" +="">

    For 10g:

    Select regexp_substr (6500, 1100, 3200, 1233, 9000', ' [^,] +', 1, level) suite

    of the double

    connect by level<= length="" (regexp_replace="" ('6500,1100,3200,1233,9000',="" '[^,]+'))="" +="">

    or (if there is no empty entries):

    Select regexp_substr (6500, 1100, 3200, 1233, 9000', ' [^,] +', 1, level) suite

    of the double

    connect regexp_substr (6500, 1100, 3200, 1233, 9000', ' [^,] +', 1, level) is not null

    RESULT
    6500
    1100
    3200
    1233
    9000

    5 selected lines.

  • Merge multiple columns into a single column?

    Hello

    I need to perform queries dynamically and the return values. I need to retrieve the values of the queries in a single column only by concatenating multiple columns. I can't use the PL/SQL in my scenario.
    is it possible to run a query and the result will be extracted in a single column (multiple column values must be concatenated)?

    Thank you
    Raja.
    SELECT rtrim(extract(xmltype(REPLACE(column_value,'
    

    Check this box... Copy it directly to this

    Ravi Kumar

  • Insert row into table 2D retaining the previous values

    Amendment of data entered in a 2D array and also displayed a table. When the time rolls 3 columns of data are held and then created line. Problem is the line moves downwards, but the previous data is not stored. I tried using shift register, but that only auto markings lines table to fill as the iteration of the loop. Looks like a basic really simple problem but going round in circles on this one there...

    In this case, the function 'Replace table subset' is what is needed to replace the last values in line with the current values of the user interface.

    On the evolution of the time, an addition occurs.

    An update of the VI is attached.

  • Convert the lines into a single column

    create table suresh
    (
    Identification number,
    ch char (1)
    )
    ;

    Insert in suresh values(1,'i');
    Insert in suresh values(1,'a');
    Insert in suresh values(1,'m');
    Insert in suresh values(1,'b');
    Insert in suresh values(1,'o');
    Insert in suresh values(1,'y');

    Select * from suresh

    ID ch
    1 I
    1 a
    1 m
    1 b
    1 o
    1 y


    I'm looking for output something like this

    ID ch
    1 iamboy
    ..
    select id,listagg(ch) within group(order by ch) as ch
    from suresh
    group by id 
    
  • Select multiple columns into a single column group

    SQL dear Experts,

    I have a question related to pl/sql.

    I do query below. Please advice in right way.

    Select phone, firstname, lastname code
    of the customer
    Code group

    Group, but in the meantime, firstname and lastname.

    Please advice

    Thank you
    Angelique

    Billy wrote:

    I have a question related to pl/sql.

    You posted the SQL code. Not PL/SQL code.

    I do query below. Please advice in right way.

    Select phone, firstname, lastname code
    of the customer
    Code group

    Group, but in the meantime, firstname and lastname.

    Of course, you will also need to group by firstname and lastname for this SQL query.

    With a Group of SQL, you have basically 2 types of values that can be returned:
    -the value of Group of
    -l' aggregated/calculated the value of this group

    If you could watch the first name and the last name by code:

    select
      code, MIN(firstname), MAX(lastname)
    from customer
    group by code
    

    You can see the number of unique name and surname by code:

    select
      code, COUNT(DISTINCT firstname), COUNT(DISTINCT lastname)
    from customer
    group by code
    

    Think of the clause group by in size (for example the code in the SQL above) and measures (calculations by code in the SQL above).

  • concatenate the strings from a column into a single row?

    How to concatenate strings from a column into a single line?

    Color
    ------
    Red
    Orange
    Blue
    Green

    And return a set of results as follows:

    Colors
    -------------------------
    Red, orange, blue, green

    Various ways can be found here:
    http://www.Oracle-base.com/articles/10G/StringAggregationTechniques.php

  • ORA-01461: can bind to a LONG value only for insert into a LONG column

    Hello

    Oracle XE on RHE dedicated server
    create table cvDetails(
    cd_id number(14) primary key,
    cv_id number(14) constraint education_fk references CvProperties(cv_id),
    nationality varchar2(230),
    objectives varchar2(3900),
    name varchar2(230),
    fatherName varchar2(230),
    motherName varchar2(230),
    dob varchar2(230),
    gender varchar2(230),
    mStatus varchar2(230),
    passportNo varchar2(110),
    email varchar2(230),
    phone varchar2(45),
    mobile varchar2(25),
    address varchar2(2500),
    state varchar2(230),
    zipCode varchar2(230),
    city varchar2(230),
    education clob,
    experience clob,
    skills clob,
    languages varchar2(1400),
    hobbies varchar2(3200),
    achievements varchar2(3900),
    references varchar2(3900)
    );
    
    create sequence cvDetails_seq
    start with 1 increment by 1;
    
    create or replace trigger cvDetails_trig
    before insert on cvDetails
    referencing new as new
    for each row
    begin 
    select cvDetails_seq.nextval into :new.cd_id from dual;
    end;
    /
    Why do I get the error of subject?

    Thank you in anticipation

    >
    in any case, I checked manually according to your instructions and found that this objective column is of character input more than specified.
    >
    Glad you found the problem, but I hope that you learned a lesson that is time consuming.

    It must be remembered that we have no access to your environment. If we do not know which servers, clients, tables and users that you use.
    It may seem simple to you but doesn't realize that you provide us with two slightly different versions of the cvDetails table.

    The original post had this
    >
    objectives varchar2 (3900).
    >
    But when you have provided your 'cvDetails desc' journal text has
    >
    OBJECTIVES VARCHAR2 (3950)
    >
    It is the same table that you started with how the column suddenly grow 50 bytes?
    This means that you did from different parts of the present in the two schemas or on two servers or you change the table between the two.

    You can't address properly when you do this. By chance it is the column that you said is now the problem.
    In SQL, the maximum length of a VARCHAR2 is 4000 bytes; no characters but bytes. Nothing more than 4000 bytes would probably be a LONG in the generic sense.

    If your error
    >
    Re: ORA-01461: can bind to a LONG value only for insert into a LONG column
    >
    means that you try to 'bind a LONG value' to a column VARCHAR2 and you can't you can 'bind a LONG value only for insert in a LONG column.

    In the proper context, the error makes sense.

    You probably have a problem with

     ps.setString(2,  objectives);
    

    because the 'objectives' has a length of more than 4000 bytes.

    Remember this answer from you?
    >
    I have read and found that there may be a problem with the driver JDBC or Characterset. Am I wrong?
    >
    The 'Hello' ASCII string is five characters and five bytes because the ASCII code is a set of characters in a single byte. The same string internally in Java is five characters but ten bytes because Java uses UTF16.

    So, if the character set of the data itself is double-byte character set then anything more than 2000 characters (4000 bytes) is a "LONG". And if your column is defined as VARCHAR2 (3950), which means bytes a doublel-byte character set which are characters of 1975.

    Then you said in a response later
    >
    I checked by the SNA Server and oracle that are both of the same but new thing I found is that oracle does not allow more than one clob column in a table. Is this true?
    >
    Somehow a hypothesis has crept it that the problem was not a driver JDBC or Charaterset, but because you can not have more than one clob column in a table.

    You could have easily tested for yourself by doing what P. Forstmann - tried to create a table and see.

    Then you completely ignored my advice
    >
    I suggest to you isolate the columns actually causing the problem.
    Change your code to insert only a few columns. When it works, add more than a few columns.
    This will then tell you which column or the columns are at the origin of the problem.
    Display the results once you determine a column that causes the error.
    >
    When you have finally made the simplest things, you have found what was causing the problem almost immediately.

    Many times you don't need 'experts' - you must use a rigorous, methodical, process step by step.

    ALWAYS, ALWAYS, ALWAYS reduce the simplest possible code example that illustrates the problem.
    If you had followed this a rule would have probably found you the problem and makes you look like the 'expert '.

    There are no shortcuts.

  • Could not use DB function call to insert a row into a table OBIEE

    Hello

    At the prompt of the OBIEE report, I create a DB function in a variable column of the guest, so whenever I'm in the dropdown variable ob column call the function DB call.

    The function call is insert a row into a table in the database. However, it seems impossible to insert the row into the table.

    I have test the function in the sqlplus and it works, if the function has no problem. The problem is OBIEE failed to insert something in the datebase, it can only read from it.

    Any ideas on how I could fix it?

    Thank you!

    Hello
    Use your Evaluate function and the variable correctly. In the case where u called this function evaluate in the report in a column, and he has 100 files it contains, it will call db 100 times.

    Kind regards
    Anitha.B

  • Convert a single column into multiple lines

    Hi people,

    I have a task to display a single column into multiple lines (for use in LOV)

    For Ex:

    The column consistes of value such as 98,78,67,68,34,90. -It's a unique column values where none of the values can be ' number that is separated by commas

    Then we must view it as

    98
    78
    67
    68
    34
    90
    -under the number of lines (no lines can be ' do not number).

    Thanks in advance

    Try this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select regexp_substr('98,78,67,68,34,90', '[^,]+',1,level) Value
      2    from dual
      3*   connect by level <= regexp_count('98,78,67,68,34,90',',') + 1
    SQL> /
    
    VALUE
    -----------------
    98
    78
    67
    68
    34
    90
    
    6 rows selected.
    

    Thank you!

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • inserting several rows of a particular column

    It comes to my table

    Select * from emp1.

    EMP_ID DEPT DEPTNO

    ---------- ------------------------------ ----------

    100 ICC

    112 tests

    Tesla 103

    104. IT

    S/N 105

    106 icc

    107. IT

    101 S/N

    tests of 111

    112 tests

    I want to update the deptno column only with a set of values totally 10 values.

    I did the below,

    SQL > start

    2 3 insert into emp1 (deptno) values (100);

    4 insert in emp1 (deptno) values (101);

    5 insert in emp1 (deptno) values (102);

    6 insert in emp1 (deptno) values (103);

    7 insert in emp1 (deptno) values (104);

    8 insert in emp1 (deptno) values (105);

    9 insert in emp1 (deptno) values (106);

    10 insert into emp1 (deptno) values (107);

    11 insert in emp1 (deptno) values (108);

    12 insert in emp1 (deptno) values (109);

    13 end;

    14.

    I messed up the table when trying to insert some values of this column and now my table looks as seen below after using a block anonymous plsql

    SQL > select * from emp1.

    EMP_ID DEPT DEPTNO

    ---------- ------------------------------ ----------

    100 ICC

    112 tests

    Tesla 103

    104. IT

    S/N 105

    106 icc

    107. IT

    101 S/N

    tests of 111

    112 tests

    EMP_ID DEPT DEPTNO

    ---------- ------------------------------ ----------

    100

    101

    EMP_ID DEPT DEPTNO

    ---------- ------------------------------ ----------

    102

    103

    104

    105

    106

    107

    108

    109

    PLSQL block used

    Start

    Insert in emp1 (deptno) values (100);

    insert into emp1 (deptno) values (101);

    insert into emp1 (deptno) values (102);

    insert into emp1 (deptno) values (103);

    insert into emp1 (deptno) values (104);

    insert into emp1 (deptno) values (105);

    insert into emp1 (deptno) values (106);

    insert into emp1 (deptno) values (107);

    insert into emp1 (deptno) values (108);

    insert into emp1 (deptno) values (109);

    end;

    /

    Please help me correct the table.

    You know what EMP_ID should be given what DEPTNO and corresponding use updated.

    SY.

Maybe you are looking for

  • Realtek RTL8188EE 802.11bgn wifi

    Buy HP Pavilion Notebook - 17-f123ds and the adapther Wireless does not query my 5 GHz network. I've done many research and cannot find all of the information that works this Realtek RTL8188EE 802.11bgnadapther. There's no sense that this model would

  • At the start of XP, get tasks to the message request did not

    When Windows starts, it keeps popping up: «Some tasks has not run at their regular times [...]» He even suggests that I have 'attempt' to run. Yes, good. Why is not that? How to get rid of this annoying pop up?

  • Project open also relative

    When I open a project in LabView 2009, it opens as a relative location based on the network drive-server-stuff This is a new behavior which began today. I can go to recent projects on the start screen and recover projects they were opened as absolute

  • Printers HP Deskjet 1510: ADD ANOTHER PRINTER HP SOLUTION CENTER

    My problem is the digitization.   I found ways to digitize unique photos/documents and send them to a separate email documents/photos.   I can't scan multiple documents/photos under a single file in the email.  The only way I can to do this is to use

  • ESX 3.5 U5 free ESXi 4 o

    Buenas a todos,Stink results tenemos una license to ESX 3.5 pero el servidor donde esta was BOOOMMM!, y ahora tenemos duda TR volver a instalar a esx 3.5 o is mejor instalar an ESX 4 free.that thought?Are no tenemos soporte nor any added en her licen