Table editor problem with default value for column

Hi there,
I'm trying to use SQL Developer 1.2.1 on Ubuntu 7.10 (though I don't think the OS is relevant) and I'm running into a snag when trying to update table structures. If you go to edit the table to say modify a column name, and that column has a default value set, SQL Developer is encapsulating the value with brackets and quotes. When trying to save the changes, it complains about the default value being 4 chars too many for the column width. An example of this would be a currency code column of varchar2 (3) set with EUR as the default. SQL Developer changes the value to ('EUR') hence the error.
Is there anyway to prevent this from happening?
Cheers,
Chris

Could you please be more specific? In 1.2.1.32.40 I
added the column COL1 VARCHAR2(3) with default value
'EUR'. The data display field refreshed to show the
default value, so I edited it in a couple of entries
and comitted the change without problem. Then I
renamed the column from the "Edit table" popup menu.
Finally, I renamed the column from the "Rename
column" popup menu, no problem either.Ah, you are correct. That does work. What I was trying is select tablename in the object browser, then right click on it and select "Edit" from the contextual menu. You are then presented with edit table dialog box. If you then select a column in that box you will see a column properties box. In that section you can change the name, default value, datatype et cetera. Note that your default column value which should just be EUR (or 'EUR' to denote that it's a string) is now ('EUR'). Once you try changing the name to of the column to something else and then click OK, you should then get an error complaining of "Invalid varchar2 default value" with a more specific message of "Default values size 7 is greater than the allowed 3"
You have provided a work around, and thanks for that, but it would be nice to edit everything in the Edit table dialog box if you're modifying more than one column name. I'm tasked with cleaning up a bit of a messy database, and there are a good deal of columns to be renamed.
Cheers,
Chris

Similar Messages

  • Problem with default value for Billing when creating Business Partner

    In Sales Area data - Billing screen we want to default a value for Price List Type when creating a Busines Partner.
    We implemented  BADI 'BUPA_FRG0030_UPDATE'  and followed suggestions from another thread :
    Defaulting Currency Value to 'USD' during BP Creation.
    But This only seems to work when you change an existing BP.
    If we use FUNCTION 'CRM_BUPA_FRG0030_SAVE' in the BADI this function is called again by the system when saving the BP and causes a dump.
    Also the UPDATE functions only seem to work when you change an existing BP and not when creating one.
    Any suggestions if we can use another BADI or other function modules/methods ?
    Or some sample coding for implementing BUPAFRG0030_SAVE'  the correct way ?
    Thanks for the help,
    Steve

    Brent,
    When I use the latest build 10.1.3.3.81, this gets generated:
    <managed-property>
    <property-name>defaultValues</property-name>
    <map-entries>
    <map-entry>
    <key>ManagerId</key>
    <value>#{'#{jhsTypeConverter.stringToNumber['100']}'}</value>
    </map-entry>
    </map-entries>
    </managed-property>
    Which is slightly better, but still failing because the single quotes get mixed up.
    This should be generated:
    <managed-property>
    <property-name>defaultValues</property-name>
    <map-entries>
    <map-entry>
    <key>ManagerId</key>
    <value>#{"#{jhsTypeConverter.stringToNumber['100']}"}</value>
    </map-entry>
    </map-entries>
    </managed-property>
    which can be achieved by changing the defaultValuesBean.vm template like this:
    <managed-property>
    <property-name>defaultValues</property-name>
    <map-entries>
    #foreach ($defaultValue in $group.defaultValues.keySet())
    <map-entry>
    <key>$defaultValue</key>
    #if ($group.defaultValues.get($defaultValue).startsWith("#{"))
    <value>#{"$group.defaultValues.get($defaultValue)"}</value>
    #else <value>$group.defaultValues.get($defaultValue)</value> #end
    </map-entry>
    #end
    </map-entries>
    </managed-property>
    Steven Davelaar,
    JHeadstart team.

  • Computing default value for column MRU. error.

    hi
    we moved from apex 3.x to 4.2
    AN apex application was working fine..After upgrade it gave error while trying to insert using apex front end
    Error computing default value for column Apply MRU.
    ORA-06550: line 3, column 46: PL/SQL: ORA-00972: identifier is too long
    The PK of the relevant table is based in a sequence.Can i relplace old seq. using new seq...will it help?
    When we insert using regular insert statement in sql developer, its fine though.
    thanks
    kp
    Edited by: user8612301 on Mar 15, 2013 7:09 AM

    Hi,
    Remember the error says "default value". What is your code to set the default value?
    I've seen this error before where it was simply a statement like
        column = "text123456789012345678901234567890";where the identifier error was given because it should have been
       column = 'text123456789012345678901234567890';Since the string doesn't begin with an apostrophe, the parse thinks it's a LONG identifier. Hence, error!
    Howard

  • Import and default values for columns

    Hi guys
    I have a table in which there are default values for some columns. I take export of this table.
    I go to another database where this table structure is already there (but default values are not set). I run the import of table with ignore=Y. It does all...import the data...create the indexes and all...but doesn't set the default values for the columns.
    Shouldn't it do that also ? ignore=Y means that ignore the object creation errors and proceed with the rest of the stuff ? Or there is some problem in my understanding ?
    Version 10gR2 on AIX 5.3 and using traditional export/import.
    Thanks
    Amardeep Sidhu

    Hanji Sidhu Sahib.
    Mein Tuhade liye eh example try kita hai.
    SQL> conn simar/simar
    Connected.
    SQL> SQL> create table orders (
    dept varchar2(20) primary key,
    place varchar2(20),
    intcol integer default 12
    2 3 4 5
    Table created.
    SQL>
    Inserted few values ...........+ commit.
    SQL> conn simar/simar
    Connected.
    SQL> select * from orders;
    DEPT PLACE INTCOL
    SALES TORONTO 12
    HR LA 12
    BILLING FLORIDA 12
    IT HALIFAX 5
    exp simar/simar@RACDB file=exptest.dmp log=exptest.log
    rac01:/software/backup>exptest.dmp log=exptest.log <
    Export: Release 10.2.0.3.0 - Production on Tue May 6 23:35:58 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user SIMAR
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user SIMAR
    About to export SIMAR's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export SIMAR's tables via Conventional Path ...
    . . exporting table ABC 12 rows exported
    . . exporting table ORDERS 4 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    rac01:/software/backup>strings exptest.dmp |grep -i 'create'
    CREATE TABLE "ABC" ("A" VARCHAR2(10), "B" VARCHAR2(10)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS
    CREATE TABLE "ORDERS" ("DEPT" VARCHAR2(20), "PLACE" VARCHAR2(20), "INTCOL" NUMBER(*,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS
    rac01:/software/backup>strings exptest.dmp |grep -i 'alter'
    ALTER TABLE "ORDERS" MODIFY DEFAULT
    ALTER TABLE "ORDERS" MODIFY ("INTCOL" DEFAULT 12
    ALTER TABLE "ORDERS" ADD PRIMARY KEY ("DEPT") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING ENABLE
    SQL> conn simar/simar
    Connected.
    SQL> drop table orders;
    Table dropped.
    imp simar/simar@RACDB file=exptest.dmp log=imp_exptest_1.log tables='ORDERS'
    rac01:/software/backup>exptest.dmp log=imp_exptest_1.log tables='ORDERS' <
    Import: Release 10.2.0.3.0 - Production on Tue May 6 23:46:48 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
    . importing SIMAR's objects into SIMAR
    . importing SIMAR's objects into SIMAR
    . . importing table "ORDERS" 4 rows imported
    Import terminated successfully without warnings.
    SQL> conn / as sysdba
    Connected.
    SQL> set heading off;
    set echo off;
    Set pages 999;
    set long 90000;
    SQL> SQL> SQL> SQL> SQL>
    SQL> select dbms_metadata.get_ddl('TABLE','ORDERS','SIMAR') from dual;
    CREATE TABLE "SIMAR"."ORDERS"
    ( "DEPT" VARCHAR2(20),
    "PLACE" VARCHAR2(20),
    "INTCOL" NUMBER(*,0) DEFAULT 12,
    PRIMARY KEY ("DEPT")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"
    SQL>
    Here the alter table statement is in the dmp file as well as in the imported table.
    Regards

  • Problem with RGB Values for Canvas Type ‚Horizontal Toolbar' in Webforms 10

    Hello,
    I have a problem with the canvas type ‘Horizontal Toolbar’ in Webforms 10g.
    When I try to set or change the RGB value of a ‘Horizontal Toolbar’ with the forms function
    Set_Canvas_Property(‘my_horizontal_toolbar’, BACKGROUND_COLOR, rgb-value)
    (at runtime) it has no effect in Webforms 10g for the canvas type ‘Horizontal Toolbar’ (the background color of the horizontal toolbar doesn’t change).
    But it works fine for other canvas types like ‘Stacked’ or ‘Content’.
    In Oracle 6i (Client / Server) this function works quiet well (even for the ‘Horizontal Toolbar’ canvas type).
    The reason why we are using rgb values instead of visual attributes in this case is, that the color of the ‘Horizontal Toolbar’ should be customizeable (via a RGB Field) for our customers (at runtime).
    Further more we are using the same technique for Text-Field-Items, Content- and Stacked-Canvases (and all works fine).
    Maybe it has something to do with the pre-configured IAS color-schema (blaf).
    But changing the color schema (e.g.: from 'blaf' to 'red') has no effect also.
    Thanks for your help.

    This is probably bug 777312. Call Support for the latest info on this bug and for help getting it fixed.

  • Report-to-Report Interface problem with default values

    Hi all.
    I have RTR interface where target query has default values, so when I jump to target query it doesn't return whole data because of this default filter.
    Is it possible to remove this default filter in query in case it is executed through Report-To-Report?
    I still need this default filter then I execute target query separately.

    Dear Gediminas,
    Make sure that you have same infoobjects which are having default values present in the 2 queries.
    After createing settings in RRI...select that setting.....click on ASSIGNMENT DETAILS tab...
    Assign Type as how they are in 1st query...
    Assign selection type as how they are in 1st query...
    Assign GENERIC to the rest of the fields..
    Cintinue
    Save.
    Assign points if it is helpful.
    Regards,
    R.

  • Table Control with default values for a Column

    Hi,
      I have a table Control with  fields  kschl    kbetr    konwa    mark     
    i have created a range for KSCHL
    now i need to pass this to the table column
    Kindly suggest how can i handle this?
    BEGIN OF y_condition,
      kschl       TYPE kscha,
      kbetr       TYPE kbetr_kond,
      konwa       TYPE konwa,
      mark        TYPE char1,
    END OF y_condition,
    t_cost TYPE STANDARD TABLE OF y_condition,
    MODULE mo_tc_cost_init OUTPUT.
      IF  w_tc_cost_c IS INITIAL.
        REFRESH CONTROL c_tc_cost FROM SCREEN c_scr2000.
        REFRESH t_cost.
        MOVE c_select TO w_tc_cost_c.
        FREE r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb1 TO r_kschl-low.
        APPEND r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb2 TO r_kschl-low.
        APPEND r_kschl.
        MOVE: c_i    TO r_kschl-sign,
              c_eq   TO r_kschl-option,
              c_zhb3 TO r_kschl-low.
        APPEND r_kschl.
      ENDIF.

    Can you clarify please?... you say have a table control containing the following columns:
    kschl TYPE kscha,
    kbetr TYPE kbetr_kond,
    konwa TYPE konwa,
    mark TYPE char1
    so where do you expect the range table "r_kschl" to appear? ... did you want a second table control on the screen?
    Jonathan

  • Problem with default printer for archivelink

    Hi All,
    I have configured a new output device for print list archiving as ARCH in SPAD.I have checked the table TSP03 for the printer names.The printer name ARCH exists in the table.Still this is resulting in an error 'Printer name "ARCH" not defined'.Could help solving the problem.
    Regards
    Ramesh

    Hi Ramesh,
    Try to ensure  that both long and short output device name is set the same 'ARCH'. Please note when you use printing mode archive you must not put in printer ARCHIVE! this one will be used internally. You always have to put in a valid printer in the printer popup.
    Br,
    Javier

  • Default values of columns not transferred in SSIS Transfer Objects Task

    I am working on a project that is creating a new application, my area of the project being the migration of data from the old application database, transforming it, and populating the new database.
    The transformations to the old data are done in a staging database.
    At the end of the process, the staging database ends up with a lot of new applications tables, populated with the migrated legacy data.
    We need to move these tables from the staging database to (initially) our test databases, but ultimately what will be the live database.
    We have tried using the "Transfer SQL Server Objects Task" in SSIS, but have ran into a problem that a lot of the database tables have default values for columns.
    These default values are not brought over.
    Example. Tables contain a "GUID" field, which has a default of value of newid()
    Right clicking and the table generating the CREATE script generates 
    [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_tbCRM_Client_GUID] DEFAULT (newid()),
    However, the Transfer objects task does not create this default of newid()
    Examining the SQL generated by the Import / Export Wizard when investigating this shows that the wizard generates this column as
    [GUID] uniqueidentifier NOT NULL
    and the column default value is lost.
    Is there something i should be setting somewhere to force SSIS to bring these column definitions over correctly?

     Kaarthik Sivashanmugam wrote:
    This behavior is by design to maintain backward compatibility with the Copy SQL Server Objects task in SQL Server 2000. Only two constraints (Primary key and foreign key constraints) are expected to be copied by Transfer Objects task.
    thank you for you response Sivashanmugam.
    How can I move these tables (of which there are over a hundred) from my staging database into the application database - and keep the table definitions correct?
    I cannot use the transfer objects task, as this will not define the tables correctly.
    I cannot use the import and export wizard, as this will also not define the tables correctly.
    This means I will manually have to code the drop, create and inserts for over a hundred tables?

  • Initialize some fields in material master with default values

    Hi,
    I would like to initialize some fields in material master MM01 with default values.
    for exemple in the view MRP1 there is a field MRP type I would like to initialize PD in the field as default value.
    but when I go to the technical information there is no parameter id that I can use in SU3.
    Do you know how I can the initialize the field those don't have parameter ID?
    thank
    Dede

    Dear Glenn,
    This is possible in SAP for this use T code MMD1 and create MRP profile and assign this MRP profile while creating material using MM01 in the organisation level put this created MRP profile. The values you maintained in this profile get copied to the material by default.
    To maintain MRP profile go to MMD1->give your profile name...........> click on  selection screen push button--->give here profile description--->select what MRP  field which u want to make fixed one/default. if make fixed later you can not change--
    >click on data screen 1 push button and maintain your value and save
    sree

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

  • Default  value for a column in Table Control

    Hi friends, can i set dinamcally a default value for a column in table control?, this column is check type. This default value must appear in empty rows,
    thanks

    ADD A MODULE AS Module yyyy In ur PAI.
    as
    In PAI.
    LOOP at  itab.
    Module YYYY
    ENDLOOP.
    Module YYYY.
    LOOP AT SCREEN.
        IF SCREEN-NAME = 'ITAB-VAL’.
          ITAB-VAL = 'XXXXXXXX'        "(DEFAULT VALUE)
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
    ENDLOOP.
    End module.
    *note
    make this event work only if the previous column is filled okay.
    the display will be in display mode on the screen as screen-input = 0.
    see that in the table control u can get the table field for all the rows even though you are processing on some fields .
    so what u do is make that particular filed masked(no i/p field and populate the field that will be better instead of populating all the columns okay.
    hope this helps you out ,
    regards,
    vijay.

  • Default cell values for column not properly saved in uir file in labwindows 2009 (9.1.0 427)?

    I've run into a strange problem with the table control.  Basically, even though I set default cell values for a particular column as numeric, when I try to add items to the list it tries to add them as strings, and returns an error message that it is expecting *char instead of int.  Furthermore, when I open the uir file that contains the table in question in 2010, it appears as if the default cell values for that column are still set as strings, even though in 2009 when I open the uir file it shows as numbers.  I tried converting the uir to C code, and sure enough the C code indicated that the column still is a string type.
    I've gone ahead and made a small project to show the issue.  If you open this project in labwindows 2009 and click on the table in the table_bug.uir, and edit default cell values for column 1, you will see that the cell settings have type as numeric and data type as int.  When you run the project, however, it will fail with an error message saying that it is looking for a *char.  When this same project is loaded into labwindows 2010, clicking on the table in table_bug.uir and edit default cell values (column 1) shows the type as string.  When I change this to numeric (and change numeric attribute to int), this runs fine in 2010.  I tried simply changing the uir in 2010, and then using it in 2009, but 2009 complains that the uir is from a newer version (understandable).  If there is any workaround that would let me continue to use 2009 for the time that would be great.
    Any help would be greatly appreciated.
    thanks,
    Alex Corwin
    Solved!
    Go to Solution.
    Attachments:
    table_bug.zip ‏324 KB

    I opened the UIR in 2009 (but I have 2009 SP1) and it still showed that the default value for the first column was a string. I didn't have any problems changing it to a numeric int, and then building and running the project without error.
    Here are a few things you can try:
    1) Change the default value to a string. OK out of the dialog, re-enter the dialog, and change it back to Numeric int. Resave and see if the problem has gone away.
    2) You said you get a ".UIR is from a newer version" error when opening the 2010 UIR in 2009. Does the UIR still open if you click okay? Often times this will work just fine. Assuming you don't have any problems with this, make a minor change to the UIR in 2009, such as moving the table to the left, and then back to the right and then re-save. See if your program works now.
    Kevin B.
    National Instruments

  • Setting default values for a column

    Hi,
    I have a table having some default values for the columns. I am using a PreparedStatment to insert into this table. For null values I am using setNull(..) method but the default values given for the columns are not inserted for null values.
    eg: INSERT INTO TEST VALUES(?,?);
    where TEST table contains two columns col1 and col2 with default values 'AA' and 'BB' respectively. My requirement is to make sure that when null values are specified for the columns then the database default should be picked up. using setNull(..) method doesn't help.
    Thanks in advance.
    Gyan

    Default value for a column can be picked up from DatabaseMetaData class.
    The below snippet shows that: -
    DatabaseMetaData metaData = connection.getMetaData();
    ResultSet resultSet = metaData.getColumns(null, null, "TEST", "COL%");
    while ( resultSet.next() )
    String defaultValue = resultSet.getString("COLUMN_DEF");
    String datatype = resultSet.getString("DATA_TYPE");
    System.out.println("defaultValue = " + defaultValue);
    System.out.println("datatype = " + datatype);
    }

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

Maybe you are looking for

  • ITunes 7.1 - USB 1.1 error msg but using USB 2

    Upgraded to iTunes 7.1 and now when I plug in my iPod (5g, 30gb) I get the following error message: The iPod "name of iPod" is connected to a low-speed USB 1.1 port. For better performance you should connect with a high-speed port if one is available

  • Trouble with Component Wizard and User Database

    Hello, I am a user of Circuit Design v.13.0 Power Pro Edition (Windows 8 Pro x64, intel Core i7 3GHz, 4GB memory, 500GB HDD). On MultiSim, I tried to create a 324-pin component via the Component WIzard, and had this component listed in the User Datab

  • Finding iBooks Author books in the store?

    I'm more than a little surprised that Apple hasn't made it easier to "search by iBooks Author books" in the store. Does anyone have any sources that are showcasing iBooks Author books? Thanks! Jake

  • Inserting Object in PowerPoint 2013

    Hi All, We are unable to add a pdf(Adobe Reader 11.0.09) as an object in the powerpoint document. Insert- Object- Create from file- Browse the file and display as icon. We get the error: " The server application, source file, or item can't be found,

  • Misplaced keywords in catalog. photoshop elements 10.

    Moved some catalog keywords but do not know where.  How can I locate them. I know their names from below each photo.