Can't modify column?

Hi,
I need to alter the data type of a date column to varchar2(6).
Here's the tabel I need to change.
SQL> desc foo
Name Null? Type
PK NUMBER
DOB DATE
I understand that I must NULL out the DOB column before I can do the ...
alter table foo modify (DOB varchar2(6));
... so I create another table like so ...
SQL> create table foo2 as select * from foo;
Table created.
... now I can do ...
SQL> update foo set DOB = NULL;
100 rows updated.
SQL> commit;
Commit complete.
... now I do ...
SQL> alter table foo modify ( dob varchar2(6));
alter table foo modify ( dob varchar2(6))
ERROR at line 1:
ORA-01401: inserted value too large for column
Why do I get this error?
thanks

Depending too regarding the nls_date_format in your system, the result when you query the date will be higher o viceversa.
As you realized try with varchar2(8), if it fails try
to increase that number.
Joel P�rez

Similar Messages

  • How can I modify column width in a spreadsheet report without using an Excel template

    I currently use the LabVIEW Report Generation toolkit in LabVIEW 2011SP1 to create simple spreadsheet reports that I can build/print without having Microsoft Office products installed.  I really like being able to do this, and it allows me to generate nice on-demand data reports - I'm also not tied to having Office installed on the system I'm using, so this works on just about any test fixture I can install the software on.  
    I recently have a requirement that I must have variable-length columns in my report.  I currently use the VI "Append Text Table to Report" in order to create a text table, but the column width requirement is that all columns must be equal width UNLESS I use an Excel Template file to define my column widths.  
    My questions are:
    Is it possible to create a text table and define per-column widths without using an Excel Template?  If so, how?  My report mainly has a lot of small numerical values for the columns, but some columns contain system names or status messages - I really hate the longer text blocks wrapping and taking up so much real-estate when if I could control the column widths I can get all my data on a single line.
    I'll admit I haven't tried this myself yet, but if I use an Excel Template will that require me to have Excel installed on the PC in order to print/generate reports?
    Is there a recommended way (with an example) of generating a text table in a report with or without using the "Append Text Table to Report" VI that allows me to have custom column widths that doesn't require me to manually build a custom print page?  If I do have to create a custom print page, what would be the most straightforward approach?
    Thanks!
    -Danny

    Sure, I'll provide a pared down example that demonstrates my use-case:
    I have a control to the VI that takes in a 2D array of strings representing the data I want printed in a table.  I am generating a standard report, adding a table to the report, and printing it.  The first VI is "New Report.vi", the second VI is "Append Table to Report.vi", and the third is "Print Report.vi", all found standard in the Report Generation palette.
    Note that the "Append Table to Report.vi" has an input parameter "Column Width" with a default value of (1).  This input parameter is a single input parameter, which defines the column widths of ALL the columns in my table - hence, with the VI the way it is, all my columns will be 1 inch wide.  
    I find myself needing to be able to define per-column widths, not just a single global column width parameter.  
    The only way I have found to do this is by using an Excel template file.  The "New Report.vi" takes in a "template" parameter, and if used, the report generation toolkit can be set to ignore the "Column Width" input parameter on the "Append Table to Report.vi" by setting the width value to -1.  Instead it will launch Excel, open the template file provided, build the table using the template, will close Excel, and will attach the generated table to the report.  However, I have a strict requirement that Microsoft Office NOT be required to be installed on the computer.  
    So, without using Excel, is there a way to generate a table in a report and define the width of each column individually?
    -Danny

  • Can I modify the column "Net Price" of purchase order to display 3 decimals

    Dear expert,
         Can I modify the column "Net Price" of purchase order to display 3 decimals?
         Looking forward to your reply.
         Many thanks.
    Best Regards,
    Merry

    Hi,
    You can easily change ur decimal place in OY04 by seeting number of decimal place to ur currency.
    But be careful as it cause a huge effect to ur finance documents, read system message carefully before applying.
    Regards
    ManUfacTuReR

  • How can we modify the maximum no. of columns in pivot table ?

    hi all,
    How can we modify the maximum no. of columns in pivot table ?
    do i need to change the nqconfig.ini or instanceconfig file or else?
    thnx..

    A little search on the forum :
    In the instanceconfig.xml add a <PivotView> element under <ServerInstance> if one does
    not exist already.
    Within the <PivotView> element add an entry that looks like:
    <MaxCells>nnnnnn</MaxCells>
    where nnnnnn is your desired limit for the maximum total number of cells allowed
    in a pivot.
    Warning: an excessively large number will cause more memory consumption and
    slower browser performance.The details here :
    Oracle BI EE (10.1.3.2): Maximum total number of cells in Pivot Table excee

  • How can I modify one column of current and next record depending of some criteria?

    Having DDL
    CREATE TABLE #ServiceChange(
    [ID] [int] identity(1,1),
    [SHCOMP] [char](2) NOT NULL,
    [SHCRTD] [numeric](8, 0) NOT NULL,
    [SHCUST] [numeric](7, 0) NOT NULL,
    [SHDESC] [char](35) NOT NULL,
    [SHTYPE] [char](1) NOT NULL,
    [SHAMT] [numeric](9, 2) NOT NULL,
    [CBLNAM] [char](30) NOT NULL,
    [GROUPID] [char](2) NULL
    And original and desire data in below link
    https://www.dropbox.com/sh/bpapxquaae9aa13/AADnan31ZASublDjN7sa2Vvza
    I would like to know how can I modify one column of current and next record depending of some criteria using SQL2012?
    The criteria is:
    Type should always flow F->T
    if current abs(amount)> next abs(amount) then groupid = 'PD'
    if current abs(amount)< next abs(amount) then groupid = 'PI'
    there is no case when those amounts will be equals
    where current(custid) = next(custid) and current(service) = next(service) and groupid is null
    Any help will be really apreciated.
    Thank you

    I tried that and got this error
    'LAG' is not a recognized built-in function name.
    You said you were using SQL 2012, but apparently you are not. The LAG function was added in SQL 2012. This solution works on SQL 2005 and SQL 2008:
    ; WITH numbering AS (
       SELECT groupid,
              rowno = row_number()  OVER (PARTITION BY custid, service ORDER BY date, id)
       FROM   #ServiceChange
    ), CTE AS (
       SELECT a.groupid,
              CASE WHEN abs(a.amount) < abs(b.amount) THEN 'PD'
                   WHEN abs(a.amount) > abs(b.amount) THEN 'PI'
              END AS newgroupid
       FROM  numbering a
       JOIN  numbering b ON b.custid  = a.custid
                        AND b.service = a.service
                        AND b.rowno   = a.rowno - 1
    UPDATE CTE
    SET   groupid = newgroupid
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How can you modify the displayed columns on a Related Information List?

    How can you modify the displayed columns on a Related Information List? For example, how could you add the "Type" column to the List of columns displayed for Service Requests when you are viewing the Contacts Detail page?
    Thanks

    I'd have to say I think this is one of the biggest flaws in the OnDemand system currently. The solution I have come up with is to create reports and put them in webapplets showing the data I want to show. I have then removed the standard Related Info List Objects and added weblinks to create new records as the button on the List object is also gone.
    Keep in mind that doing this does slow things down a little, so it may not work if you have a big user base.
    RWB.

  • How can I modify a widget that uses a script?  In particular, I want to change the HTML that the 2014 Muse contact form produces to adjust the email column widths.

    I have looked all over to find the "source" for the code produced by this widget.  Where is it located, and how can I modify the widget?

    Hi,
    If you want to add fields to a list, as you have written your form in JavaScript, you can take consideration of using JavaScript Client Object Model to add/delete fields dynamically.
    How to: Create, Update, and Delete Lists Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185005(v=office.14).aspx
    If you want to achieve it with Form7, it is recommended to post the question to its forum to get quick and confirmed answer.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How we can replace the column in Core Table plz see this msg

    Hi,
    How we can replace the column in Core Table plz see this msg
    Req:
    when i push the Insert button the data inserted into the Table
    like
    Cols Values
    FOCD      CUFZ14
    PRDCD FU6
    Month 082008
    AgencyCD AG02
    PLAN 123
    This is FO_Plan Table....
    Requirement:
    i need at table show to replace the Prd_CD to Prd_Desc while inserting the above Row....
    There is no Prd_Desc in FO Plan Table....
    Prd_desc comes from Product Table.
    did u get my point...
    how to solve.
    Thanks
    Ram
    Edited by: Ram Vungarala on Sep 24, 2008 9:09 AM
    Edited by: Ram Vungarala on Sep 24, 2008 9:15 AM

    Hi,
    I'm not sure if I understood what are you trying to do. But you can modify your table in a backing bean code. JSF page code for a table:
    <af:table id="product_search_results_tbl" binding="#{backingBean.boundTable}" ... />
    And a backing bean code:
    import oracle.adf.view.faces.component.core.data.CoreTable;
    public class YourBackingBean {
        private CoreTable boundTable;
        public void setBoundTable(CoreTable boundTable) {
            this.boundTable = boundTable;
        public CoreTable getBoundTable() {
            return boundTable;
       public String insertButtonAction() {
          // Bind your button action to this method and modify here your bound table
         return null;
    {code}
    Look for column modification methods in a CoreTable class documentation.
    Marius                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I modify this to process 80,000 records at a time until finish.

    Hello it's me again -
    Without using a rownum limit in my cursor declare my record-set is around 10 million records. This causes problems within our environment. Is there a way I can loop the following code and only do 80,000 at a time.
    1 process 80,000
    2. process next 80,000.
    How would I redeclare the cursor in a loop and grab the next 80,000?
    Thanks again
    Steve
    SET SERVEROUTPUT ON
    DECLARE
    CURSOR vt_mlr_cursor IS Select master_key, tn, user2 from vt_mlr Where user2 is not null and rownum < 80001;
    USERFIELD VARCHAR2(100);
    R_count NUMBER := 0;
    Field1 VARCHAR2(20);
    Field2 VARCHAR2(20);
    key VARCHAR2(10);
    phone VARCHAR2(11);
    BEGIN
    FOR vt_mlr_record IN vt_mlr_cursor
    LOOP
    BEGIN
         key := vt_mlr_record.master_key;
         phone     := vt_mlr_record.tn;
         USERFIELD := vt_mlr_record.user2;
         Field1 := SUBSTR(vt_mlr_record.user2,12,4);
         Field2 := SUBSTR(vt_mlr_record.user2,28,4);
              UPDATE vt_mlr
              SET
              line_medr = Field1,
              line_aidr = Field2
              WHERE
              master_key = vt_mlr_record.master_key;
              R_count := R_count + 1;
         EXCEPTION
         when others then
         Insert into temp_reject (REJECT_KEY, REJECT_TN, REJECT_VALUE) VALUES
         (key, phone, 'USER2 ' || USERFIELD );
         R_count := R_count - 1;
    END;
    END LOOP;
         commit;
         EXCEPTION
         when others then
         DBMS_OUTPUT.PUT_LINE('Error code ' || sqlcode || ' Error desc' || SUBSTR(sqlerrm,1,200));
    END;

    Add a "last_update" or "modified" column to your table.
    Then do this:
    declare
    CURSOR vt_mlr_cursor IS
       select master_key, tn, user2
       from vt_mlr
       where user2 is not null and rownum < 80001
             and modified != 'Y'
    (or)
             and last_update < begin_date ;
       begin_date constant date := sysdate ;
    begin
      update vt_mlr
         set line_medr = Field1,
             line_aidr = Field2,
             modified = 'Y'
    (or)
             last_update = sysdate

  • Can't modify text on Type Overlay in Acrobat Pro 9.0

    I'm trying to modify a menu for a local restaurant. They gave me the file as a .pdf file, and it's listed as a Type Overlay file. Advanced editing and touch up text tool do not work (I'm trying to delete an item that is no longer served).
    The entire menu page comes up as an object / picture, not as text. Using the touch up text tool does delete the desired text, but it changes the entire layout of the page, moving text over several columns and covering existing text. Trying to realign the text by putting space in the missing pieces location just compounds the problem in several bizarre ways.
    How do I determine what type of format this is. It says there are no layers, it appears to be one image, but deleting or changing any portion of the image causes undesired movement of text. How do I delete, or insert text as the menu changes?
    Thanks!
    John

    Here's an update to the problem I was having.
    I couldn't find any way to edit the pdf "as is" in Acrobat, but through obstinance and trying everything at my disposal that had even a slim chance of working, I came up with a solution.
    By opening the pdf up in Adobe Illustrator, it gave me the ability to cut / paste, delete and modify the text without problems or errors. I was then able to resave as a pdf. The file works great, and though I still can't modify it in Acrobat, Illustrator works fine until I get the original file.
    On a related note, Illustrator allowed me to remove the menu background from the pdf file and save it (the text only) as another pdf, getting rid of clutter but maintaining alignment so it still prints on the menu paper and stays in line with the graphics.
    I hope this helps others!
    John

  • Can't modify Outbound Connection Pools properties in WebLogic 10.3.6

    I'm trying to configure BAM adapter in WebLogic Administration Console. Navigate to deployments -> OracleBamAdapter -> Configuration -> Outbound Connection Pools -> eis/bam/rmi -> tried to enter property value of Hostname but I couldn't. It is not in edit mode - no check box in front of Hostname column. I tried to enter the value in the hostname property and save but nothing was saved.
    I've unlocked domain configuration lock and I see the <lock & edit> button is disabled and <release configuration> button is enabled in the change center. So why can I modify the property value?
    WebLogic 10.3.6
    SOA 11.1.1.6
    BAM
    All are installed in the same server and SOA is installed with development mode. I didn't bounce the admin server after unlocking the domain configuration, is this required?

    Thanks, Arik. I just figured it out and was banging my head against the wall when you posted the message. :-) Thanks for the reply!

  • Can we modify the ME5A  standard report

    dear gurus
    I wnat to include the two columns where i need to fetch the data from P.R , Can we modify the ME5A  standard report.
    Regards
    srinivas

    Hi
    Pl do n't do any modification the SAP standard report would suggest you to copy the programme and rename & create Z report with addition of two columns as per your requirement which is the best option
    Regards

  • Modify column in an internal table

    Hi Friends,
    I have an internal table itab1 which has a column called zpo_number .
    I am getting the PO from a BAPI call storing in a field w_ponumber.
    I have the code below . THe table itab1 has rows all having the same matnr .
    How can I modify all the rows of the table with the same w_ponumber ?
    Thanks!
    Loop at itab1
    babpi call get po number
    w_ponumber.
    MODIFY itab1
    endloop.

    simplicity change to your original code provided:
    Loop at itab1
    babpi call get po number
    w_ponumber.
    itab1-z_ponumber  = w_ponumber.
    MODIFY itab1
    endloop.
    Or -
    Loop at itab1
    babpi call get po number
    itab1-z_ponumber.
    MODIFY itab1
    endloop.

  • How can I edit column name/heading in Column Attributes?

    Hi All,
    In the link "*Home>Application Builder>Application 1000>Page 2>Report Attributes>Column Attributes*", can someone help me how to edit/modify 'Column Name' and 'Column Heading' ?
    Thanks in advance.
    Regards
    Sharath

    Hi,
    There is Headings Type radio buttons above report column attributes.
    Select Headings Type "Custom" and then you can change Headings.
    Column names (Alias) you need change to report query.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Urgent!!! Modify column of a table having records

    Dear all,
    I have a table with a column VARCHAR2(12) and I need to modify this column into VARCHAR2(9) without losing any data! s there any workaround?
    Thanx a lot!!

    This code was posted in one of the previous Oracle magazines:
    The Pl/Sql procedure to rename the column must be compiled in to the database you require to rename columns in - one note I would run this as SYS:
    create or replace procedure RenameColumn
    (pUserName varchar2,
    pTableName varchar2,
    pOldColumnName varchar2,
    pNewColumnName varchar2
    is
    vUserName dba_users.userName%type :=
    upper(ltrim(rtrim(pUserName)));
    vTableName dba_tables.table_name%type :=
    upper(ltrim(rtrim(pTableName)));
    vOldColumnName dba_tab_columns.column_name%type :=
    upper(ltrim(rtrim(pOldColumnName)));
    vNewColumnName dba_tab_columns.column_name%type :=
    upper(ltrim(rtrim(pNewColumnName)));
    vErrorMessage varchar2(4000);
    eNotAuthorizedUser exception; /* -20101 */
    eInvalidUser exception; /* -20102 */
    eInvalidTable exception; /* -20103 */
    eInvalidOldColumn exception; /* -20104 */
    eInvalidNewColumn exception; /* -20105 */
    cursor csrCheckUser
    (pUser dba_users.userName%type)
    is
    select '1'
    from dba_users
    where userName = pUser;
    cursor csrCheckTable
    (pUser dba_tables.owner%type,
    pTable dba_tables.table_name%type)
    is
    select '1'
    from dba_tables
    where owner = pUser
    and table_name = pTable;
    cursor csrCheckExistingColumn
    (pUser dba_tables.owner%type,
    pTable dba_tables.table_name%type,
    pColumn dba_tab_columns.column_name%type)
    is
    select '1'
    from dba_tab_columns
    where owner = pUser
    and table_name = pTable
    and column_name = pColumn;
    vDummy char(1);
    begin
    if user <> 'SYS'
    then
    raise eNotAuthorizedUser;
    end if;
    /* Check the value of vUserName */
    if vUserName is null
    then
    raise eInvalidUser;
    end if;
    open csrCheckUser(vUserName);
    fetch csrCheckUser into vDummy;
    if csrCheckUser%notfound
    then
    close csrCheckUser;
    raise eInvalidUser;
    end if;
    close csrCheckUser;
    /* Check the value of vTableName */
    if vTableName is null
    then
    raise eInvalidTable;
    end if;
    open csrCheckTable(vUserName, vTableName);
    fetch csrCheckTable into vDummy;
    if csrCheckTable%notfound
    then
    close csrCheckTable;
    raise eInvalidTable;
    end if;
    close csrCheckTable;
    /* Check the value of vOldColumnName */
    if vOldColumnName is null
    then
    raise eInvalidOldColumn;
    end if;
    open csrCheckExistingColumn(vUserName, vTableName, vOldColumnName);
    fetch csrCheckExistingColumn into vDummy;
    if csrCheckExistingColumn%notfound
    then
    close csrCheckExistingColumn;
    raise eInvalidOldColumn;
    end if;
    close csrCheckExistingColumn;
    /* Check the value of vNewColumnName */
    if vNewColumnName is null
    then
    raise eInvalidNewColumn;
    end if;
    open csrCheckExistingColumn(vUserName, vTableName, vNewColumnName);
    fetch csrCheckExistingColumn into vDummy;
    if csrCheckExistingColumn%found
    then
    close csrCheckExistingColumn;
    raise eInvalidNewColumn;
    end if;
    close csrCheckExistingColumn;
    /* Update the row in col$ Oracle dictionary */
    update col$
    set name = vNewColumnName
    where (obj#, col#) in
    (select obj#,
    col#
    from col$
    where name = vOldColumnName
    and obj# = (select obj#
    from obj$
    where name = vTableName
    and owner# = (select user_id
    from dba_users
    where username = vUserName)));
    commit;
    exception
    when eNotAuthorizedUser
    then
    vErrorMessage := 'User ' || user ||
    ' is not authorized to run this procedure.';
    raise_application_error(-20101, vErrorMessage);
    when eInvalidUser
    then
    vErrorMessage := 'Invalid user name: ' ||
    pUserName || '.';
    raise_application_error(-20102, vErrorMessage);
    when eInvalidTable
    then
    vErrorMessage := 'Invalid table name: ' ||
    pTableName || '.';
    raise_application_error(-20103, vErrorMessage);
    when eInvalidOldColumn
    then
    vErrorMessage := 'Invalid old column name: ' ||
    pOldColumnName || '.';
    raise_application_error(-20104, vErrorMessage);
    when eInvalidNewColumn
    then
    vErrorMessage := 'Invalid new column name: ' ||
    pNewColumnName || '.';
    raise_application_error(-20105, vErrorMessage);
    end RenameColumn;
    Once you have the above in and compiled okay then you can rename you column names by:
    begin
    RenameColumn('SCOTT', 'EMPTEST', 'SAL', 'SALARY');
    end;
    also while still connected as SYS, note the parameters SCOTT should be the schema owner which contains the table, EMPTEST is the table name which contains the column, SAL is the old column name and SALARY is the new column name.
    Have fun.

Maybe you are looking for

  • MMS no longer works on Tab S 8.4

    After the last update to Android. I can no longer send MMS picture messages on a pay monthly tablet. So called 'Guru' no 1 said let me look at your account....pause...ok it will work again in an hour or two. 6 hours later, 2nd 'guru' has now told me

  • G-Mail Account Not showing up in Messaging Folder

    On my Droid X, that I can't say enough about, I noticed that my G-mail Account is not showing up in the Messaging folder.  I have tried the "manage account" option and it shows the account,  but on the main messaging screen, it is only showing my com

  • HT201412 after upgrading to newer iOS version 6 only my iphone 4 got turned off.

    hi , after upgrading to newer iOS version 6 only my iphone 4 got turned off. it could not turned.. contacted apple store they tried all the option .. solution was replace with other iphone4 by paying £119, Which is really not the new one, its refurbi

  • Question about setting conditions in searches using SQL

    I am trying to search through a table where the "Score" column hs to be in between two numbers. Table Test: Name: # Tom 40 Tom 60 Tom 50 joe 60 If i were to search for "Tom" nomally i get all 3 back. Regardless of the code for SQL(assume it works) wi

  • Where is the cost of the icloud mentioned on the Apple websites?

    Where is the Cost of the icloud mentioned on the Apple websites?  How much is the monthly/annual fee for icloud? There is no Search in HELP either, just puts you in circles to sign up.