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 

Similar Messages

  • 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.

  • 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

  • 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

  • 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.

  • Changing the font color for the complete row based on the Keyfigure Values

    Hi Experts,
    Can any one help me to find a solution for this?.
    I have a requirement, in which the Font color for the complete Row needs to be set to RED in Bex Report, when the corresponding Row Keyfigure is more than a particular value.
    Ex: Notification-Material-Customer-Def Qty-delivered Qty
          1000000 - XXXXX- AAAAAA-10-1000
    in the above example, when the Defect qty increses more than 10, then the complete Row Including the characterstics, Notification, Material, and customer Should be Highlighted in Red. This has to happen automatically once the Query is refreshed.
    Please let me know if you have any suggestion here?.
    Regard,
    Muruganand.K

    Hi,
    Step 1: Click the Format Menu in Excel(BEX Analyzer)
    Step 2: Click the Style submenu
    Step 3: there will be number of SAPBEX formats available. Each of these relates to another cell of BEx (Header, Cell Data,
                Result  Row, Hierarchies, etc.). Also, they depend on data types.
    Step 4: Select SAPBEXchatext
    Step 5: Click Modify. This displays all the standard formatting option as shown below.
    Step 6: Select Font, Color (Background/ Font).
    Step 7: Click OK on both the screens. The entire BEx output result row Font and color is modified.
    Hope it helps........
    Regards,
    Suman

  • Line item pricing based on total value of the order

    Hi,
    We need to charge as a separate line item (material) 'Insurance' as a % based on the total value of the order less one line item. Our orders are created on the web and posted via a BAPI.
    (a) depending on where the customer is located, we charge a certain added shipping cost.
    (b)  the customer has the choice to ask for insurance or not.
    The actual order may be 10 lines totaling $1,000 and due to location, the BAPI slaps on an added line item of $100. If the customer chose the insurance option, the BAPI needs to slap on another line item whose value would be, say 2% of the total order, i.e. 2% of 1000 (instead of on 1000+100). Of course, if the customer doesn't choose this option he is not charges this extra line and further if the customer is not in the particular region, the 100 charge may also not be there.
    The 2% can vary time to time so needs to be driven by a condition record based on %.
    How can we achieve this in the pricing procedure? The logic of how the BAPI will function is clear to us, we are stuck on the pricing procedure configuration.
    Glad to answer any further questions you may need for clarifications.
    Many thanks!

    Ideally insurance would be levied on end customer based on Inco Terms like CIF, DDU etc.,
    So you can have an access sequence for which you can make use of tables like 033 & 034 in V/07.  In VK11, for this combination, maintain the required insurance percent.
    In condition type V/06, for this condition type, maintain "C" for Manual entries, since you have indicated that customer has the choice.  Otherwise, this can be populated automatically in sale order.
    Similarly, for shipment cost also, you can have the Inco2 as one of the combination so that based on region, this condition type will be populated in sale order.  If you have shipment cost configured, then this can be achieved.
    In your pricing procedure, you have to assign the shipment cost condition type next to insurance and assign the From-To step accordingly.
    thanks
    G. Lakshmipathi

  • JTable row color based on a certain value

    Can anyone please show some code on how
    I can change the background color of an entire
    row based on a string value from the first column ?
    Every time that the first column contains the
    string "TOTAL", I want the entire row to have
    another background color.
    Thanks a lot

    Override getTableCellRendererComponent in Table celll renderer.
    public class MyTableCellRenderer extends DefaultTableCellRenderer
    public MyTableCellRenderer()
    super();
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column)
    Component comp = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
              ((JLabel)comp).setOpaque(true);
    if(value.equals("TOTAL")
    comp.setBackGround(color);
    else
    set whatever the default background color

  • 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 !

Maybe you are looking for

  • Failed to set Subscriptions on the WSUS Server. Error:(-2147467259)Unspecified error

    Recently restored SCCM 2012 SP1 from Sever 2008 R2, to Server 2012 R2. I had Updates Publisher installed on old 2008 Server with Firefox and Chrome imported into Configuration Manager. Since I have upgraded I am no longer able to sync updates with Mi

  • Where is the Format Bar in 5.0?

    Where is the Format Bar in Pages 5.0?  It would also appear that some of the tools such as list styles that were formerly available are missing as well.

  • Pls Help me with my hp mini laptop

    Pls Help me with  my hp mini laptop system disabled [69005685] This question was solved. View Solution.

  • Reader 10.1.3 freezes SAP

    We have the SAP GUI 7.2 and within the GUI when we view a pdf it opens fine, just like opening a pdf in IE.  When we click the email button it will open outlook and have the pdf attached to send the email.  At this point when we send the email as nor

  • Magic Bullet Looks, Why not GPU?

    Why these kind of plugins are not GPU accelrated, Its very hard to work on 1980x1080 footage if u apply MBL. Even CS6 can't do any magic on this. I heard somwhere in FCP, MBL runs like butter.