Hide or delete row based on it's value?

If I have a column called "Name" and I want to delete or hide all the rows which include the name "smith" or alternatively all the rows with "Miss" how do I do this?
I know I can manually search to find the name "smith" but I have 60,000+ rows in my spreadsheet.
Format:
Column 1
Row 1: Miss J Jones
Row 2: Mr P Smith
Row 3: Mr C Widget
etc...
Thanks.

Here is an AppleScript whic is able to delete the rows matching your criteria.
--[SCRIPT removematchingrows]
Enregistrer le script en tant que Script : removematchingrows.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner une cellule de la colonne dans laquelle le script cherchera le mot clé.
menu Scripts > Numbers > removematchingrows
Tapez le mot à chercher puis cliquez OK.
Le script supprimera les lignes dont la cellule de la colonne sélectionnée contenait le mot saisi.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: removematchingrows.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select a cell in the column in which we will search a key word.
menu Scripts > Numbers > removematchingrows
You will be asked to type the word to search.
Type it then click OK.
The script will remove the rows whose the cell of the selected column contained the choosed word.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/03/24
--=====
on run
if my parleAnglais() then
set theKey to text returned of (display dialog "Enter the word to search …" default answer "At least one cell of the column in which we will search must be selected.")
else
set theKey to text returned of (display dialog "Saisir le mot à chercher …" default answer "Une cellule de la colonne dans laquelle il faut chercher doit être sélectionnée.")
end if
set {dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set nbRows to row count
repeat with r from nbRows to 1 by -1
set maybe to (value of cell r of column colNum1) as text
if words of maybe contains theKey then
remove row r
end if
end repeat
end tell -- Numbers
end run
--=====
on getSelParams()
local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
if r_Name is missing value then
if my parleAnglais() then
error "No selected cells"
else
error "Il n'y a pas de cellule sélectionnée !"
end if
end if
set two_Names to my decoupe(r_Name, ":")
set {row_Num1, col_Num1} to my decipher(item 1 of two_Names, d_Name, s_Name, t_Name)
if item 2 of two_Names = item 1 of two_Names then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
set {row_Num2, col_Num2} to my decipher(item 2 of two_Names, d_Name, s_Name, t_Name)
end if
return {d_Name, s_Name, t_Name, r_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end getSelParams
--=====
set {rowNumber, columnNumber} to my decipher(cellRef,docName,sheetName,tableName)
apply to named row or named column !
on decipher(n, d, s, t)
tell application "Numbers" to tell document d to tell sheet s to tell table t to return {address of row of cell n, address of column of cell n}
end decipher
--=====
set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
on getSelection()
local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
tell application "Numbers" to tell document 1
set nbCols to column count
repeat with i from 1 to the count of sheets
tell sheet i
set x to the count of tables
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errMsg number errNum
set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
return {theDoc, theSheet, theTable, theRange}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
--[/SCRIPT]
At this time, I don't know how to Hide a row thru AppleScript.
Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 17:02:20

Similar Messages

  • How can I select and delete rows based on the value in one column?

    I searched through the discussion board, and found a thread on deleting blank rows, but not sure how to modify it to work with my issue.
    I have put together a rather complicated spreadsheet for designing control systems, it calculates parts needed based on check boxes selected in a second spreadsheet.
    Since not all systems require all parts there are many rows that have a 0 quantity value, I would like to select these rows and delete them once I have gone through the design phase (checking off required features on a separate sheet).
    I like the way the other thread I found will gather all the blank rows at the bottom without changing the order of the rows with data in them.
    I don't understand exactly how the formula in the other thread works well enough to modify it to look for a certain column.
    I hope I made myself clear enough here, to recap, I would like to sort the rows based on a zero value in one (quantity) column, move them (the zero quantity rows) to the bottom of the sheet, and then delete the rows with a zero quantity (I can delete them manually, but would like to automate the sorting part).
    Thanks for any help anyone can provide here.
    Danny

    I apologize but, as far as I know, Numbers wasn't designed by Ian Flemming.
    There is no "this column will be auto-destructing after two minutes"
    You will have to use your fingers to delete it.
    I wish to add a last comment :
    if your boss has the bad habit to look over your shoulder, it's time to find an other one.
    As I am really pig headed, it's what I did. I became my own boss so nobody looked over my shoulder.
    Yvan KOENIG (VALLAURIS, France) mercredi 13 juillet 2011 20:30:25
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Excel Macro to Delete rows based on user input

    I need help creating a macro that will delete rows in a spreadsheet based on user input. Have little to no experience writing macros.
    Rows are distinguished based on codes in column B, so if the user types "6657", the row with code 6657 should be deleted. Any help would be much appreciated

    Hi,
    Please try the macro:
    Sub Sample()
    Dim Ret As Long
    Ret = Application.InputBox(Prompt:="Please enter a row number", Type:=1)
    If Ret = False Then Exit Sub
    With ActiveSheet
    .Rows(Ret).Delete Shift:=xlUp
    End With
    End Sub
    If you have further question about the VBA code, please post your question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    George Zhao
    TechNet Community Support

  • Need to  color a Table row based on a Column value

    Dear Alll
    I have a requirement to color the rows of a table based on a column value in it. I have tried and surfed many useful materials over the net. but none of them solves my purpose. Please help me, I know that i can used OADataBoundValueViewObject and create a custom css file and apply color to a particular column of a table using a decode in the select statement of that VO.
    But all i need is to color a particular row with a particular color. Need your help with this ........
    Please do reply
    Best Regards
    Edited by: Antony Jayaraj on Mar 27, 2012 8:54 PM

    These posts might help you.
    How to change the row color based on Condition
    Can we colour the rows in the column of a table
    Regards,
    Peddi.

  • Formating the Row Based on one column value

    Hi Friends
    I am trying to format the Entire row based on the value of the first column in my Answers.
    Example if first column value in 'F' now i want the Entire row to be colored
    I can do conditional formating on one column but i want to do it on the entire row
    F     8.1 %     12.0 %
    E     5.2 %     3.5 %
    M     2.3 %     3.3 %
    If any one has done this or any suggestions please respond
    Thanks
    Sang

    Its a Pivot View
    F 8.1 % 12.0 %
    E 5.2 % 3.5 %
    M 2.3 % 3.3 %
    the column 1 --> F,E,M are the Product
    the column 2 --> 8.1% , 5.2% , 2.3% are the sales in year 2008
    the column 3 --> 12.0 % , 3.5 %, 3.3 % are the sales in year 2009
    So will i be able to apply the formating in pivot view based on one column to other column If yes please let me know how or
    suggest if this can be done using the BI Office , or BI publisher
    sing the BI Office i can do the formating in Excel but once i refresh the data all the formating is gone ... :(
    I am donno BI Publisher if we have to use BIP please suggest any solution its very very very urgent and important report formating they need here ....
    Thanks in advance David
    sango

  • Move row based on one duplicated value

    is it possbile to move entire rows base on just the value in the first column?
    1    a
    1    b
    2    c
    2   d
    the result should be
    1   a
    2   c

    Yes - double the header row, then use a formula like the one that I posted but start in row 1, with the formula
    =COUNTIF($A$1:$A1,$A1)
    Then copy down, copy that column, paste as values, and finally, sort the entire table
    based on that value. Then List1 will all have 1s in that column, List2 will have 2s, etc.

  • Deleting rows from a table matching values from an ascii file

    Hi All,
    I have an ASCII file with 12,000 lines. Each line represents a value (you may call this as bad data) that matches a database column value in table. I have to delete all the rows from a database table (~ 400,000 rows) where a column value matches the bad data value. Linux is the OS is where SQLPLUS client is installed and I can execure any SQL queries from this Linux server. Oracle DB server is 10g.
    Any input on how to do this will be helpfull to me. I am not a database programmer so if any details will be appreciated.
    Thanks

    Hi,
    That's going to be very slow (among other problems) if you don't have the bad data in a table. An index-organized table would probably be best.
    Assuming the data data are uinique strings, up to 30 characters long, and that you don't need any other columns, you can create a table like this:
    CREATE TABLE  bad_data
    (   bad_txt    VARCHAR (30)
    ,  CONSTRAINT  bad_data_pk  PRIMARY KEY (bad_txt)
    ) ORGANIZATION INDEX;SQL*Loader is one way of getting the data from the file (doesn't have to be on the database server; it can be on your client machine) into the table.
    Once you have a table, actually removing the rows from the big table might be as simple as:
    DELETE  big_table
    WHERE   column_a  IN
            (   SELECT  bad_txt
                FROM    bad_data
    ;

  • Want to hide the drop down based on text field value

    Hi,
    I want to hide some of the values in drop down based on one text field value.
    I have the field called name which has the value A, B, C, D and also one drop down list which has the values 1,2,3,4,5,6. I want to hide the some of the values in drop down based on A or B or C. Let say, If it is A, drop down value should be 1,3,5. If it is B, Drop down value should be 1,2,3,4. Like this for every record.
    Can you please help me out.
    Thanks
    Ram

    Hi Robert,
    I am trying it in two different way. Please suggest which is the right one and feasible.
    1) I have the drop down list which has all the status. I am trying to hide the drop down values based on one text field value for all records.
    2) I have collected all the drop down values into table in webdynpro method. Rightnow I have two tables.
      one has line items details and another one have drop down values. both tables having common fields.
      I have to show second table values for that particular key, move all of them to drop down.
    Which is the best and feasible option.
    Thanks
    Ram

  • Adding a row based on a total value

    I have the following table
    tablea
    AnID
    Aname
    aTotal
    57
    Agatha
    28
    58
    Bertie
    13
    59
    Guilford
    17
    60
    Francois
    12
    I want to be able to create a query that displays the id aname atotal and also another column called noofrows.  I would like the query to list multiple records for each AnId based on the atotal / 14 e.g. if the aTotal equals 28 then there will be two
    rows for Anid 57 and the Noofrows column will display a1 and a2.  If there result is less than 14 and greater or equal to 1, the total rows must be 1.  If the total is 0 then the rows will be 0. See below the results of this example
    AnID
    Aname
    Total
    Noofrows
    57
    Agatha
    28
    a1
    57
    Agatha
    28
    a2
    58
    Bertie
    13
    a1
    59
    Guilford
    56
    a1
    59
    Guilford
    56
    a2
    59
    Guilford
    56
    a3
    59
    Guilford
    56
    a4
    60
    Francois
    80
    a1
    60
    Francois
    80
    a2
    60
    Francois
    80
    a3
    60
    Francois
    80
    a4
    60
    Francois
    80
    a5
    60
    Francois
    80
    a6
    Can anyone help?

    This was a fun one. This should work for you.
    --drop table #temp
    create table #temp
    AnID int,
    Aname varchar(10),
    total int
    insert into #temp(AnID, Aname, total) values ('57','Agatha','28')
    insert into #temp(AnID, Aname, total) values ('58','Bertie','13')
    insert into #temp(AnID, Aname, total) values ('59','Guilford','56')
    insert into #temp(AnID, Aname, total) values ('60','Francois','12')
    ; WITH CTE (CT,AnID, Aname, Total, Rw)
    as
    select
    1 as CT,
    t.AnID,
    t.Aname, 
    t.total,
    SUM(t.total/14) over (partition by t.AnID, t.Aname order by t.total) as rw
    from #temp t
    UNION ALL
    select
    CT + 1,
    t.AnID,
    t.Aname, 
    t.total,
    SUM(t.total/14) over (partition by t.AnID, t.Aname order by t.total) as rw
    from #temp t
    inner join cte c
    on c.AnID = t.AnID
    where ct <= (rw-1)
    select 
    AnID,
    Aname, 
    total,
    'a' + cast((row_number() over (partition by AnID, Aname, Total order by total)) as varchar(10)) as Noofrows
    from cte 

  • How to group rows based on a formula value

    Hi experts,
    I have a query that returns a a char row (country) and a couple of columns, "Duration of Process in days" and "Counter of nº process done", each a calculated formula KF .
    What I would like is to group the results based on formula KF1 results ""Duration of Process in days".
    For example: from this query result
    Country  -   Duration of Process in Days  -   Counter of nº process done
    ES                      1                                         3
    PT                      3                                         2
    UK                      4                                         3
    IT                       1                                          5
    US                      6                                         2
    FR                      1                                         3
    DE                      4                                         5
    get the following: aggregated by all possible formula values "Duration of Process in Days"
    Duration of Process in Days  -   Counter of nª process
                    1                                       11   (353)
                    3                                         2
                    4                                         8    (3+5)
                    6                                         2
    Is this possible??
    Thanks in advance for your help,
    Best regards,
    Enric

    Hi Vikram,
    my problem is that the "Duration in days" cannot be a characteristic derived in the loading process, as its value depends (is calculated) based on several user's selections done in the variable pop-up screen when executing the report.
    Thanks again for your reply.
    Enric

  • How to retrieving latest row based on a column value

    Hi,
    Lets consider a scenario. I have a table which has a order number, count column which is our fact, a type column which contains types e.g. (A,B) with A has more priority then B. Now in our graph we are getting all rows i.e. if we have two rows in db for order #1 one for type A and one for type B, then it shows us data from both rows in graph.
    But I need only to show one row of type A in this case as A has higher priority than B. The row with type B should not contribute in construction of my graph if type A for same row also exists.
    I tried a solution, for which i created a new column at logical level which contain 1 for A and 0 for B. Now i put Max aggregation rule in it to get maximum value which will be row with Type A in our case. But it did not work.
    How we will can achieve it in OBIEE?
    Thanks.
    Aasim Khan.

    Hi Steve,
    I have a similar requirement... one of the columns in my table is a calculated value based on several xml fields,
    <?xdofx:(MATH01+MATH02+MATH03+MATH04+MATH05+AA+AA1)+((FNDCD01+FNDCD02+FNDCD03+FNDCD04+FNDCD05+MCHCD01+MCHCD02) div '8')?>
    if the resultant value above is less than 62, i do no want to display this entire row in the output. could you help me wout with this?
    thanks
    Domnic

  • Update a row based on the minimum value

    I need to update a row value in a table (table1) which is having one-to-may relationship with another table (table2) based on priority. Below is the table structure and sample data. I have a merge statement which can just do this, but it's taking too much to execute if the data in table2 is huge.
    I want to reduce the execution time, can anyone suggest me another way to do this.
    --Table Definition
    CREATE TABLE TABLE_1 (ENAME VARCHAR2(20), ID NUMBER(20), DISPLAY_NAME VARCHAR2(20), PRIMARY KEY (ENAME));
    CREATE TABLE TABLE_2 (ENAME VARCHAR2(20), DISPLAY_NAME VARCHAR2(20), PRIORITY NUMBER(1));
    --Sample data
    INSERT INTO TABLE_1 (ENAME,ID) VALUES ('EMP1','1000');
    INSERT INTO TABLE_1 (ENAME,ID) VALUES ('EMP2','2000');
    INSERT INTO TABLE_2 (ENAME,DISPLAY_NAME,PRIORITY) VALUES ('EMP1','APPLE',1);
    INSERT INTO TABLE_2 (ENAME,DISPLAY_NAME,PRIORITY) VALUES ('EMP1','DELL',2);
    INSERT INTO TABLE_2 (ENAME,DISPLAY_NAME,PRIORITY) VALUES ('EMP1','MS',NULL);
    --Merge to perfor the update
    MERGE INTO TABLE_1 T USING
    (select ename, display_name from TABLE_2 where (ename,priority) in (
    select distinct ename, min(priority) over (partition by ename) from TABLE_2 min_prior)) Q
    ON (T.ENAME = Q.ENAME)
    WHEN MATCHED THEN UPDATE SET DISPLAY_NAME = Q.DISPLAY_NAME;

    Hi,
    You can use the aggregate FIRST function, like this:
    MERGE INTO     table_1          t
    USING   (
             SELECT    ename
             ,            MIN (display_name) KEEP (DENSE_RANK FIRST ORDER BY priority)     
                              AS first_display_name
             FROM      table_2
             GROUP BY  ename
         )               q
    ON      (t.ename = q.ename)
    WHEN MATCHED THEN UPDATE
    SET      t.display_name      = q.first_display_name
    ;If the combination (ename, priority) is not unique in table_2, then this uses the first display_name (in normal sort order) among those with the lowest priority. This probably can't happen, becuase your original statement would raise an error if it did.
    For performance problems, see the forum FAQ {message:id=9360003}

  • [8i] Way to add a specific nbr of rows based on a column value? (Follow-up)

    I'm dealing with an old database that's being phased out, and here's the version info (yes, it's really old):
    Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
    PL/SQL Release 8.1.7.2.0 - Production
    CORE 8.1.7.0.0 Production
    TNS for HPUX: Version 8.1.7.2.0 - Production
    NLSRTL Version 3.4.1.0.0 - Production
    I believe Frank Kulash gave me the solution to my original question, which was:
    Sample data:
    CREATE TABLE     testabc
    (     item     CHAR(25)
    ,     qty     NUMBER(13,4)
    INSERT INTO     testabc
    VALUES ('Item1',1);
    INSERT INTO     testabc
    VALUES ('Item2',3);
    INSERT INTO     testabc
    VALUES ('Item3',1);
    INSERT INTO     testabc
    VALUES ('Item4',2); Desired results:
    ITEM                                  QTY
    Item1                               1.000
    Item2                               3.000
    --blank row
    --blank row
    Item3                               1.000
    Item4                               2.000
    --blank rowAnd the solution:
    SELECT       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= t.qty
    ORDER BY  t.item
    ,            c.n
    ;Now, it turns out there are only some items which need these extra rows, but I'm not sure if it's possible to only include extra rows for certain items or not...
    Here's my new sample data:
    CREATE TABLE     testabc1
    (     s     CHAR(1)
    ,     item     CHAR(25)
    ,     qty     NUMBER(13,4)
    INSERT INTO     testabc1
    VALUES ('*','Item1',1);
    INSERT INTO     testabc1
    VALUES ('','Item2',3);
    INSERT INTO     testabc1
    VALUES ('*','Item3',3);
    INSERT INTO     testabc1
    VALUES ('*','Item4',2);And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
    S ITEM                                  QTY
    * Item1                               1.000
      Item2                               3.000
    * Item3                               3.000
    --blank row
    --blank row
    * Item4                               2.000
    --blank rowEdited by: user11033437 on Jan 3, 2012 9:27 AM (fixed missing asterisk in desired results)

    Hi,
    Here's a slightly simpler way:
    SELECT       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc1  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= CASE
                       WHEN  t.s  = '*'
                       THEN  t.qty
                     ELSE  1
                 END
    ORDER BY  t.item
    ,            c.n
    ;This is just like the previous solution, except that the WHERE clause, which was originally
    WHERE       c.n     <= t.qtyis now
    WHERE       c.n     <= CASE ... END
    user11033437 wrote:... And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
    S ITEM                                  QTY
    * Item1                               1.000
    Item2                               3.000
    Item3                               3.000
    --blank row
    --blank row
    * Item4                               2.000
    --blank row
    S should be '*' on the output row where item='Item3', right?
    I'm sure you know how to get the s column in the output, but, since I've already tried it:
    SELECT       CASE
              WHEN c.n = 1  THEN  '*'
           END                AS s
    ,       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc1  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= CASE
                       WHEN  t.s  = '*'
                       THEN  t.qty
                     ELSE  1
                 END
    ORDER BY  t.item
    ,            c.n
    ;Edited by: Frank Kulash on Jan 3, 2012 11:11 AM

  • Counting rows based on a column value

    Tricky Query.No offence if this is a repeat please.
    This is a PROD issue in SYBASE.
    TableA has id_flag_listing column
    TableA
    id_flag_listing
    N
    N
    N
    N
    N
    1) If all rows are set to 'N',then my count should be 0.
       PrimaryListing
       0
    2) If there is one row which is 'Y' then this shoud be:
       id_flag_listing
       N
       N
       Y
       N
       N
       PrimaryListing
       1
    How can I count in this manner?
    Do i use decode? I am using
    Select sum(decode(flg_active),'Y',1,0))
    from TABLEA
    Will the above work.??
    I am using SQL for Sybase.
    Please guide?

    Did you even tried the SQL query I've given?
    Your table A
    SQL> SELECT flg_listing
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'N' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA;
    FLG_LISTING
    N
    N
    N
    N
    N
    Your table A, from which I count where are of 'Y' value. In these queries, I change TableA contents.
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'N' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             0
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'Y' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             1
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'Y' FROM DUAL
      9     UNION ALL
    10     SELECT 'Y' FROM DUAL
    11     UNION ALL
    12     SELECT 'Y' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             3Yoann.

  • Count Rows based on an optionaet value in CRM Online Fetchxml Report

    Hi,
        I am new to FetchXml Reports, I have a Report in which i want to Sum the records which have different Optionset values
    Like Profit,NonProfit,Other.
    I want to calculate the number of rows which have options (Profit,NonProfit,NotApplicable) and show in other column.
    Thanks

    in a last row insert an expression:
    =sum(iif(Fields!IsOrganization.Value = "Profit",1,0) + iif(Fields!IsOrganization.Value = "NonProfit",1,0) + iif(Fields!IsOrganization.Value = "NotApplicable",1,0))
    It will count all rows with "Profit", "NonProfit" and "NotApplicable" text in IsOrganization field.

Maybe you are looking for

  • Problem Accessing the iSQPlus in Oracle 10g

    Hi, What is the possible cause of this problem: Can't access the iSQLPlus in the browser. Message was edited by: knight

  • GP email notification received only on server restart

    Hi, We are unable to send immediate notification mails using "Send Notification Callable Object" in a workflow Application developed using Webdynpro for Java using GP API. We receive all pending emails in bulk only when the system is restarted - thes

  • Wrong photo creation date

    Hi, I have just created a new intelligent album that should only contain photos from 1999. The creation date in the Finder's Get Info window is 1999. But as I worked on these pix yesterday in Photoshop as Aperture didn't recognize those old JPEGs at

  • Reg: Bill Presentment Architecture

    Hi all, I want to build sales invoice using BPA. How to accomplish this.. Weather i have to build query according to invoice.. Help me.. I am new to this.

  • Boot camp cannot be opened

    I got this message when I open boot camp. Process:         Boot Camp Assistant [569] Path:            /Applications/Utilities/Boot Camp Assistant.app/Contents/MacOS/Boot Camp Assistant Identifier:      com.apple.bootcampassistant Version:         4.0