SQL 7 - Oracle 8i - NOT NULL dropped for IDENTITY column

It appears that OMWB is dropping the NOT NULL condition for columns defined as IDENTITY in SQL server 7.
SQL code to create table:
CREATE TABLE [dbo].[PCPrsnCorp] (
[PrsnCorpId] [int] IDENTITY (1, 1) NOT NULL ,
[PrsnCorpTpEnum] [tinyint] NOT NULL ,
[Name] [varchar] (128) NOT NULL ,
[NameFirstIdx] [smallint] NULL ,
[NameMidIdx] [smallint] NULL ,
[NameLastIdx] [smallint] NULL ,
[NameSuffixIdx] [smallint] NULL ,
[NameLine2Idx] [smallint] NULL ,
[CmpyId] [smallint] NULL ,
[ClsnId] [int] NOT NULL
) ON [PRIMARY]
GO
OMWB migration script:
REM
REM Message : Created Table :sa.PCPRSNCORP
REM User : system
CREATE TABLE sa.PCPRSNCORP(PRSNCORPID NUMBER (10,0) ,PRSNCORPTPENUM NUMBER
(3,0) NOT NULL,NAME VARCHAR2 (128) NOT NULL,NAMEFIRSTIDX NUMBER (5,0)
,NAMEMIDIDX NUMBER (5,0) ,NAMELASTIDX NUMBER (5,0) ,NAMESUFFIXIDX NUMBER
(5,0) ,NAMELINE2IDX NUMBER (5,0) ,CMPYID NUMBER (5,0) ,CLSNID NUMBER
(10,0) NOT NULL) TABLESPACE ORACLEFULL
NOT NULL appears to be handled correctly if colummn is not defined as IDENTITY. Is there a patch, workaround, or OMWB option to get past this?

Currently, the Migration Workbench converts IDENTITY columns into a BEFORE INSERT trigger and an Oracle sequence.
This trigger will fire prior to any INSERT statement executing against the table. The trigger inserts the next value of the defined sequence into the converted IDENTITY column.
The NOT NULL column attribute is therefore no longer needed.
Strictly speaking, it would do no harm to keep the NOT NULL column attribute and so I will log a bug on your behalf.
Thanks for the info.
Brian.

Similar Messages

  • How to create a single 'not null ' validation for all the items in a page ?

    Hi everyone ,
    how to create a single 'not null ' validation for all the items in a page ? I have many textfields . Instead of creating 'not null' validation for each item , I would like to create a a single validation control that will serve the purpose
    Thanks & Regards
    Umer

    Nice1 wrote:
    bob , as u said I have done the following :
    1) under create button , there are 9 items and for each item I have set Required to 'Yes'
    2) under delete button , there is 1 item and have set Required to 'Yes' for the item
    3) defined page validation for 9 items under 'create ' button and have set it to fire when 'create ' button clicked
    4) defined page validation for 1 item under 'delete ' button and have set it to fire when 'delete ' button clicked
    now , when I click 'create' button it even shows for the item under 'Delete ' button that it is a required itemSorry, I didn't see this note. The required template won't work, there is no way to attach it to the button.
    The best solution is as the reply a couple replies up
    Create 2 page type validations as a PL/SQL with code
    1st validation
    :P1_ITEM1 IS NOT NULL and :P1_ITEM2 IS NOT NULL ...... and :P1_ITEM9 IS NOT NULL  include all 9 items
    Set the When Button Pressed to the CREATE button
    2nd validation
    :P1_ITEM10 IS NOT NULL
    Set the When Button Pressed to the DELETE buttonI think that's going to be the easiest way to do it.
    Edited by: Bob37 on Apr 27, 2012 12:02 PM

  • Pro*C & SQLDA with NULL value for predicate column

    Hi: I am using a C program to update a table via a dynamic sql (method 4) and SQLDA. In the update statement predicate, I have place holders (as in TBLCOL=:C000). One of the columns in the predicate contains null values, so I set L[n] = 0, V[n] = pData (which pData[0] = '\0'), *(I[n]) = -1, and T[n] = 5 (for text). I cannot find the row that I know is there.
    I cannot change my statement to contain TBLCOL IS NULL, since I don't know ahead of time if I'm looking for rows with null values for this column. The Pro*C manual says that by setting the appropriate *(I[n]) = -1, it indicates to Oracle to simulate the "IS NULL" clause, and update the appropriate rows. In my case, I receive 1403 as SQLCODE when I use TBLCOL=:C000 vs TBLCOL IS NULL. What am I doing wrong? Thank you for your help.

    You should include these columns as well;
    ChangeType (see mxi_changetype)
    ValOwner (repository)
    UserID ("jobid=<>", usermskey, GUI (mmc), DG (dyngrp), reconcile)
    IdAudit  (This is the event task (add and del member for assignments)
    ParentAuditId (AuditID of parent which last updated the attribute, not consistent)
    ChangedBy (Holds the MSKEY of the user which last changed the attribute)
    ExpiryTime
    to make sure you get a fuller picture of the audit record.
    Your selection does not cover all events and descriptions
    br,
    Chris

  • Need to count number of non-empty (not null) occurrences for an element in XML

    Hello,
        I have some XML data stored in a CLOB, there is a fragment shown below:
    <ADDR>
    <AutoNameOfOrganisation>2nd Image</AutoNameOfOrganisation>
    <AutoLine1>105 Risbygate Street</AutoLine1>
    <AutoLine2> </AutoLine2>
    <AutoLine3> </AutoLine3>
    <AutoU40.16>BURY ST. EDMUNDS</AutoU40.16>
    <AutoStateOrCounty>Suffolk</AutoStateOrCounty>
    <AutoU40.13>IP33 3AA</AutoU40.13>
    <AutoU40.14>UNITED KINGDOM</AutoU40.14>
    </ADDR>
    <ADDR>
    <AutoNameOfOrganisation></AutoNameOfOrganisation>
    <AutoLine1>2 2nd Avenue</AutoLine1>
    <AutoLine2> </AutoLine2>
    <AutoLine3> </AutoLine3>
    <AutoU40.16>HULL</AutoU40.16>
    <AutoStateOrCounty>East Riding of Yorkshire</AutoStateOrCounty>
    <AutoU40.13>HU6 9NT</AutoU40.13>
    <AutoU40.14>UNITED KINGDOM</AutoU40.14>
    </ADDR>
       What I would like to do is to be able to look at the whole of the xml and derive a count for a particular element where there is data .
       In the above case <AutoNameOfOrganisation> is not null in the first record and null in the second whilst <AutoLine3> is null in both records, so I'd like the counts to be 1 for <AutoNameOfOrganisation> and 0 for <AutoLine3>.
       The reason for this is so that I can avoid showing a column in a report if there is no data for that particular column in the results.
       I'm using Oracle 11G.
    Thanks for any help,
    Chris

    Here's one way :
    select count(AutoNameOfOrganisation)
         , count(AutoLine3)
    from my_table t
       , xmltable(
           '/root/ADDR'
           passing xmlparse(document my_clob)
           columns AutoNameOfOrganisation varchar2(30) path 'normalize-space(AutoNameOfOrganisation)'
                 , AutoLine3              varchar2(30) path 'normalize-space(AutoLine3)'
         ) x ;
    In your sample fragment there's no root element so I've added one to test the query (though it's also possible to work with real XML fragments).
    You may also omit normalize-space() calls if empty nodes are really empty. In your sample, there's a whitespace so I've added the function to strip it off.

  • ORA-06502: PL/SQL with Oracle XE (not with sqldeveloper)

    I have this error message with Oracle XE whereas I have no message at all with the same request if I use sqldeveloper.
    It seems that the error happens when there is too many information returned by the request. If I add a "where" to select less rows, I don't have the error anymore.
    Do you know how I can solve this problem?
    Thanks in advance for your answers.
    Richard

    The problem is happening again.
    When it happens, if I quit and I start again Oracle XE, the problem does not happen at first, but happens again after a while (the duration before the error is not always the same). If I increase the number of lines that are printed for the result of a request, I can induce the error; if I decrease the number of lines, the error is not happening.
    Here is one of the request (that request returns about 5000 rows) that cause the error, and the complete error message:
    ORA-06502: PL/SQL : erreur numérique ou erreur sur une valeur: tampon de
    chaîne de caractères trop petit
    Translation: buffer for the strings is too small.
    select code_pers, nom, prenom, titre, sexe,
    date_naissance, pays_nationalite.code_pays_iso,
    fonction_institution, code_institution,
    complement_adresse_institution, complement_tel_institution,
    adresse1_perso_debut, adresse2_perso_rue, adresse3_perso_zip_ville,
    pays_adresse.code_pays_iso,
    tel_perso, email, site_web, fax,
    lower(substr(langue_courrier, 1, 2)),
    case
    when (adresse_courrier_preferee = 'P') then 'p'
    when (adresse_courrier_preferee = 'I') then 'i'
    else null
    end,
    contact_rapide, discipline,
    case
    when (voeux = 'Vrai') then 'o'
    when (voeux = 'Faux') then 'n'
    else null
    end,
    nb_plaquettes, nb_affiches, date_modif
    from personne2 join pays2 pays_nationalite
    on personne2.nationalite = pays_nationalite.NOM_PAYS
    join pays2 pays_adresse
    on personne2.pays_perso = pays_adresse.NOM_PAYS

  • SQL*Developer 2.1 - Not Generating DDL for Different Users

    Using SQL*Developer Version 2.1.0.63 I get an error trying to generate DDL from another user, that has access to many other schemas. It looks to me like Sql Developer is calling the DBMS_METADATA package from within other PL/SQL.
    I am receiving the following error:
    ORA-31603: object "ACCOUNT_TYPE_LKP" of type TABLE not found in schema "POR_OWN"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 3241
    ORA-06512: at "SYS.DBMS_METADATA", line 4812
    ORA-06512: at line 1
    I would receive these same errors in SQL Developer 1.5, but the DDL would still generated. It was picking something up, even though it had an error.
    Our DBA has not been able to provided a work around. He says you have to login directly as the owner of the objects to use dbms_metdata in this fashion.
    Is there any work around for this? I really need to be able to get DDL and I do not want to go back to 1.5 (I like the other new features of 2.1).
    Thanks,
    Tom

    We have several users currently using SQL Navigator and/or TOAD. We would like them to switch to SQL developer, but part of their job is to view the source of views in another schema. They have select privileges on the underlying tables and are able to see the source using other tools. Using SQL Developer, they receive on ORA-31603 because it's calling dbms_meta. Note ID 1185443.1 describes the issue and suggests granting the users the SELECT_CATALOG_ROLE.
    We are hesitant about granting this role to these users which allows access to ever 1,700 objects, plus execute privileges to 4 objects.
    Support indicated that Enhancement Request 8498115 addresses this issue.
    Is this something that may be addressed in the next release?
    Thanks,
    Paul

  • Oracle CDC Not able Drop change table

    Hi ,
    we are trying to execute "DROP_CHANGE_TABLE" prcoedure inorder to drop the change table, However we are stuck with below error
    ORA-06550: line , column :
    ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 1014
    ORA-06512: at line 1
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    exec DBMS_CDC_PUBLISH.DROP_CHANGE_TABLE ('SCHEMA_NAME' , 'TABLE_NAME', 'Y');
    Can someone please let me know what could cause this issue?

    Some of the CDC settings were corrupted we had to delete the data from the dictionary tables and then create the change sets and change tables again.

  • Alternative to Drag and Drop for "identity" copying cells?

    hi all.
    right now when i want an "identity copy" of a single cell i do an equation where i enter the equals size and i click in the cell i need. this maintains a link with the original cell.
    right now i need multiple cells (like five in a row) to get "identity copied" to a set of five new destination cells.
    is there a way to do this so that i don't have to /drag/ the origination selection all the way down my spreadsheet or is this the only way to do it?
    i have about 800 rows to travel and i have to do this about thirty times and it is going to get really tiresome.
    i tried copy paste but it just entered five cells with "0.00" for some reason likely having to do with it being a copy of the format of the cell but not the actual content...
    TIA for any advice or terms or search words etc

    HW,
    It is time for you to download the manual and read the material in chapter six.
    http://support.apple.com/manuals/#productivitysoftware
    This manual is still usaeble for understanding how to select cell, reference cells and copy and paste.  If is free and downloadable AND you can search it-- if you know the terms to search.  It is a valuable tool. 
    when they are contiguous in both the source and destination, you can select the one, then copy, then select the grounp and paste.
    In this example there are two tables:
    1) a source table
    2) s destination table
    in the destination table highlight cell A1 then type the "=" (equal sign) :
    now click the cell in the source table (A1):
    Now hit the return key.  Select cell A1, copy.  Now select the whole table (or the group of cells you want to reference in the Source table).  In this example select all.  To select all use the menu item "Edit > Select All":
    Now paste:
    If you only wanted to reference A1, A3, B4, B6, and B8 you would enter the formula in any cell you want-- I choose A1.  Then you select A1, copy, then hold the command key then click those cells, then paste:

  • Query not showing result  for 1st column

    dear all,
    i want to show the result row for my query for the 1st column...
    e.g. i have column cost center, po number and vendor both po number and vendor will show the result column but not cost center.. any idea why?
    here are my bex settings for cost center
    supression = never, normalization = no normalization.

    Hello -
    You check for costcenter data in the data targets, for the given PO and vendors,.
    If data exists then it should be available in the reports,.
    Else it won't .
    Regards,
    Vishwa

  • NULL in not null column

    Hi,
    I have a table
    SQL> desc tabula.M$$USERS;
    Name Null? Type
    USERLOGIN NOT NULL VARCHAR2(20)
    PASSWORD NOT NULL VARCHAR2(30)
    T$USER NOT NULL NUMBER(38)
    USERNAME NOT NULL VARCHAR2(30)
    USERID NOT NULL NUMBER(38)
    USERGROUP NOT NULL NUMBER(38)
    T$LINKID NOT NULL VARCHAR2(50)
    password column is not null.
    Application get ORA-01400 (can't insert to null into not null colum) and also when I run -
    Edited by: user10237262 on Nov 29, 2011 12:54 AM

    Hi welcome to forum
    see below example
    SQL> create table t(empno number(4) not null, ename varchar2(10))
      2  /
    Table created.
    SQL> insert into t values(100,'abc');
    1 row created.
    SQL> insert into t values(200,'def');
    1 row created.
    SQL> insert into t values(null,'def');
    insert into t values(null,'def')
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("SYSTEM"."T"."EMPNO")
    SQL> desc t
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    SQL>"Null?" tells the perticular column is null or not...
    Usage
    The description for tables, views, types and synonyms contains the following information:
    each column's name
    whether or not null values are allowed (NULL or NOT NULL) for each column
    refer:
    http://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12019.htm
    Edited by: newbie on Nov 29, 2011 12:54 AM

  • NOT and NOT NULL constraints

    I saw this posted on Metalinks and the answer was to be found here. I can't seem to find it..... has there been a resolution to this? Unfortunately, I am running into the same problem.
    You help is appreciated.
    I am trying to create Oracle8i schema from MS SQL Sercer 7.0 using Oracle Migration Workbench and it is not functioning as expected.
    Problems are:
    =============
    1. If the column type is CHAR OR VARCHAR in MS SQL Server and the integrity contraints is NOT NULL or NULL, in Oracle8i it create as NULL only and it not taking the NOT NULL in MS SQL Server to Oracle8i NOT NULL. I can say that it is ignoring the integrity constraint for CHAR OR VARCHAR type while converting to Oracle8i.
    Example in MS SQL Server
    ========================
    CREATE TABLE emp (
    emp_name CHAR(10) NOT NULL
    the tool converts to Oracle8i as
    CREATE TABLE emp (
    emp_name CHAR(10)
    It is ignoring the NOT NULL constraints in Oracle8i and it is happening only for CHAR and VARCHAR data type. Can anyone help me on this how to rectify the problem in Migration Workbench. ....... "

    We reported this for the EA's, but got little response and obviously no resolution.
    K.

  • Handling "NOT NULL" in forms(4.5)

    Hi everbody,
    I am working in forms4.5,oracle 7.3 in winNT. I had some columns
    which were defined as NOT NULLs in the database. When I tried
    loading data into them I got an error.I found that there were no
    values for those columns in the datafile. So removed the NOT
    NULLs from the columns and loaded the data. These were the old
    datas. Now I should change the columns back to NOT NULLs as the
    new datas has to follow them. How will I handle the old datas in
    the form? I want the NOT NULL columns to be diplayed as blanks
    instead of showing some error.i.e when a primary key value is
    entered (if it is already present in the old data) then a blank
    should be displayed in those not null columns. How will I do
    this?
    Any help is appreciated.
    Thanks in advance,
    satish
    null

    satish (guest) wrote:
    : Hi everbody,
    : I am working in forms4.5,oracle 7.3 in winNT. I had some
    columns
    : which were defined as NOT NULLs in the database. When I tried
    : loading data into them I got an error.I found that there were
    no
    : values for those columns in the datafile. So removed the NOT
    : NULLs from the columns and loaded the data. These were the old
    : datas. Now I should change the columns back to NOT NULLs as the
    : new datas has to follow them. How will I handle the old datas
    in
    : the form? I want the NOT NULL columns to be diplayed as blanks
    : instead of showing some error.i.e when a primary key value is
    : entered (if it is already present in the old data) then a blank
    : should be displayed in those not null columns. How will I do
    : this?
    : Any help is appreciated.
    : Thanks in advance,
    : satish
    If you genuinely have some rows for your table where there are no
    values for particular columns then you should leave the columns
    null-enabled. This sounds to be the case here - a column does
    not have to be defined as NOT NULL in order for data to be
    entered; you will be able to enter your new data for these
    columns even though they are not defined as NOT NULL.
    In any case, while you have existing rows in the table with null
    values for these columns, the SQL engine will not allow you to
    change the columns to be NOT NULL.
    Hope this helps,
    Stuart Housden
    null

  • Order Of Null and Not Null Values while table creation

    We have to create a table with 10 fields .5 of them are Null and Not Null. Now my question what should be the order of fileds??.Means Null Fields will come first or Not Null.

    The only reason I can think of having the NULL columns at the end is storage space.
    To conserve space, a null in a column only stores the column length (zero). Oracle
    does not store data for the null column. Also, for trailing null columns, Oracle does
    not even store the column length.

  • Script or query to generate a report of null or not null columns

    I need a script/query it should pick up all the tables from user_tab_columns and produce a report for all the tables which are the columns are null and not null.

    As long as the columns were defined as NOT NULL on table create, or ALTERed NOT NULL, you can do this:
    SQL> CREATE TABLE t (id NUMBER NOT NULL, descr VARCHAR2(10));
    Table created.
    SQL> SELECT column_name, table_name, nullable
      2  FROM user_tab_columns
      3  WHERE table_name = 'T';
    COLUMN_NAME                    TABLE_NAME                     N
    ID                             T                              N
    DESCR                          T                              Y
    SQL> ALTER TABLE t modify (descr NOT NULL);
    Table altered.
    SQL> SELECT column_name, table_name, nullable
      2  FROM user_tab_columns
      3  WHERE table_name = 'T';
    COLUMN_NAME                    TABLE_NAME                     N
    ID                             T                              N
    DESCR                          T                              NNote that if you do:
    ALTER TABLE t ADD CONSTRAINT id_nn CHECK (id IS NOT NULL);then the nullable column in xxx_tab_columns will remain as Y.
    HTH
    John

  • NULLABLE column is not updated after the NOT NULL constraint definition...

    Hi,
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    SQL> ALTER TABLE EMP add constraint emp_job_nn check(job is not null);
    Table altered
    SQL> select constraint_name from all_cons_columns
      2  where table_name='EMP';
    CONSTRAINT_NAME
    FK_DEPTNO
    PK_EMP
    EMP_JOB_NN
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y                         <---------'NULL'
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    Why is not updated....????
    In Oracle ebook:
    Oracle® Database Reference
    10g Release 2 (10.2)
    Part Number B14237-02
    the comments about the NULLBLE column are as follows:
    "Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in an ENABLE VALIDATE state."
    BUT BY DEFAULT ALL CONSTRAINTS ARE IN VALIDATE STATE
    (Ref: Oracle® Database SQL Reference
    10g Release 2 (10.2)
    Part Number B14200-02 )Note : I use OraDB 10g v.2
    Thanks a lot
    Sim

    Hi,
    Tom Kytes answer it before:
    SQL> create table t ( id int );
    Table created.
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    SQL> alter table t add constraint t_nn check (id is not null);
    Table altered.
    SQL> insert into t (id) values (null);
    insert into t (id) values (null)
    ERROR at line 1:
    ORA-02290: check constraint (TANDREWS.T_NN) violated
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    Followup July 16, 2003 - 10am US/Eastern:
    that is not a NOT NULL constraint, that is a check constraint
    ops$tkyte@ORA920LAP> create table t ( x int );
    Table created.
    ops$tkyte@ORA920LAP> alter table t modify x not null;
    Table altered.
    ops$tkyte@ORA920LAP> set linesize 50
    ops$tkyte@ORA920LAP> desc t
    Name                    Null?    Type
    X                       NOT NULL NUMBER(38)To see the full thread in asktom, please refer to:
    - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1338402651192
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

Maybe you are looking for

  • Problem in converting to PDF

    Hi, i am facing a strange problem while converting the book file to pdf... Error message: %%[ ProductName: Distiller ]%% %%[Page: 1]%% %%[Page: 2]%% %%[ Error: ioerror; OffendingCommand: readstring ]%% Stack: (====;;;;;;::::9998877755554444222222222-

  • Compressor: How do you keep the file name the same?

    Hello, I am wondering if there is a way in Compressor to compress a file WITHOUT changing its name. I don't want the spacifics in the new media title For instance, A007_C010_0216HX.mov becomes A007_C010_0216HX-Apple ProRes 422.mov Thank you!

  • Can't send e-mail, receiving OK

    Out of the blue today I am suddenly unable to send e-mail.  If I go to mail/preferences/accounts, my smtp server shows "smtp.xxx.net(offline)"... xxx used to replace actual name.  A call to my ISP resulted in finding out that they are having no issue

  • Getting message "file cannot be found" when trying to play music in iTunes

    When trying to play ANY music in my iTunes Library I get the message that the file containing the music cannot be found. I recently updated to the latest version of iTunes - is this the problem or is it something else?? I thought that at least the so

  • Photomerge won't "see" my files

    PS CS4 - I made a panorama with five 16bit RAW files. Perfect. Ever since neither PS nor Bridge will see my selected files. Bridge says "PS needs at least 2 files selected." I have five selected. When I try photomerge in PS it says "tmp00000001". Any