Records with multiple columns as NULL

hi all,
How do i find the number of records having col1,col2 and col3 as null.. is the following query right
select count(1) from tableX where COL1 = NULL and COL2 = NULL and COL3 = NULL;

Or
select count(1) from tableX where coalesce(COL1,COL2,COL3) IS NULL

Similar Messages

  • GROUP BY with multiple columns.

    I have little query about GROUP BY clause.
    Sometimes we will give multiple column names in GROUP BY .If it behaves in the same way as ORDER BY (multiple columns) i would love to have an example where I can use GROUP BY multiple columns. Anyways howsoever it behaves it will be really appreciated if anyone can explain a scenario where GROUP BY with multiple columns can be used.
    I know about the usage of aggregate functions with GROUP BY but using only one column.
    Thanks..!!!

    Hi,
    Group by is used for grouping of same records. check this bellow scenario
    SELECT registrationid, dateofbirth, age FROM prawin62 WHERE registrationid = 22;
    22     1/23/1975     54
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66
    22     5/18/2011     66SELECT registrationid, sum(age) FROM prawin62 WHERE registrationid = 22 GROUP BY registrationid;
    22     384SELECT registrationid, dateofbirth, sum(age) FROM prawin62 WHERE registrationid = 22 GROUP BY registrationid, dateofbirth ;
    22     5/18/2011     330
    22     1/23/1975     54Thanks,
    Praveen

  • Creating Select List with multiple columns

    I want to create a select list with multiple columns. I followed the demo application model described in the by Denes Kubicek (Currently my reference for APEX !!)
    The code is as follows:
    CREATE OR REPLACE FUNCTION getcrops(p_cropid IN NUMBER)
    RETURN VARCHAR2
    IS
    v_cropid VARCHAR2 (400);
    v_fcode VARCHAR2 (400);
    v_product VARCHAR2 (400);
    v_var VARCHAR2 (400);
    v_fname VARCHAR2 (400);
    v_acres VARCHAR2 (400);
    v_style_start VARCHAR2 (400);
    v_style_end VARCHAR2 (400);
    v_return VARCHAR2 (400);
    BEGIN
    FOR c IN (select "CROP"."CROPID" as "CROP ID",
         "CROP"."FIELDCODE" as "FIELD CODE",
         "CARROTPRODUCTLIST"."CARROTPRODUCTNAME" as "PRODUCT",
         "VARIETYLIST"."VARIETYNAME" as "VARIETY",
         "FIELD"."FIELDNAME" as "FIELD NAME",
         "CROP"."SIZEINACRES" as "ACRES"
    from     "FIELD" "FIELD",
         "CARROTPRODUCTLIST" "CARROTPRODUCTLIST",
         "VARIETYLIST" "VARIETYLIST",
         "CROP" "CROP"
    where "CROP"."CARROTPRODUCTTYPE"="CARROTPRODUCTLIST"."CARROTPRODUCTID"
    and     "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
    and     "CROP"."FIELDID"="FIELD"."FIELDID")
    LOOP
    v_cropid := TO_CHAR (c.'CROP ID', 'FML999G999G999G999G990');
    v_fcode := c.'FIELD CODE';
    v_product := c.'PRODUCT';
    v_var := c.'VARIETY';
    v_fname :=c.'FIELD NAME';
    v_acres :=c.'ACRES';
    FOR i IN 1 .. 12 - LENGTH (c."CROP ID")
    LOOP
    v_cropid := v_cropid || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'FIELD CODE')
    LOOP
    v_fcode := v_fcode || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'PRODUCT')
    LOOP
    v_product := v_product || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'VARIETY')
    LOOP
    v_var := v_var || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'FIELD NAME')
    LOOP
    v_fname := v_fname || ' ';
    END LOOP;
    FOR i IN 1 .. 12 - LENGTH (c.'ACRES')
    LOOP
    v_acres := v_acres || ' ';
    END LOOP;
    v_return := v_cropid || v_fcode || v_product || v_var || v_fname || v_acres;
    END LOOP;
    RETURN v_return;
    END;
    I created this anonymous Pl/SQL function at a application level ..Then I followed up to create a select list with a function inside. However I could not create select list with the command suggested in the demo which is
    select getcrops(cropid) d, cropid r from crop;
    APEX (2.1) returns a error message. What am I missing ? Should the function be called from somewhere else after creating a regular select list..? Where the functions (Pl/SQL) should be ideally stored for application level access..? and for across application level access ? How can I check the function works good. Help is appreciated.

    Still really one column.
    If they need to be independent then you've got to have three selection lists.
    %

  • Selection list with multiple columns

    How can i create a selection list with multiple columns?

    Still really one column.
    If they need to be independent then you've got to have three selection lists.
    %

  • Select list with multiple columns

    I want to create a select list with multiple column option. What are the options. Any developments in apex 3.0.1 ? Thanks in advance. I tried the tutorials by Kubicek.
    I am kind of stuck to see the function entry inside LOV definition returns a error.

    Still really one column.
    If they need to be independent then you've got to have three selection lists.
    %

  • List with multiple column

    hello all ,
    how to create a list with multiple columns ? can anyone share some examples or code snippets

    What I would usually do is create a movieclip/sprite that contains a row with every column in it (each column being a textfield).  Then pile up the rows one atop the other (using Actionscript) as they are populated with data.

  • WebService get list 750 records with 8 columns in mx:DataGrid atleast 2 minutes

    I am using WebService (ASP.NET) to get a list of customers (around 750) records with 8 columns using mx:DataGrid. It takes to list data in the mx grid atleast 2 minutes from offline development data server[SQL SERVER 2005]. It could be better if the list populate the datagrid with-in 1 minute. I didn't find how to resolve the problem. My WebService returns the ArrayCollection within 1 minute.
    Any hints would appreciate!
    T. Ghosh

    It doesn’t matter how many records, what matters is how many attributes and sub-objects.  One customer returned 100 records, each with a transaction history of some 10,000 transactions, although the transactions were not displayed in the datagrid (it would be later in the detail view).  Then the app was configured to convert the records to typed objects.  As one would expect, it took forever.  You might have to create a custom converter or just use the SOAP/XML.

  • Format with multiple column

    Post Author: vman
    CA Forum: General
    I am working a report that has had the details section format with multiple columns selected.  I want to change the report and remove the check box, but it is grayed out.  How can I get the report details section back to default without the detail size constraints?

    Post Author: rcoleman
    CA Forum: General
    Bearing in mind that I'm a relative newbie to the report writing/Crystal world...the only thing I can think of is that maybe the report was written using an older version of Crystal and this option wasn't available. Another possibility, if it's a sub-report, you might try making a copy of the sub-report saving it with the same name, deleting the old sub-report, replacing it with the copy you made. I know that has worked for me when I've had problems with the re-import when opening is greyed out.

  • Selectively Format Groups with Multiple Columns

    I have a bit of an obscure task I've been trying to hammer out to no avail.  I've searched quite a bit but can't seem to find anyone else who has attempted this.  I have two group by statements, one is a category and the other is a rank.  What I'm trying to do is organize the report so that there are category rows and below each category row is a set of columns for each rank with their associated values as such:
    category1
    rank1     rank2     rank3     rank4
    value1   value1    value1   value1
    value2   value2    value2   value2
    category2
    rank1     rank2     rank3
    value1   value1    value1
    value2   value2    value2
    I've tried using details>Section Expert>>Layout>Format Groups with multiple column.  Unfortunately, this applies to both groups putting the categories into columns instead of rows, making a mess.  Does anyone know of a way to selectively put groups into columns and ensure alignment?  In the above example the user would be able to compare rank values from multiple categories since they all line up.  Any help with this would be very much appreciated.

    Hi,
    Have you tried using a crosstab? Give this a shot:
    1) Group the report on Category
    2) Create a new group header section. Group Header b
    3) Place a crosstab in this section
    4) The columns would be the Rank field, I'm not sure about what you would like to show in the rows
    5) The summarized field would be the Value field ofcourse
    Let me know how this goes.
    -Abhilash

  • Repeat "Detail a" section when using "Format with Multiple Columns" layout

    I am using Crystal Reports for .NET (VS 2008) and I would like to get the "Detail a" section to repeat at top of a second column containing additional data in "Detail b" section. Please see below for example, specifically "Detail a (2)". Any tips or help much appreciated.
    Detail a (1)_____Detail a (2)
    Detail b (1-1)___Detail b (2-3)
    Detail b (1-2)___Detail b (2-4)
    --Detail b (1-3)___Detail a (3)
    Detail a (2)______--Detail b (3-1)
    --Detail b (2-1)
    --Detail b (2-2)
    Thx, Scott

    the format with multiple columns i dont believe will show you the value 2x, but allows you to display the values across instead of down.
    i think you may want to use a sub report

  • Treeview with multiple columns

    I googled alot about creating a treeview with multiple columns similar to a listview in details mode with the added benefit of nodes and roots. I got some answers but I was wondering if visual 2008 itself has such an option, and if not what is my best
    choice?
    Debra has a question

    I just wanted to know if in the visual studio 2008 itself there is an option to have a multi column treeview or a listview with nodes...
    Debra has a question
    Hi Debra,
    >> a multi column treeview
    As far as I know, the standard Microsoft .NET TreeView does not support columns, and if you want a tree control that supports columns, you could turn to the link from Tony:
    #TreeView with Columns
    http://www.codeproject.com/Articles/23746/TreeView-with-Columns
    >>a listview with nodes
    I made a research about “a listview with nodes” and found no results. I checked the ListView Class and did not find information about nodes.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • Displaying single value (Record) into multiple columns

    Hi All,
    I want to display the single record into multiple columns. Please let me know How to achieve this..
    Record:
    Lvl Activity Acre
    6 Week 4 (Same value to be displayed into 3 columns.)
    REquired output:
    lvl Activity PH1 PH2 PH3
    6 Week 4 4 4
    Thanks
    Kavi

    user533671 wrote:
    Hi,
    Thanks for immediate reply.
    PH1, PH2, PH3, ... will go more columns based on parameter , what we are passing.An single SQL statement cannot have a dynamic number of columns based on the data itself. The projection (columns returned) have to be known before any data is fetched... and that includes some 'parameter' value.
    {thread:id=2309172}
    You can build a query dynamically, based on a parameter or even on the data, but 99 times out 100 people use dynamic queries where they are not needed.
    Perhaps explain to us what you are really trying to achieve and why, and we could suggest some better way.

  • OO4O, OCI-21560 when selecting records with XMLTYPE column

    When I try to select records from a table with XMLTYPE column
    Set sqldynaset = oraDatabase.dbcreatedynaset("select * from tab1",
    ORADYN_READONLY)
    I got the error message:
    OCI-21560: argument 3 is null, invalid, or out of range.
    Please help.
    Development Tool: VB6
    Oracle Client Version (OIP) : 9.2.0.4.4
    Platform: Window XP

    OO4O doesn' t understand XMLType.

  • Format with Multiple columns

    Hi Crystal gurus.
    I'm having the report which consist of more that 500 rows , so therefore I decided to implement "Format with multiple rows" feature, which is available in Section Expert area. Everything is just fine, I'm getting multiple columns, but how to suppress the header which is not needed for the last page, because the records are only in the first column.
    I can easily copy/paste the header as such, but I do not know how to suppress it. Tried to search here, but found nothing.
    Many thanks in advance Mcmerphy

    If it truely is the last page of the report, you could try a conditional suppression where pagenumber = totalpagecount. But this would always suppress the header selected for suppression, and if you should get another column on the last page, it will still suppress.
    Debi

  • How to link Excel Chart with multiple columns dynamically?

    Hi all,
    I have one problem. I have an excel chart which has to read data from multiple columns for it's X-axis values (time stamps) and the same number of values for it's Y-axis from multiple columns. See figure attached.
    Now, you can do this by manually assigning values by holding control key to tell the chart that data from many columns is continued from the first column. i.e, a long data is distributed along may columns. This is done very easily manually.
    Now, how to do it at runtime through LabVIEW 8.0?
    Although, I have done it through labview when there where only two columns, A and B streching up to any length. But, now to save space we are dumping into many columns in the same page and want the chart plot that data as we dump it. 
    It is tough since I don't know how to assign SourceData of the chart through labview.
    I have attached chart's SourceData picture.
    Hope you all can solve my problem.
    The Y-axis values are: =(good!$B$30:$B$70,good!$D$30:$D$70,good!$F$30:$F$70,good!$H$30:$H$70,good!$B$71:$B$140,good!$D$71:$D$140,good!$F$71:$F$140,good!$H$71:$H$140,good!$B$141:$B$189)
    good is the name of the file.
    The X- axis values are: =(good!$A$30:$A$70,good!$C$30:$C$70,good!$E$30:$E$70,good!$G$30:$G$70,good!$A$71:$A$140,good!$C$71:$C$140,good!$E$71:$E$140,good!$G$71:$G$140,good!$A$141:$A$189)
    See the columns vary from A to F.
    I have still not got what I love.....
    Attachments:
    ExcelChart.JPG ‏113 KB
    SourceData.JPG ‏34 KB
    XY values.JPG ‏36 KB

    Ok i solved the excel chart problem. Here is the figure showing my victory! But offcourse with NI forum help.
    Message Edited by Halemani on 09-19-2008 06:33 AM
    I have still not got what I love.....
    Attachments:
    Chart_XValues_Values.JPG ‏36 KB

Maybe you are looking for

  • Unable to get windows xp pro to boot on partitioned hard drive

    Just got an intel based Macbook Pro for the express purpose of not having to carry a Pc around as I already had a G4 Macbook Pro which works well. Spent 2 hours trying to get the window to boot as bootcamp says it should once the XP is downloaded on

  • Inserting row in the result set

    Hi need to insert a row in resultset when previous row typ=c and next row typ=p then need to insert one row in between typ c and p with typ =s see the #temp_result table for result expected --drop table temp1 --drop table temp1_result --presently dat

  • Muse to Dreamweaver CS6?

    So, I had a friend build my website. He used Muse. I can't seem to edit any of the content with DW CS6. From reading other's posts, I see that this is a problem. However, the most recent version of CS that is discussed in any of the online forums is

  • How to include a condition value in Tax Base Value BASB

    Hi friends, I have created a separate pricing procedure as per the price of a vendor which charges as follows. A. Gross price Rs.100 B. Discount C. Sub Total: A-B D. Depo Charges % on C E. Sub Total(C+D) F. Entry Tax % on E F. Sub Total (E+F) G.NAVS

  • RoboHelp 6 crashes-Robo 5 project when using conditional build tags

    Hi there I had no build tags in my project, and it was an R5 project. I just upgrated to R6. I need to use the tags & when I put a build tag or two in the project on the topic level and compile it and it crashes. Based on a prior thread (related to m