Return of NULL values in the table of results

OK the guru! Your genius has helped me before (see this post... ( Help to return the query results table ) but now I would return null results 0 to the number. Below is the structure of the table (again) and my desired result (new question):

The structure of the table is:
Year of sport
Baseball 10-11
Football 10-11
Football 11-12
Football 11-12
Football 11-12
Baseball 11-12

The result should be sports in each year and should be grouped by year but shown as columns so:
(GROUP OF the year)
1 hockey, ice 0, 1, Soccer baseball
2, 1, Football Soccer 1, Baseball

The new portion of this question is the "0, Soccer.

Thanks for any help!

Hello

For counties of 0, you must join of a table that has one row per sport.
If you do in fact have such a table, you can build a game on the fly that will work just as well of results:

WITH     all_sports     AS
(
     SELECT DISTINCT  sport
     FROM              t
)
,     sport_year_totals     AS
(
     SELECT       s.sport
     ,       t.year
     ,       COUNT (t.sport)     AS cnt
     FROM             all_sports  s
     LEFT OUTER JOIN                t  PARTITION BY (year)
                                      ON  s.sport  = t.sport
     GROUP BY  s.sport
     ,            t.year
)
SELECT   year
,       LISTAGG ( cnt || ', ' || sport
            , ' '
           ) WITHIN GROUP (ORDER BY  sport)     AS sports
FROM      sport_year_totals
GROUP BY  year
ORDER BY  year
;

However, you may find it useful to have a table with one line per sport really. In this case, you wouldn't need the first auxiliary request. Simply use your name of the table where I used all_sports.

I copied the example of data that MichaelS posted in your previous thread {message identifier: = 10388879} below.
You should always post sample data yourself when you ask a question, especially if everything you have to do is copy and paste from another thread.

CREATE TABLE t as (
 select 'Baseball' sport, '10-11' year from dual union all
 select 'Football', '10-11' from dual union all
 select 'Football', '11-12' from dual union all
 select 'Football', '11-12' from dual union all
 select 'Soccer',   '11-12' from dual union all
 select 'Baseball', '11-12' from dual
);

Tags: Database

Similar Questions

  • How to find null values in the table

    Hi experts,

    my version is oracledb10g:

    I am doubted simple.

    for example:

    create table ex1 (e varchar2 (20));

    Insert ex1 (null).

    insert into ex1 (e)

    number of will be: 2

    I can easily find the value "e".

    so my question is:

    How can I find null values in the table and I want to remove the null values from the table.

    ADF 7 wrote:
    Hi experts,

    my version is oracledb10g:

    I am doubted simple.

    for example:

    create table ex1 (e varchar2 (20));

    Insert ex1 (null).

    insert into ex1 (e)

    number of will be: 2

    It depends on what you expect. If you issue count (*) you ask Oracle "how many lines there. If you issue a County () you ask Oracle 'how non null values for are there. "

    ADF 7 wrote:

    I can easily find the value "e".

    so my question is:

    How can I find null values in the table and I want to remove the null values from the table.

    delete from 
    where  is null;
    

    Ideally you would simply place a NOT NULL constraint on the column in question, thus prohibiting NULL values into the system (assuming that your business needs, it is that the column MUST always have a value).

  • NPE for rows with null values in the table of the adv

    I created the table adv, 2 columns, equipped with two text fields. Initially the col2 is empty,
    say that the structure is as follows:
                  col1          col2
    Hdr         Question    Answer
    row1       abc           zxc
    row2       pdd           null (user doesnt enter anything)
    row3       zxc            lkj
    
    APPLYBUTTON
    When the user clicks on apply button I want to update these values in the table.

    I don't know how to do that, but that's what I'm trying to do. Please guide me the right way if its wrong.

    in LICS, I took the APPLYBUTTON action, got all lines of the object corresponding to the view, consulted with everyrow and I'm checking if there are values in the fields in the table, if the value zero, are simply print null. (we would not update on this line). . I could get o the part update, due to null pointer exception
    I get on the row line null pointer exception [1].getAttribute("Answer") for row2, it prints the value of row1 however.

    Here is the code I wrote:
    Set of rows from the rowset = (RowSet) vo.getRowSet ();
    Rank rank [] = vo.getAllRowsInRange ();
    System.out.println ("row.length" + row.length);
    for (int i = 0; i < row.length; i ++) {}
    String question = row.getAttribute("Question").toString ();
    String response = row [i].getAttribute("Answer").toString ();
    If (question! = null & &!("".)) Equals (question. Trim()))
    {
    System.out.println ("Question line" + i + "-" + question);
    }
    on the other
    {
    System.out.println ("Question line" + i + "is null");
    }

    If (response! = null & &!("".)) Equals (Answer.Trim ()))
    {
    System.out.println ("Response line" + i + "-" + response);
    }
    on the other
    {
    System.out.println ("Response line" + i + "is null");
    }

    Why the NPE survey code, I'm checking for null value and you want to print the value null in the logfile... I can not to getAttribute() on the null field, why can not just give me null in the variable I'm assigning to?

    You can guide me what approach to take, if it is not correct.
    I must examine DataDictionary and collect data there?
    Thanks in advance.

    Hello

    handle the exception of null on these two statements like this pointer

    String question = "";
    String response = "";

    Try
    {
    question = row.getAttribute("Question").toString ();
    }
    catch (NullPointerException e)
    {
    question = "";
    }

    Try
    {
    answer = row.getAttribute("Answer").toString ();
    }
    catch (NullPointerException e)
    {
    response = "";
    }

    Si ( !("". Equals (question. Trim()))
    {
    System.out.println ("Question line" + i + "-" + question);
    }
    on the other
    {
    System.out.println ("Question line" + i + "is null");
    }

    Si ( !("". Equals (Answer.Trim ()))
    {
    System.out.println ("Response line" + i + "-" + response);
    }
    on the other
    {
    System.out.println ("Response line" + i + "is null");
    }

    Thank you
    Gerard

  • LocationProvider.getInstance returns a null value for the positioning of the cell PHONE location

    Hi guys.

    I'm having a problem trying to get a network of cells (MS basis) path to be able to work on my BlackBerry Bold 9000.

    Both assisted and Standalone GPS work (outside of course), but I'll try to find a way to position themselves inside the building.

    Here's what I'm going to put criteria:

    Criteria criteria = new Criteria();
    
    criteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
    criteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
    criteria.setCostAllowed(true);
    criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
    
    LocationProvider.getInstance(criteria); //<-- Returns null on real device
    

    When I run on a real device it gives me always null, when I do the same thing on a simulator, so this works:

    What I am doing wrong? I really need to find a way to make it work inside.

    Thanks for any input.

    Hey, Dominator,.

    I'll be real simple with you and try to make you save a LOT of time.

    Basically, cell tower positioning doesn't work out of the box on the Blackberry platform (except in a few configurations of rare device / carrier). So you can essentially throw the code you have above. If you need a place inside detection, you will need access to a database of celltowerId. These databases contain information from the Tower (Rad_error_nocontent, mnc, mcc, Lake) and its approximate location (lat/lng coordinates). This will give your application a rough estimate (less than a mile or two) from the current location of the device.

    Open source and professional databases are available. This is an open source database that runs on GSM networks (of course, he didn't 100% coverage of all the pylons). The biggest downfall is that it does not support CDMA (Sprint/Verizon) networks.

    http://openCellId.org

    You will find that most of the people on this forum are not very useful when it comes to cellTower information, positioning so you will need to research, research, research.

    Good luck

  • resolveNode returns a null value when a variable is used.

    LiveCycle Designer ES2, latest version

    Hello

    The following Javascript code, in the click event of a button, returns a null value for the variable opaque. When I manually enter the expected value the script works perfectly.

    I tried various modifications of the resolveNode line such as var opaque = xfa.resolveNode (qPage); , but without success.

    Also studied all the documents reference Adobe that I could find on the scripts and resolveNode. Any suggestions?

    var qPage = (Cell12.rawValue + "AnchorField");
    App.Alert (qPage);
    Opaque var = xfa.resolveNode ("' $... qPage '");
    App.Alert (opaque);
    var nPage = xfa.layout.absPage (opaque);
    App.Alert (nPage);
    xfa.host.currentPage = nPage;

    Thank you

    Ron

    I tried your sample and it seems to work very well... but I'm not sure 100% that you are trying to do... .going to your initial question on the passage of a variable in the resolveNode resolveNode expects a string, so you must use the following syntax to create the string:

    xfa.resolveNode ("$.." + qPage)

    Note that the variable is outside the quotes as such the string $... is added to the content of qPage. This wil work if qPage is a string as well.

    In your example you have defined qPage as an XFA object so that the syntax above will not work. If you intend to use the same way, you would use qPage.name so that the name of the field will be returned (this is a string) and it will be added to your expression of $ to make the $... ProductAnchorField

    Thus, the expression would be:

    xfa.resolveNode ("$.." + qPage.name)

    Make sense?

    Paul

  • NULL value in the print result

    I run a SELECT statement on the form below:

    SELECT col1 |' | ' || col2 |' | ' || COL3

    TABLE;

    It gives me the following outprint, which is what I need

    col1 | col2. col3

    VARCHAR2. number | VARCHAR2

    The problem is when col2 returns a NULL value, then I get this:

    VARCHAR2. VARCHAR2

    When what I want is this:

    VARCHAR2. (null) | VARCHAR2

    Is it possible to get my results of the query to print the value NULL (null)?

    I tried the function NVL NVL (col2, 'null'), but it won't work because there is a mismatch on data types. I can get the NULL value, printed by concatenating don't not columns and save results to csv, but that does not give me the formatting that I want.

    You can convert the character number column, and then look for the NVL.

    See below:

    with data as
    (
      select 'col1' col1, 1 col2, 'col3' col3 from dual union all
      select 'col1' col1, null col2, 'col3' col3 from dual
    )
    select col1 || '|' || nvl(to_char(col2), 'null') || '|' || col3
      from data;
    
    COL1||'|'||NVL(TO_CHAR(COL2),'NULL')||'|'||COL3
    --------------------------------------------------
    col1|1|col3
    col1|null|col3
    
  • by the way the value of the table to form

    Hello

    I have a requirement in which I need to store the selected rows in a table (from the database) in my text on a form.

    the code in my form as follows.

    < af:form id = "f1" >
    < af:inputText label = "id" id = "it1" value = "#{full.id}" / >

    < af:commandButton text = 'Search' id = "cb1" >
    < af:showPopupBehavior popupId = "p1" / >
    < / af:commandButton >

    < af:inputText label = "name" id = "it2" value = "#{full.name}" / >

    < af:popup id = "p1" >
    < af:panelFormLayout id = "pfl1" inlineStyle = "width: 337px;" >
    < af:table value = "#{bindings." PlantMasterView1.collectionModel}.
    var = "row" rows = "#{bindings." PlantMasterView1.rangeSize}.
    emptyText = "#{bindings." PlantMasterView1.viewable? "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings." PlantMasterView1.rangeSize}.
    rowBandingInterval = '0 '.
    selectedRowKeys = ' #{bindings. " PlantMasterView1.collectionModel.selectedRow}.
    selectionListener = "#{bindings." PlantMasterView1.collectionModel.makeCurrent}.
    rowSelection = "single" id = "t1" >
    < af:column sortProperty = "PlantId" sortable = "false".
    headerText = "#{bindings." PlantMasterView1.hints.PlantId.label}.
    ID = "c2" >
    < af:outputText value = "#{rank." PlantId}"id ="ot2">
    < af:convertNumber groupingUsed = "false".
    model = ' #{bindings. " PlantMasterView1.hints.PlantId.format}"/ >
    < / af:outputText >
    < / af:column >
    < af:column sortProperty = "PlantName" sortable = "false".
    headerText = "#{bindings." PlantMasterView1.hints.PlantName.label}.
    ID = "c1" >
    < af:outputText value = "#{rank." PlantName}"id ="ot1"/ >
    < / af:column >
    < / af:table >

    < af:commandButton text = "ok" id = "cb2" action = "#{full.act}" / >

    < / af:panelFormLayout >
    < / af:popup >
    < / af:form >


    Here is the code from my managed bean

    public class {full

    private string ID;
    private String name;

    public String act() {}

    String plantid = jsfutils.resolveExpressionAsString ("#{bindings.") PlantId.inputValue}"); attribute links plantid and plantname are created.
    String plantname = jsfutils.resolveExpressionAsString ("#{bindings.") PlantName.inputValue}");
    ID = plantid;
    name = plantname;
    Returns a null value.
    }

    {} public void setId (String id)
    This.ID = id;
    }

    public String getId() {}
    return the id;
    }

    public void setName (String name) {}
    myIdName = name;
    }

    public String getName() {}
    return the name.
    }
    }

    but here the problem is when I press the ok button in the popup, it throws an error IE.

    Error 500 - Internal server error

    javax.servlet.ServletException: java.lang.ClassCastException: oracle.jbo.domain.Number
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:421)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:421)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.jbo.domain.Number
    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:699)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    ... 34 more
    Caused by: java.lang.ClassCastException: oracle.jbo.domain.Number
    at oracle.adf.jsfutils.resolveExpressionAsString(jsfutils.java:111)
    at oracle.adf.full.act(full.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
    ... more than 42
    If someone can solve this...?

    Hello

    Sorry to say, but this code is a bit awkward:

    ViewObject vo = adfutils.findIterator("TestView1Iterator").getViewObject(); //EName and EId are attribute bindings.
    vo.getCurrentRow().setAttribute("EName",name);
    vo.getCurrentRow().setAttribute("EID",id);
    BindingContext cntx = BindingContext.getCurrent();
    cntx.getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    

    Why don't you

    DCIteratorBinding dciter = (DCIteratorBinding) adfutils.findIterator("TestView1Iterator");
    Row currentRw = dciter.getCurrentRow();
    currentRW.setAttribute("EName",name);
    currentRw.setAttribute("EID",id);
    BindingContext cntx = BindingContext.getCurrent();
    cntx.getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    

    But then, you use adfutils and the BindingContext, which is redundant. So lets get
    RID using EL in you manage code bean

    BindingContext cntx = BindingContext.getCurrent();
    BindingContainer bindings = cntx.getCurrentBindingsEntry();
    
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("TestView1Iterator");
    Row currentRw = dciter.getCurrentRow();
    currentRW.setAttribute("EName",name);
    currentRw.setAttribute("EID",id);
    BindingContext cntx = BindingContext.getCurrent();
    OperationBinding commitBinding = (OperationBinding ) bindings.get("Commit");
    commitBinding.execute();
    

    Looks a lot better now and should work

    Frank

  • Find the minimum value of the table in time...

    Firstly that it is not "find the min value in the table.

    It is:

    I have a table that changes its values at each iteration, and I want to compare the new values with previous values and make a new array with the minimum values...

    In C++, it would be like this:

    int main() {}

    int array [8];

    int min [8];

    int i;

    for (i = 0; i<>

    min [i] = 1000000; Initialize minimum table with a high value

    }

    {while (1)}

    Array = update_array ();

    for (i = 0; i<>

    If (array [i]<>

    min [i] = array [i];

    }

    }

    do things...

    }

    return 0;

    }

    IM new to labview and it always confuses me a lot...

    Thanks in advance.

    Using the function Max & Min regular (not table Max & min as you know) with tables and a good will of employment registry change.  Max Min &, as most of the digital functions, is polymorphic and works witt tables as well as scalars.

    Lynn

  • NULL values in partition Table of Partition key

    Hi all

    I'm using Oracle 11.2.0.3.

    I can add a null value on partition of Partition table key.

    If so, how?

    Kind regards.

    • You cannot specify NULL in the VALUES clause.

    Referring to clauses PARTITION you set - not the data that you insert.

    If you cannot define a range partition that uses the VALUES LESS THAN and use null to this division. But you CAN use NULL values in the VALUES of integration clause.

    DROP TABLE mytable;

    CREATE TABLE MyTable

    (

    CREATION_DATE DATE,

    Identification number

    )

    PARTITION BY RANGE (CREATION_DATE)

    (

    PARTITION prior_to_2016 VALUES LESS THAN (TO_DATE ('2016-01-01', 'YYYY-MM-DD'));

    LESS THAN PARTITION of VALUES undesirable (MAXVALUE)

    )

    Insert into myTable values (null, null)

    You can use a VALUES clause to insert NULL values - this line will go into the MAXVALUE partition.

  • IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Hello

    I'm trying to read and modify a document XMP data, but I always get a null value when playing it.

    In addition,

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    does not either;

    App: application var = InDesign.app;

    var doc: Document = app.activeDocument;

    var idh:IDHostAdapter = IDHostAdapter.getInstance ();

    var xmpString:String = idh.getXMPString (doc);

    var warpxmpContext:WARPXMPXMPContext = new WARPXMPXMPContext (xmpString);

    warpxmpContext.wARPXMP.publicacion = "periodico";

    var updatedXMPString:String = warpxmpContext.serializeToXML ();

    IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);

    var xmpString2:String is IDHostAdapter.getInstance () .getXMPString (doc);.

    Any ideas?

    Thank you

    Hello

    We have an updated version of the adapter host available for download InDesign library:

    http://cssdk.host.Adobe.com/SDK/1.5/patch/id_hostadapter_mac.zip

    Regarding the examples, please see the AssetFragger CS extension example which shows the adding/changing metadata XMP using XMP Namespace Designer and library InDesign Host Adapter.  This extension is available in Builder Extension CS under file > import > CS Extension Builder > samples.  For more information, please visit http://www.adobe.com/devnet/creativesuite/samples.html

    Kind regards

    LEA

    From: Adobe Forums [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Saturday November 5, 2011 19:45:40 + 0000

    To: laboratory user [email protected]<>[email protected]>

    Topic: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    Re: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value

    created by substances. http://forums.adobe.com/people/Harbs. > in Creative Suite Extension Builder - see the discussion complete onhttp://forums.adobe.com/message/4009511#4009511

  • How to find the NULL columns in the table?

    Hello

    Please provide the query to search for null columns in the table. Here, all the rows in the table have same column as null. It will not change.

    Table
    ---------------
    C1 c2 c3 c4
    X C 10
    T D 20

    I want to know that C2 is the nullable column.
    Thanks in advance!

    Kind regards
    Florian...

    A variance more

    create or replace function is_nulled_column(tab varchar2, col varchar2) return varchar2 is
    cnt number:=1;
    begin
      execute immediate 'select count(1) from '||tab||' where '||col||' is not null and rownum=1' into cnt;
      return case when cnt=0 then 'Y' else 'N' end;
    end;
    

    and use:

    select
     c.OWNER,c.TABLE_NAME,c.COLUMN_NAME,c.NULLABLE,is_nulled_column(c.TABLE_NAME,c.COLUMN_NAME) all_nulls
    from all_tab_columns c
    where c.OWNER=user
    and c.TABLE_NAME like '%'
    order by c.OWNER,c.TABLE_NAME,c.COLUMN_ID
    
  • Need to null values with the values of filling the date before weekend/holidays

    I have a table with a Date column, column Type and rate column.

    The problem is when the weekends and holidays, column Type and rate column are null.

    I need all null values with the values of Type and fill rate before that date is the weekend and public holidays.

    Example:

    I have:

    RATE OF TYPE DATE
    07/01/2010 4510 PM 3.71
    07/01/2010 CETE28 4.59
    07/01/2010 TIIE28 4.95
    07/02/2010 4510 PM 3.82
    07/02/2010 CETE28 4.63
    07/02/2010 TIIE28 5.11
    * NULL NULL 07/03/2010 *.
    * NULL NULL 07/04/2010 *.
    07/05/2010 4510 PM 3.91
    07/05/2010 CETE28 4.74
    07/05/2010 TIIE28 5.25

    Will be:

    RATE OF TYPE DATE
    07/01/2010 4510 PM 3.71
    07/01/2010 CETE28 4.59
    07/01/2010 TIIE28 4.95
    07/02/2010 4510 PM 3.82
    07/02/2010 CETE28 4.63
    07/02/2010 TIIE28 5.11
    * 07/03/2010 4510 PM 3.82*
    * 07/03/2010 CETE28 4.63*
    * 07/03/2010 TIIE28 5.11*
    * 07/04/2010 4510 PM 3.82*
    * 07/04/2010 CETE28 4.63*
    * 07/04/2010 TIIE28 5.11*
    07/05/2010 4510 PM 3.91
    07/05/2010 CETE28 4.74
    07/05/2010 TIIE28 5.25

    What could I do?

    Hello

    You can use the analytic LAST_VALUE function to get the last day of work before each date into your table. It will be the same as the current day for every day of work.
    Do it a self-join to combine each current line (c) with the last day of work (l):

    WITH     got_last_work_day     AS
    (
         SELECT     dt, type, rate
         ,     LAST_VALUE ( CASE
                        WHEN  type  IS NOT NULL
                        THEN  dt
                       END
                       IGNORE NULLS
                      ) OVER (ORDER BY dt)     AS last_work_day
         FROM     table_x
    )
    SELECT       c.dt, l.type, l.rate
    FROM       got_last_work_day     c
    JOIN       got_last_work_day     l  ON       (    c.dt          = l.dt
                             AND  c.type          = l.type
                             )
                           OR     (    c.last_work_day     = l.dt
                             AND  c.type          IS NULL
                             )
    ORDER BY  c.dt
    ,       l.type
    ;
    

    Among other things, I guess that the type is NULL if (and only if) the line represents a holiday or weekend, and that the combination (dt, type) is uniuqe.

  • VO.getCurrentRow () returns a null value

    Hi, OTN

    In short, the scenario is:
    View object is based on an entity. There is a form to the JSF page.
    I select a record by clicking next and previous. Then I click on create to display empty fields for the new record.
    When I click on the button, I need to register a field value and a default value for the new fields to records.

    How to:
    I have created a support bean and added customCreateMethod. To start, I want to get the value of current row field, but I can't get the current line.

    public String customCreateMethod() {}

    String amDef = "pattern. AppModule. "
    Config = "AppModuleLocal";

    Am = ApplicationModule
    Configuration.createRootApplicationModule (amDef, config); non-null

    ViewObject vo = am.findViewObject("ContentVersionView1"); non-null


    = problem here:
    vo.getCurrentRow (); Returns a null value

    System.out.println ("index:" + vo.getCurrentRowIndex ()); always returns 0
    }

    I tested variable vo by this code:

    While (vo.hasNext ()) {}
    Line = vo.next ();
    System.out.println (Row.GetAttribute ("IdContent"));
    }

    It works fine.


    How should I me current line?

    Thank you

    Hello

    createRootApplicationModule creates the new instance of the application module, thanks to which you did not receive the current line. Use the code posted by Timo in [this post | http://forums.oracle.com/forums/thread.jspa?threadID=933022] (which has been marked as correct) to get the instance of module of the application.

    Jean Lou

  • Evolution of the null value in the data view tab

    Is it possible to update a null value in the data view table tab? When I delete the value, it creates a sql such as

    Update table set column is where id = 1;.

    How to fill a null from the data tab?

    I met (and displayed) on this same problem some time. (See forum article "invalid column index: getValidColumnIndex" in SQL Developer 1.5.4 . "") Jim Smith pointed out it seems to be the reappearance of an old bug.

    There are some alternatives. One is "do-it-yourself" in the SQL or SQL worksheet * more. (I.e., "UPDATE someTable SET someColumn = NOTHING WHERE tablePKColumn = pkValue;". The other is to use an earlier version of SQL Developer for that in the view of table data. (I still have Developer SQL 1.5.1 installed just for this reason).

    I hope this helps.

    Hrsg.:.

  • Get the current index value of the table control

    I have a table control 1 d on a panel that contains a value of temperature curve that I send to a temperature controller. The values in the table are not unique, because for example 40.5 degrees in the table could represent 40.5 degrees on the cycles of cooling or heating. I could have severat heating/cooling cycles programmed into the table. I would like a way to read the array index of the currently displayed item in the array in the up/down control of index on the left of the table control. I could then run curves partial temperature easily by neutrophilia a starting point on the curve in the table control.

    I don't see a property that I can use to get this index value. Anyone have any ideas?

    Thank you

    J

    Use the property 'index values. It will be the first item of the output of a 1-d array.

Maybe you are looking for

  • My guard computer shut down on its own. See report:

    Anonymous UUID: 054668D0-3BDB-4E19-E91B-139A9C7C7662 Mon May 30 00:39:24 2016 Panic report *. panic (the appellant 2 cpu 0xffffff802a704057): "hfs_swap_HFSPlusBTInternalNode: catalog key too big lag (0x053A)\n"@/Library/Caches/com.apple.xbs/Sources/x

  • HP 110-210: fake Clientx643.0 10.0

    My question is simple: what is "false 10.0 Clientx643.0" and I have to get rid of him.

  • Game of Thrones

    While Apple and HBO became close friends with the introduction of the new Apple TV: Does this mean that Game of Thrones season 6 will be available live on the Apple TV in March? I'm tired of paying sky money and am looking for an alternative to watch

  • Y at - it ready to help a Gal 'OLD SCHOOL', navigate the problems that I've had for over a year?

    TOO MANY details... but I'll try here. I can't understand HOW - to get Adobe Flash Player 10.3 more. and Macromedia Flash Player 6. Lets first start with this mess... DON'T WANT TO SCARE YOU off until we start ha ha ha I of course need someone with p

  • I feel bad for even asking

    I feel bad for the same request to the... I feel like it has been answered before, but I could not find after searching the Council for almost an hour now. How can I sync it to my external SD card in Media Monkey? I saw that it has been suggested tha