Finding Columns with only NULL as values

I have a list of tables around 30 in number. Among them i need to generate a report with Table Name and Column Names, for which all values are NULL.
In other words, i need to find all the columns for which all the values are NULL.
I thought of dealing it with cursors, and comparing the total count with null count in each column. But i need to loop "Number of columns" times. Is there any better way to do this?

I think your way is a good solution. It has the advantage that you can check several columns in one select.
select count(*), count(col1), count(col2) ... from mytabAnother approach could be to check statistical information about your table data.
However this will not give you always the correct data.
It depends on the time of the last statistic collection, the sample size and on the detail level.
Here is a sample statement to play with:
select owner, table_name, column_name, num_distinct, num_nulls, num_buckets, sample_size, low_value, high_value
from all_tab_columns
where owner not in ('SYS','SYSTEM')
and nullable = 'Y' -- null values allowed
and num_distinct = 0 -- only nulls found
--and density = 0
;Note that this select would not return tables for which no statistics had been calculated. Num_distinct is NULL in such a case.
Edited by: Sven W. on Feb 11, 2010 2:50 PM

Similar Messages

  • Problem in summation on a column with possible null values

    Hi,
    I want to do summation on a column.
    If I use <?sum(amount)?>, if there is any null value,its giving NaN as output.
    From the forum I got the below syntax
    <?sum(AMOUNT[number(.)!='NaN'])?>
    but it is also not giving me the expected result. Its always displays 0.
    I want some thing like sum(NVL(amount,0)). Could some body please help me out?
    Thanks in Advance,
    Thiru

    If the column has many, many null values, and you want to use the index to identify the rows with non-null values, this is a good thing, as a B*Tree index will not index the nulls at all, so, even though your table may be very large, with many millions of rows, this index will be small and efficient, cause it will only contain index entries for those rows where the column is not null.
    Hope that helps,
    -Mark

  • Find columns which are null

    Hello all, I am currently developing a data warehouse that holds time-series values. In the 5-min interval fact table, there is a column for every 5-minute segment of a 12 hour period. So I have a few foreign keys which make up a composite primary key in the fact table, followed by generally-named columns m0,m5,m10...m1145,m1150,m1155 (m0 represents 00:00 [12:00] and m1155 represents 11:55). There is a flag in the row to denote AM or PM. This database collects various metrics from a Coherence environment for a live monitoring solution that also has a Historian to track trends, get a graphical historical overlay against the current values coming into the live environment, etc.
    So I have this table with aggregation at a 5 minute level and will need to roll this up to hourly and daily aggregation levels during an ETL process. I'd like to be able to pinpoint which data, if any, has holes in it IE the collectors hiccupped somewhere for whatever reason and did not report a 5 minute segment to me.
    Is there anyway to find rows which have null values and to report back which column names contain null values? A use case would be that I have a row in the 5 min fact table that contains a null value for column m455, which means that there is a gap in my time series at the 4:55 hour for that object. During ETL roll ups, I'd like to be able to record which time slot has "holes", or null values in them so that we can pinpoint why they occur to prevent them from occurring again during the development process of this solution.
    Thanks for anyone's help!!
    Regards,
    TimS

    TimS wrote:
    create table f_metric_5_min (
         metric_key number(10) not null,
         object_key number(19) not null,
         date_key number(5) not null,
         segment_id number(1) not null,
         m0 number(19,4),
         m5 number(19,4),
         m10 number(19,4),
         m15 number(19,4),
         m20 number(19,4),
         m25 number(19,4),
         m30 number(19,4),
         m35 number(19,4),
         m40 number(19,4),
         m45 number(19,4),
         m50 number(19,4),
         m55 number(19,4),
         m100 number(19,4),
         m105 number(19,4),
         m110 number(19,4),
         m115 number(19,4),
         m120 number(19,4),
         m125 number(19,4),
         m130 number(19,4),
         m135 number(19,4),
         m140 number(19,4),
         m145 number(19,4),
         m150 number(19,4),
         m155 number(19,4),
         m200 number(19,4),
         m205 number(19,4),
         m210 number(19,4),
         m215 number(19,4),
         m220 number(19,4),
         m225 number(19,4),
         m230 number(19,4),
         m235 number(19,4),
         m240 number(19,4),
         m245 number(19,4),
         m250 number(19,4),
         m255 number(19,4),
         m300 number(19,4),
         m305 number(19,4),
         m310 number(19,4),
         m315 number(19,4),
         m320 number(19,4),
         m325 number(19,4),
         m330 number(19,4),
         m335 number(19,4),
         m340 number(19,4),
         m345 number(19,4),
         m350 number(19,4),
         m355 number(19,4),
         m400 number(19,4),
         m405 number(19,4),
         m410 number(19,4),
         m415 number(19,4),
         m420 number(19,4),
         m425 number(19,4),
         m430 number(19,4),
         m435 number(19,4),
         m440 number(19,4),
         m445 number(19,4),
         m450 number(19,4),
         m455 number(19,4),
         m500 number(19,4),
         m505 number(19,4),
         m510 number(19,4),
         m515 number(19,4),
         m520 number(19,4),
         m525 number(19,4),
         m530 number(19,4),
         m535 number(19,4),
         m540 number(19,4),
         m545 number(19,4),
         m550 number(19,4),
         m555 number(19,4),
         m600 number(19,4),
         m605 number(19,4),
         m610 number(19,4),
         m615 number(19,4),
         m620 number(19,4),
         m625 number(19,4),
         m630 number(19,4),
         m635 number(19,4),
         m640 number(19,4),
         m645 number(19,4),
         m650 number(19,4),
         m655 number(19,4),
         m700 number(19,4),
         m705 number(19,4),
         m710 number(19,4),
         m715 number(19,4),
         m720 number(19,4),
         m725 number(19,4),
         m730 number(19,4),
         m735 number(19,4),
         m740 number(19,4),
         m745 number(19,4),
         m750 number(19,4),
         m755 number(19,4),
         m800 number(19,4),
         m805 number(19,4),
         m810 number(19,4),
         m815 number(19,4),
         m820 number(19,4),
         m825 number(19,4),
         m830 number(19,4),
         m835 number(19,4),
         m840 number(19,4),
         m845 number(19,4),
         m850 number(19,4),
         m855 number(19,4),
         m900 number(19,4),
         m905 number(19,4),
         m910 number(19,4),
         m915 number(19,4),
         m920 number(19,4),
         m925 number(19,4),
         m930 number(19,4),
         m935 number(19,4),
         m940 number(19,4),
         m945 number(19,4),
         m950 number(19,4),
         m955 number(19,4),
         m1000 number(19,4),
         m1005 number(19,4),
         m1010 number(19,4),
         m1015 number(19,4),
         m1020 number(19,4),
         m1025 number(19,4),
         m1030 number(19,4),
         m1035 number(19,4),
         m1040 number(19,4),
         m1045 number(19,4),
         m1050 number(19,4),
         m1055 number(19,4),
         m1100 number(19,4),
         m1105 number(19,4),
         m1110 number(19,4),
         m1115 number(19,4),
         m1120 number(19,4),
         m1125 number(19,4),
         m1130 number(19,4),
         m1135 number(19,4),
         m1140 number(19,4),
         m1145 number(19,4),
         m1150 number(19,4),
         m1155 number(19,4),
         constraint f_metric_5_min_pk primary key (metric_key, object_key, date_key, segment_id),
         constraint f_metric_5min_fk_metric_key foreign key (metric_key) references d_metric (metric_key),
         constraint f_metric_5min_fk_object_key foreign key (object_key) references d_object (object_key),
         constraint f_metric_5min_fk_date_key foreign key (date_key) references d_date (date_key)
    ) partition by range(date_key) (
         PARTITION def values less than (2558)
    ) tablespace FACT;The reason to define separate columns for time intervals is because need to see data coming from Coherence enviroment in 5 minute intervals, creating a row for each 5 min interval for each object (thousands) is too time-consuming. Using MERGE is much faster to update columns in the same row. And secondly, because my job tells me to go with this logical model :).
    I can understand the "job-tells-me" reason but not sure am convinced with the "time-consuming" issue,
    especially as it is a datawarehouse. But I assume you must have verified the same.:)
    The NULL-finding exercise will be done after the data is loaded into the 5 minute metric table and before the hourly roll-up ETL.
    Not sure what you mean in what format, I plan to build a list and place them into a form of auditing table within the database that will be queried in the future to determine where the gaps are and for what objects so that we can trace them back to a certain JVM and coherence collector and fix the issue from occuring again; hence the point of a monitoring tool.
    Storing time in a table can take up a lot of space and is harder to compute procedurally. In this model the database does not care about the time, only the data; the date and time is not a focal point for this database, the database is abstract, with the Java behind it controlling the purpose of its data. The reporting engine after-the-fact cares about dates and such which can be easily determined by referencing to dimension tables to determine which column represents which time in the 12 hour sequence.
    Going back to the "null-finder" do you think there is any way to do this? Thanks for your help!
    Regards,
    TimSDo you mean that you want to get only those columns where there is a NULL value, for a record-at-a-time ?
    In that case, the only option that I can think of is building a Dynamic SQL, based on checking whether each column has a NULL value or not. Although, I hope somebody can come up with a better way to achieve the same.
    (Else, your not considering "time-consuming" approach above becomes not much of advantage, isn't it ?) :)
    (Of course, only if "null-finding" is a MUST exercise...)

  • List all columns having only nulls from all tables in a database.

    I want to select columns from all tables having only null values. Each table has 60+ columns and i have 100+ tables in database. Requesting a script to list all tables at a time and their columns having all nulls? Below is my expected output. Thank
    you in advance !
    Table name
    Null valued Column
    Address
    Address Line 2
    Address
    Address Line 3
    Address
    Zip Code
    Product
    Product Desc
    Product
    Product SKU

    Hello,
    In addition to Naomi's reply, you can refer to the following links about loop through all the tables in the database:
    http://www.codeproject.com/Tips/161663/Loop-through-all-tables-in-SQL-Server
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/07b9799e-aeab-442e-99a0-ba76ab051f59/looping-through-databases-and-count-the-number-of-items-in-a-specific-table?forum=transactsql
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • SELECT to find records with only one word

    What function should I use to find all rows where a particular column has only one word in it? It's a 'Contact Person' column, but the data there is not neccessarily First Name space Last Name...

    If your definition of "One Word" means that the column doesn't contain a space,
    you could do something like this:
    select * from YourTable
    where Instr(Trim(ContactPerson), ' ') = 0;Message was edited by:
    dccase

  • Fastest way to find parents with only one child?

    I have two very large tables (both >6 million rows) in an oracle 8i DB. They have a parent child relationship and I would like to construct a query to give me the parents that have only one child......syntactically, what's the best way to construct this query?
    I was going to try:
    select join_id
    FROM parent
    where join_id in (select join_id, count(join_id)
    FROM child
    group by join_id
    having count(*)=1)
    but then I realized that the subselect has two columns to return and the primary query is only expecting one column, so this will not work.
    I suspect there's a quick and dirty way to find out what parents have only one child....
    I thought of using rowid's but am not sure this is the best way and in the example below I tried, I'm having problems b/c of functions not being allowed in the where clause.....
    select join_id
    from child d
    where rowid in (select min(rowid)
              FROM child s
              WHERE min(d.rowid)=max(s.rowid)
              AND s.join_id=d.join_id))
    Any thoughts?

    The two tables are order_header and order_detail. The order_header carries order specific information and the detail contains item specific information.
    So if you had ordered three separate products, you would have:
    one row in the order_header table (parent)
    and three rows in the order_detail table (child)
    They are linked by order_number.
    I presented the problem this way to make it more accessible to more posters.....;)
    One possible solution that I've thought of for my problem is this:
    select join_id
    from child_table d
    where (d.rowid, d.rowid) IN (select min(rowid) MIN_ROW
                   ,max(rowid) MAX_ROW
                   FROM child_table
                   WHERE s.str_order_number=d.str_order_number
                   AND s.date>='30-JAN-2005'
                   AND s.date<='31-JAN-2005'))
    I think this might work because I think that we can safely assume that if the minimum rowid and the maximum rowid (with the same join_id ) are the same then there is only one child record.....is this logic correct?

  • Updating a DB table with only non-empty values of a work area

    Hi everybody,
    Is that possible in ABAP to update a table in the database with a work area, but only with non-empty values of this work area?
    Example:
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    ls_custom-FIRSTNAME = ' '.
    ls_custom-CURRENCY = ' '.
    update ZCUSTOMERS_0 from ls_custom.  *" I want that the update clause don't do the update with FIRSTNAME  and CURRENCY fields because they have empty values*
    If it's possible, how to do it?
    Thanks & regards,
    Abdel

    Total Questions:  81 (66 unresolved)
    Hi,
    To my understanding you mean if the database table has values
    customer         20
    lastname          somename
    firstname         firstname
    currency          INR
    so now after this
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    ls_custom-FIRSTNAME = ' '.
    ls_custom-CURRENCY = ' '.
    update ZCUSTOMERS_0 from ls_custom.
    you want the result as
    customer         20
    lastname          Myname
    firstname         firstname
    currency          INR
    Is it so? Then Normal update
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    update ZCUSTOMERS_0 from ls_custom.
    would do that.
    Thanks,
    Sri.

  • How can I make an Equation apply to an entire column, but only use the values in the specific rows?

    I am working on a research project using Numbers 09 and have columns for values that require me to use formulas using values in other columns. Becuase I am lazy and have 180 rows of data, I would like to find a way to have a formula apply to an entire column so that I don't have to go row by row inputting the formula.
    Essentially, I want to be able to have N(X)=F(X)+G(X). Where X is the row number. Is this possible?
    The real formula I want to have is (4*(F(X))^2)/G(X)
    Thanks! 

    Place this formula in your chosen column in the first row containing data in columns F and G.
    =(4*F^2)/G
    Press enter to confirm the entry. The result will appear in the cell.
    Click (once) on the cell containing the formula.
    Shift Click on the cell in the same column on the last row containing data in F and G to select all cells between. .
    Go Insert > Fill > Fill down.
    Done.
    Regards,
    Barry

  • Update table column with same auto-increment value, via T-SQL stored procedure

    Good Evening to every one,
    I have a table 'Contracts' as we can see in the picture below (I exported my data on An Excel Spreadsheet). Table's primary key is 'ID' column.
    I am trying to create a stored procedure (i.e. updContractNum), through which I am going to update the 'Contract_Num' column, in every row where the values on Property_Code, Customer, Cust_Category and Amnt ARE EQUAL, as we can see in the schema above.
    The value of Contract_Num is a combination of varchar and auto_increment (integer). For example, the next value on 'Contract number' column will be 'CN0005' for the combination of 11032-14503-02-1450,00
    I' m trying to use CURSORS for this update but I am new in using cursors and I am stuck in whole process. I atttach my code below:
    CREATE PROCEDURE updContractNum
    AS
    --declare the variables
    DECLARE @CONTRACT_NUM VARCHAR(10); -- Contract Number. The value that will be updated on the table.
    DECLARE @CONTRACT INTEGER; -- Contract number, the auto increment section on contract number
    DECLARE @CONTR_ROW VARCHAR(200); -- Contract row. The row elements that will be using on cursor
    DECLARE CONTRACT_CURSOR CURSOR FOR -- Get the necessary fields from table
    SELECT PROPERTY_CODE, CUSTOMER, CUST_CATEGORY, AMNT
    FROM CONTRACTS;
    OPEN CONTRACT_CURSOR -- open a cursor
    FETCH NEXT FROM CONTRACT_CURSOR INTO @CONTR_ROW
    WHILE @@FETCH_STATUS = 0 -- execute the update, for every row of the tabl
    BEGIN
    --update Contract_Num, using the format coding : contract_number = 'CN' + 0001
    UPDATE CONTRACTS
    SET CONTRACT_NUM = 'CN'+@CONTRACT_NUM+1
    END
    CLOSE CONTRACT_CURSOR
    Thank you in advance!

    You dont need cursor
    You can simply use an update statement like this
    UPDATE t
    SET Contract_Num = 'CN' + RIGHT('00000' + CAST(Rnk AS varchar(5)),5)
    FROM
    SELECT Contract_Num,
    DENSE_RANK() OVER (ORDER BY Property_Code,Customer,Cust_category,Amnt) AS Rnk
    FROM table
    )t
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to find roles with certain org field values?

    agr_1252 holds its values in Low and High fields.   So if I want to discover roles giving visibility to certain $RSINFOAREA such as LRDR* and MRT, how to do it?   Most roles in our system use ranges in the org.fields, such as 0DA - ZL*, so I would need to identify these and change the ranges to prevent visibility to our sensitive infoareas.   But I don't see a way to do this with SQVI and there are no canned reports in SUIM.   Has anyone faced and solved this b4?

    Hi
    It seems to me at least on my system that RSINFOAREA is not an org element field - and in your landscape it has been changed into an org field. You can receive values of RSINFOAREA field either from agr_1251 or agr_1252 - depending upon the status of the field. Now after you have obtained value in ranges - you can see the exact individual values contained in ranges through table RSDAREA (Directory of InfoAreas) - hope this will help you.
    Best Regards
    Prashant

  • Display a column with a list of values from DUAL;

    Hello, how can I display something like:
    COL1
    A
    B
    C
    D
    E
    F

    On my planet these are 'words' ;) :
    SQL> select dbms_random.string('a', level)
      2  from   dual
      3  connect by level <= 10;
    DBMS_RANDOM.STRING('A',LEVEL)
    r
    BB
    pmE
    bHri
    aZZDC
    FzOZBf
    fXfPyIP
    LOqrQbnK
    AYzNgHcGc
    lvxRvflHXj
    10 rows selected.
    SQL> select dbms_random.string('a', dbms_random.value(10, 50))
      2  from   dual
      3  connect by level <= 10;
    DBMS_RANDOM.STRING('A',DBMS_RANDOM.VALUE(10,50))
    AKExSSzIJOkabCT
    VCHHRTcgtnBSlZyRmsITqzWqVNgDnPdnxmt
    qLnuyGQErxZvHttRBpWrPoLEiGUra
    rcllLkyZXiwvlcGaUoEAeMbEdZSHlZBIgdilgGTQzxlIUW
    ftnGzDCzUBEsxKzhDLfgS
    aqUmpIzjqkWMZGpbAchhbiqFBUKdRaDwFAgdP
    nskqNdzmlAKlsGOJpbKfQHiCfvkDpoFcTkTvKaUcGLFDkgjsX
    fwkxBSoVuDSEOFldgDhilvm
    iAnSvDMQzamGvIFNydfjhr
    lHRPUnKgOxYQwWAltdELJNqqfgMRSmbBpSDnjOsfx
    10 rows selected.http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_random.htm#CDEJAHCB

  • To Check column is NOT NULL

    Hi
    I am trying to find out whether table column is NOT NULL or Not using ALL_CONSTRAINTS VIEW.But the problem is I am getting 'C' for the columns with NOT NULL and the columns with Check constraint. IF I want to find out the column is NOT NULL or not what is the best way.Help is appreciated.
    thanks
    srinivas vundi

    Hi
    Inorder to filter the records I am trying to use SUBSTR(SEARCH_CONDITION,-4) LIKE 'NOT NULL'.But it is throwing error. How do I filter the records where value is '%NOT NULL'. Please respond .
    thanks
    srinivas

  • I am unable to insert the sql data into sharepoint column(with type "Person or Group") through SSIS package.

     can anyone suggest me how to insert values to sharepoint list column of datatype (person/group datatype).  Also, Does sharepoint list allows nulls as a value?
    please help.
    Thanks
    Raghavendra

    Hi Raghavendra,
    Based on my test, if we directly insert a column with people account or group name with domain\user or domain\group formats to a SharePoint list, those columns with the values would be ignored when executing the package. Other columns with Null value would
    be insert into the list. If we insert a column with numeric format, the values would change to corresponding user or group based on the site permissions in SharePoint site.
    So to fix this issue, I suggest we can select <ignore> maps to the “People or Group” column in SharePoint list. The “People or Group” column would show null value in SharePoint list. Then we can manually or use workflow feature add values in the “People
    or Group” column in SharePoint list.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Return only the columns with different values.

    Hi all,
    I am trying to solve a seemingly trivial problem but can't seem to get any straight answer anywhere in any forum. Consider a single table with 5 columns and only two rows:
    row_id           first_name         last_name        age            gender
    1                    John                  doe               27             M
    1                    Jane                  doe               27              F  Assume there is no primary key or any other constraint. Also assume that there are only and only two rows in this table. So I basically need a query that, in the above set of rows, would return first_name and gender, as they are the only differing columns in the two rows, and also their values. Even if i can somehow get the column names that are differing that would be enough as I can easily access the values later on. Also it is important to remember that I may not know the column names of all the columns, so basically I somehow must utilize user_tab_columns in the process.
    Any help appreciated.
    Edited by: 894302 on May 1, 2013 10:35 AM

    Hi,
    894302 wrote:
    There is nothing wrong with it. Here you have added all the columns in the decode statement as you already know all the column names. What if there is a table whose column names are unknown i.e I can pass the table as a parameter to a procedure and I would need to loop through all the columns and then perform this operation.Table- and column names must be hard-coded into the query. If you want to figure out what the columns are at run time, given only hte table name, then you need dynamic SQL.
    All the column names are in the data dictionary view all_tab_columns. You can easily loop through them to build exactly as many lines like
    DECODE (a.row_id,     b.row_id,     NULL, 'row_id,')     ||as you need in the SELECT clause. The FROM clause is dynamic, too: it has the variable table name in 2 places.
    But i am not sure if it worth the effort to do it on the database side. Probably easier to do it on the middle tier such as .NET, which where the business logic is implemented in my company.I don't know much about .NET, so I can't compare them
    It's not very hard to do in PL/SQL (as dynamic SQL goes).
    Edited by: Frank Kulash on May 1, 2013 4:39 PM
    Here's a function that does the dynamic SQL:
    CREATE OR REPLACE FUNCTION  different_columns
    (  in_table_name  IN  VARCHAR2
    ,  in_owner_name  IN  VARCHAR2     DEFAULT USER
    RETURN VARCHAR2
    IS
        return_str     VARCHAR2 (4000);
        sql_str     VARCHAR2 (1000);
    BEGIN
        sql_str := 'SELECT  RTRIM ( ';
        FOR  c  IN ( SELECT    column_name
                          ,        ROW_NUMBER () OVER (ORDER BY  column_id  DESC)  AS r_n
                          FROM        all_tab_columns
               WHERE        owner     = in_owner_name
               AND        table_name     = in_table_name
               ORDER BY  column_id
        LOOP
            sql_str := sql_str || '                DECODE (a.'
                         || c.column_name
                      || ', b.'
                      || c.column_name
                      || ', NULL, '''
                      || c.column_name
                      || ', '')';
         IF  c.r_n > 1
         THEN
             sql_str := sql_str || ' ||';
         END IF;
         sql_str := sql_str || CHR (10);
        END LOOP;
        sql_str := sql_str || '              , '', '''     || CHR (10)
                                || '              )'          || CHR (10)
                     || 'FROM  "' || in_owner_name
                     || '"."' || in_table_name
                     || '" a'                    || CHR (10)
                     || 'JOIN  "' || in_owner_name
                     || '"."' || in_table_name
                     || '" b ON a.ROWID < b.ROWID';
        -- dbms_output.put_line (sql_str);     -- for debugging
        EXECUTE IMMEDIATE   sql_str  INTO  return_str;
        RETURN  return_str;
    END  different_columns;
    SHOW ERRORSYou can call it in SQL like this:
    SELECT     different_columns ('RHIT_TABLE_X')  AS dc
    FROM     dual
    ;Using PL/SQL, we might not need RTRIM, at least not in the query. I'll leave that as an exercise.

  • ORA-01400 - not null column with default value and item with authorization

    I've searched - I would think someone has run into this. APEX 3.0.0.00.20 - I've created a simple form on a table. One of the column is a not null column with a default value. I have a select list on that item, but it has security on it - authorization scheme. So, it checks the user and if that user isn't of the right role, it will not even display that item. However, APEX appears to still send in the column in its sql! So, the default value is useless, it sends in null each time. Even if I set the default at the Item level, I get null. Argg. That's got to be a bug...
    In debug, I do not see the item listed at all. It's not used. That's fine - but why is it trying to insert the value? I would think it would leave it off??? I think because the item is associated with a database column. But, getting around this is ugly. Having to create a hidden item for each one, and then check to see if I need to take the list value... horrible. Any way to get around this???

    I should add - I guess I can always put my own custom process in to replace the DML. Just seems like a simple thing - if the value doesn't appear on the debug, isn't set with any default value... don't include it in the DML.

Maybe you are looking for

  • How to connect my Mac Book Pro to Linksys WRT160N router

    HI, I just bought a   Linksys WRT160N router. I pop the installation disk in my mac book pro and walk thru the installation procedure successfully. But I can't connect wirelessly from my MacBook Pro (running mac os x 10.5). It sees the router and I d

  • Questions about the zen micro leather case???

    hey everyone, i saw the pictures of the zen micro leather case in the US store and was going to get them until i heard that the case is quite useless and annoying with the two-way flap open. Do you still think i should get them or a diiferent one(im

  • Isolating problems with MPEG2 VBR "best"

    There have long been discussions here around problems with the quality of MPEG2 compression with Compressor v2.x, usually difficult to quantify or "solved" with "It doesn't work, use something else" such as a different product, Compressor v1 or a Qui

  • Problem saving information about your mailboxes

    My Mail account freezes when a message comes up saying 'There is a problem saving information about your mailboxes' .. it just scrolls saying 'it may take a while to determine the problem, .. should I just leave it to do this or is there anything els

  • JDev: Frustrating formatting in Java editor

    Assume that we need an anonymous class         new ActionListener() { Click the red quick fix indicator on the left → "Implement methods..."         new ActionListener() {                 public void actionPerformed(ActionEvent e) { The result is so