Change font colour to red if value less than zero

Please forgive as I am not sure if this should go to the SQL or Application Thread..
My questions is regarding SQL in Application Express
I want to display my field (ADJ (INCL GST) in a red colour if its value is less than zero
here is SQL code
select "TW_BILL_ADJ_DATA"."CUSTOMER" as "CUSTOMER",
"TW_BILL_ADJ_DATA"."ORIGINATER" as "ORIGINATOR",
CASE WHEN (CREDITDEBIT) = 'Credit' THEN (0 - ADJUSTMENT_INCL_GST) ELSE ADJUSTMENT_INCL_GST END "ADJ (INCL GST)"
from TW_BILL_ADJ_DATA

Thankyou for the example above, after much searching I have also found another way to perform the same task
select     "BILL_DATA"."BILLING_CODE",
CASE WHEN (CREDITDEBIT) = 'Credit' then
          '<span style="color:Red;">'
          || TO_CHAR (0 - "ADJUSTMENT_INCL_GST", 'FML999G999G999G999G990D00')|| '</span>'
                         else
          '<span style="color:Green;">'
          || TO_CHAR ( "ADJUSTMENT_INCL_GST", 'FML999G999G999G999G990D00')|| '</span>'
                         end "Adj (incl GST)"
from TW_TABLE
-----------------------------------------------------------------------------------

Similar Messages

  • Condition for excluding Sales value less than or equal to 0

    Hello Experts,
    I have to create condition in the query designer to exclude Sales Value <=0, and that should be applied to all the column values and result values when we put active.
    Can anyone help ?
    Thanks in advance,
    Venky
    Duplicate Post
    Condition for excluding Sales value less than or equal to 0
    Edited by: Arun Varadarajan on Apr 13, 2010 8:57 PM

    Hello Naveen,
    Thanks for quick reply. I have created condition greater than zero and executed report, i can able to eliminate rows with sales value <=0, but we have other columns in the report say Quantity, Backlog... when we run the report without condition the values which showed are same when we put it in active aslo.
    After eliminating few rows which having some quantity value, that value should be deducted from the result of the quantity. I tried with applying apply to results opton, then also there is no change in the result value of the quantity.
    Our requirement is to apply condition to eliminate rows which are sales value <=0 and same the result values of the columns should effect.
    Is it possible in anyway, if yes please specify solution.
    Thanks,
    Venky

  • Java.sql.SQLException: Invalid precision value. Cannot be less than zero

    Hi,
    In my portlet application have several jsf tables which bind to several oracle tables. I have tested the portlet in pluto and tried to deploy it on liferay. However, I get an exception stating:
    java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    What could this exception mean? Has anyone else encountered this?
    Marc
    P.S. The trace is shown below:
    Feb 6, 2007 12:34:56 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Cach
    edRowSetDataProvider.java:343)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(Ca
    chedRowSetDataProvider.java:300)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(Cache
    dRowSetDataProvider.java:624)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.
    java:806)
    at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableR
    owGroup.java:429)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowCount(TableRowGroup
    .java:749)
    at com.sun.rave.web.ui.component.Table.getRowCount(Table.java:307)
    at com.sun.rave.web.ui.renderer.TableRenderer.renderTitle(TableRenderer.
    java:400)
    at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(TableRenderer.
    java:123)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
    a:683)

    I've dug deeper into this problem and am able reproduce the error in the Pluto server. To reproduce this error, I modified my Oracle jdbc driver from the JSC embedded driver (smoracle.jar) to the Oracle native driver (ojdbc14.jar). Now, I am getting the exception in my Sun Application Server:
    What is the difference between ojdbc14.jar and smoracle.jar that could cause this problem? What can I do so that I can fix this problem for ojdbc14.jar?
    Thanks,
    Marc
    P.S.
    The problem is with the clob column (DOR_NOTE_TX). The stack trace is:
    [#|2007-02-06T09:00:53.663-0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=16;|
    Reader executing query ps=0 SELECT DOR_NOTE_DT, DOR_NOTE_TX FROM DOR.DOR_NOTE_DATA WHERE DOR_NOTE_CD='SECURITY' AND TO_CHAR(DOR_Note_Dt, 'mm/dd/yyyy') = '02/05/2007'
    No Params|#]
    [#|2007-02-06T09:00:53.679-0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|
    java.sql.SQLException: Invalid precision value. Cannot be less than zero
    Message was edited by:
    marcnikko

  • MY new Ipod Nano does not hold a charge.  I use it mostly as a watch, perhaps look at it 5 or 6 times in 8 hours, and leave it in sleep mode the rest of the time.  I drains to the red line in less than 2 days.  My husband's nano will last a week this way.

    MY new Ipod Nano does not hold a charge.  I use it mostly as a watch, perhaps look at it 5 or 6 times in 8 hours, and leave it in sleep mode the rest of the time.  I drains to the red line in less than 2 days.  My husband's nano will last a week this way.  I thought it drained because of looking at photos, so I quit looking at them and it made no difference.  Am I doing something incorrectly to cause this short battery life?

    You are still under warranty if your iPod is "new."  Take full advantage of it by either calling iPod tech support, Apple Care if you have it or take it in to an Apple store or an AASP.  Whichever is more convenient for you.

  • Store value less than current week and year.

    Hi All,
    I have a table called BACKLOG whose structure is like this
    ITEM_NUMBER   YEAR_WEEK   MS
    1N58          2012-WK02   01/15/2012
    1N58          2011-WK02   01/15/2011current from my procedure i am storing the value in my new table which is less than current week. But i want to store the value less than current week and current year. Please help me to get how i can do this.
    PROCEDURE BACKLOG_PROC_LT_CW IS
      BEGIN
    DELETE BACKLOG_LT_CW;
    COMMIT;
          INSERT INTO BACKLOG_LT_CW
            SELECT
                  DC_UTIL.GEN_YEAR_WEEK(MS) YEAR_WEEK,
                  ITEM_NUMBER,
                  MSD
                  FROM BACKLOG
              where to_char(MS, 'IW')<to_char(sysdate, 'IW');
      END BACKLOG_PROC_LT_CW;Currently with the above procedure code both the value is storing in my BACKLOG_LT_CW table but if you see the data of BACKLOG table you will find YEAR_WEEk 2012-WK02 falls in next year but still it is storing in my table because i have taken IW only. Please help me to get the soln
    Thanks in advance
    Regards

    Are you looking for this?
    where to_char(MS, 'YYYYIW')<to_char(sysdate, 'YYYYIW');

  • Partitioning (range) a table values less than 'A'

    i am referring
    http://docs.oracle.com/cd/B10501_01/server.920/a96524/c12parti.htm
    http://docs.oracle.com/cd/B19306_01/server.102/b14220/partconc.htm
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    create table drop_it as select * from mv_prod_search_det2;     
    CREATE TABLE DROP_IT_P(
    PROD_DETAILS VARCHAR2(1000 BYTE),
         SIGN VARCHAR2(42 BYTE)
    PARTITION BY RANGE(PROD_DETAILS)
    PARTITION MAX_VALUE VALUES LESS THAN (MAXVALUE)
    update drop_it set prod_details=upper(prod_details);     
    72000 rows updated
    ALTER TABLE drop_it_p EXCHANGE PARTITION MAX_VALUE WITH TABLE drop_it WITH VALIDATION;     
    select * from mv_prod_search_det2
    72000 rows selected
    exec dbms_stats.gather_database_stats;
    select * from drop_it_p partition(max_value)
    ALTER TABLE DROP_IT_P
      SPLIT PARTITION MAX_VALUE AT ('B%')
      INTO (PARTITION p_a,
            PARTITION MAX_VALUE);     
    select * from drop_it_p partition(p_a);
    6785 rows selected
    select * from drop_it_p partition(p_a) where prod_details not like 'A%'     
    696 rows selectedit even shows me values that start with W,V,I,1,2,3,4,24,5 etc
    although the number is less(696out of 6785) this is undesired
    please help me eliminate these rows
    thank you
    this thread is related to tuning regexp_like by author 946207
    please refer
    tuning regexp_like
    and partitioning a table by 946207
    Edited by: 946207 on Dec 2, 2012 1:52 AM
    Edited by: 946207 on Dec 2, 2012 11:02 PM

    First, when you post related threads you should cross-link them so people have access to all of the information about the problem you are trying to work with.
    partitioning a table
    >
    it even shows me values that start with W,V,I,1,2,3,4,24,5 etc
    although the number is less(696out of 6785) this is undesired
    >
    Yes - that is what it should be doing.
    These are the steps you took to populate the table
    1. You originally inserted ALL data into table 'drop_it' with no restriction on the PROD_DETAILS values.
    create table drop_it as select * from mv_prod_search_det2;     2. Then you converted the PROD_DETAILS value to upper case. That has no effect on numbers or other non-alphabetic characters.
    update drop_it set prod_details=upper(prod_details);3. Then you create a new table with only one partition using MAXVALUe
    PROD_DETAILS VARCHAR2(1000 BYTE),
         SIGN VARCHAR2(42 BYTE)
    PARTITION BY RANGE(PROD_DETAILS)
    PARTITION MAX_VALUE VALUES LESS THAN (MAXVALUE)
    );4. Then you populate the partitioned table by exchange. It now has the same data including the numeric data.
    ALTER TABLE drop_it_p EXCHANGE PARTITION MAX_VALUE WITH TABLE drop_it WITH VALIDATION;     5. Then you split the one MAXVALUE partition into two partitions. One with data < 'B%' and one with the remaining data that sorts higher based on your character set.
    ALTER TABLE DROP_IT_P
      SPLIT PARTITION MAX_VALUE AT ('B%')
      INTO (PARTITION p_a,
            PARTITION MAX_VALUE);     The split on 'B%' when creating partition p_a is equivalent to you 'WITH VALUES < 'B%'. Since PROD_DETAILS is a VARCHAR2 datatype that 'LESS THAN' comparison uses the character order based on your database character set and most, if not all, character sets have characters that sort lower than the uppercase alphabetic characters.
    For example in the ASCII character set an uppercase 'A' is decimal 65 so 64 other characters (including the digitis 0-9) sort lower than 'A'.
    http://www.asciitable.com/
    As the doc you cited shows
    >
    •All partitions, except the first, have an implicit lower bound specified by the VALUES LESS THAN clause on the previous partition.
    >
    That 'first' partition has no lower bound so ALL data, including digits, that sort less than 'B%' will be in that partition.
    >
    please help me eliminate these rows
    >
    Either don't select the data to begin with or remove it using a simple DELETE query. Also you can do the case conversion when you select the data.
    create table drop_it as select upper(prod_details) prod_details, sign from mv_prod_search_det2 where upper(prod_details >= 'A';Before you do that you should make sure you define the actual business rule you want to use to define the data you really want to keep and exclude.
    Because most, if not all, character sets also have characters that sort HIGHER than the alphabetic characters. That ASCII table shows five of them. If you don't filter them out you will get data where the values start with those characters.
    Even if you do filter them out there is nothing in what you posted that would prevent a user from inserting that data back into the table.
    And, of course, there are characters that sort BETWEEN the lower and upper case alphabetics.
    You need to determine what the allowable characters are in the PROD_DETAILS column and add code (e.g. check constraint or trigger) to make sure users can't enter data that includes those characters.

  • E2136 ySubscriptXOffset is less than zero -11

    Hallo,
    Every (or mostly) italic fonts generated by the FDK give the the
    following error code from the MS Fontvalidator.
    E2136 ySubscriptXOffset is less than zero -11
    Is this a real problem?
    Andreas

    We believe this is a bug inthe Font Validator, and have reported it to Microsoft. There are perfectly good reasons to have automatic subscript to shift stuff to the left with an italic font.
    T

  • How to report only quantities less than zero on a calculated field

    I do not understand why my text will not work when it comes to reporting only 'Missing POs' less than zero, I assume it is because I am using 'int' on some fields?
    Any advice?
    SELECT
    t0.father as 'Parent Code',
    t2.itemname as 'Parent Description',
    t2.frgnname as 'Parent Status',
    t0.code as 'Child Code',
    t1.itemname as 'Child Description',
    t1.frgnname as 'Child Status',
    t0.comment as 'Master',
    cast(t3.onhand as int) as 'Child Uncommitted Stock',
    cast(t3.iscommited as int) as 'Child Committed Stock',
    (cast(t3.onhand as int) - cast(t3.iscommited as int)) as 'Child Free Stock',
    cast(t3.onorder as int) as 'Purchase Orders',
    (cast(t3.onhand as int) - cast(t3.iscommited as int)) + cast(t3.onorder as int) as 'Missing POs'
    FROM
    itt1 t0
    inner join oitm t1 on t0.code = t1.itemcode
    inner join oitm t2 on t0.father = t2.itemcode
    LEFT JOIN OITW T3 ON T3.WHSCODE = T0.Warehouse AND T3.ItemCode = T0.Code
    Where T3.WHSCODE Like '[%0]%' and 'Missing POs' < 0
    ORDER BY
    'Missing POs' asc, t0.father, t0.code
    Many thanks,
    Robin (I will be awarding points on all my outstanding questions shorlty - management time pressure at mo!)

    Try this:
    SELECT
    t0.father as 'Parent Code',
    t2.itemname as 'Parent Description',
    t2.frgnname as 'Parent Status',
    t0.code as 'Child Code',
    t1.itemname as 'Child Description',
    t1.frgnname as 'Child Status',
    t0.comment as 'Master',
    cast(t3.onhand as int) as 'Child Uncommitted Stock',
    cast(t3.iscommited as int) as 'Child Committed Stock',
    (cast(t3.onhand as int) - cast(t3.iscommited as int)) as 'Child Free Stock',
    cast(t3.onorder as int) as 'Purchase Orders',
    (cast(t3.onhand as int) - cast(t3.iscommited as int))
      + cast(t3.onorder as int) as 'Missing POs'
    FROM
    itt1 t0
    inner join oitm t1 on t0.code = t1.itemcode
    inner join oitm t2 on t0.father = t2.itemcode
    LEFT JOIN OITW T3 ON T3.WHSCODE = T0.Warehouse AND T3.ItemCode = T0.Code
    Where T3.WHSCODE Like '%0%' and (cast(t3.onhand as int) - cast(t3.iscommited as int))
      + cast(t3.onorder as int) < 0
    ORDER BY
    (cast(t3.onhand as int) - cast(t3.iscommited as int))
      + cast(t3.onorder as int),t0.father, t0.code

  • The document contains no posting lines with value other than zero

    Hi!
    We are having problems posting a invoice in MIRO. When entering the PO number we receive the error message "The document contains no posting lines with value other than zero".
    What could be the problem?
    /Anders

    Hi!
    The GR_BASEDIV is set in the PO. The PO is replicated from SRM where this flag has been set for no reason. Only GR and IV are set and we have implemented a note 1155266 so that Confirmation-Related IV will not be set.
    How come it is set anyway?
    Sincerely
    Anders

  • Umbraco CMS - startindex cannot be less than zero error is showing instead of 404 error page

    I am running into an issue with an Umbraco website.
    If I miskey the URL on a top level page, e.g. mysite.com/wrongpage I get an asp error.
    If I miskey it on a subpage, even if the top level page is incorrect too, I get my correct 404 error e.g. mysite.com/wrongpage/wrongpage2
    At this point I'm trying to find out whether it's a bug in Umbraco 4.11.10 or if this error is caused by something obvious. I'm completely stuck and not particularly technical (I'm not a developer).
    If anyone could help explain what this error means, and/or if there's any way to correct or bypass it I would really appreciate the help.
    The full contents of the error are: 
    Server Error in '/' Application.
    StartIndex cannot be less than zero.
    Parameter name: startIndex
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
    Parameter name: startIndex
    Source Error: 
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace: 
    [ArgumentOutOfRangeException: StartIndex cannot be less than zero.
    Parameter name: startIndex]
    System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +10698829
    System.String.Substring(Int32 startIndex) +12
    AutoFolders.NotFoundHandler.Execute(String url) +538
    Umbraco.Web.Routing.LookupByNotFoundHandlers.HandlePageNotFound(PublishedContentRequest docRequest) +1148
    Umbraco.Web.Routing.LookupByNotFoundHandlers.TrySetDocument(PublishedContentRequest docRequest) +10
    Umbraco.Web.Routing.PublishedContentRequestBuilder.<LookupDocument1>b__1e(IPublishedContentLookup lookup) +15
    System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
    Umbraco.Web.Routing.PublishedContentRequestBuilder.LookupDocument1() +198
    Umbraco.Web.Routing.PublishedContentRequestBuilder.LookupDocument() +195
    Umbraco.Web.Routing.PublishedContentRequest.ProcessRequest(HttpContextBase httpContext, UmbracoContext umbracoContext, Action`1 onSuccess) +139
    Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +339
    Umbraco.Web.UmbracoModule.<Init>b__7(Object sender, EventArgs e) +80
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

    Hi Aaronb9,
    Since the issue regards ASP.NET and website deployment. I suggestion you post the question in the ASP.NET forums at
    http://forums.asp.net/. It is appropriate and more experts will assist you.
    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.
    Click
    HERE to participate the survey.

  • Control account balance isn't less than zero

    Dear buddies:
    I wanna control  that account balance isn't less than zero when entering G/L document. I remember there is a warnning message for bank account, but I forgot how to configurate it!
    Please you help me, thanks!
       sherky

    Hello
    Not sure what customizing you refer to but you can do this control trough a validation at complete document level.
    Regards
    Javier

  • Text caption changes font/colour/size

    Hi
    The Recording Defaults for the Text Caption in the prferences has not been altered.
    On some slides I need to add a text caption.
    I'm finding that sometimes when I click to add a Text Caption the font, colour and size is different to what the default settings are. The default is Arial, 12, #0000FF.
    When I manually add a text caption it'll show as System, 10 and black.
    Has anyone come across this before?  Is there a way to stop it.  It's really annoying and a time waster to have to manually change the font, size and colour.  And you have to be on your guard.  It's not every time I manually add a text caption, just sometimes.  It's intermittent.
    Thanks
    Anita

    Hi there
    The name will vary from version to version.
    Captivate_v10.dat
    Captivate_v20.dat
    Captivate_v30.dat
    Captivate_v40.dat
    The location also varies. For me, it is:
    D:\Documents and Settings\Rick\Application Data\Adobe\Adobe Captivate
    As you can see, D is my drive letter. Yours will likely be C. My name is Rick and is how I log in. Yours will be different. Also, the "Application Data" folder is likely to be hidden from your view unless you adjust Windows to show it to you. And all of this is likely in a different location if you are using Vista or Windows 7. I'm using XP Pro.
    Note that you cannot edit this file. Captivate does that internally. About all you are able to do is to close Captvate and delete or rename it. Captivate will then cook up a fresh one when it starts up and cannot locate it.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Need to change font colour of a PDF file how can this be done?

    I would like to modify a PDF file, ie change the font colour.  Does anyone know which version Adobe I will need?  I currently have Adobe Reader I dont think I can do this in reader? Thank you.

    You need Acrobat Std or Pro for this
    http://www.adobe.com/products/acrobat/editing-pdf-documents.html

  • How do I change font colour permanently in Mail.

    Can someone tell me how to permanently change the font colour in Mac Mail.  I have changed it from black to blue in preferences and also when I bring up the new message screen have changed to blue there also, but it still types out in black.  So I would be very grateful if someone could tell me what I am doing wrong.
    Thanks
    Ann

    Many thnks!  I'm an old and experienced PC user who recently made the switch to a Mac.  Love the Mac, but it does take some time to learn all the differences.
    Jim in MA

  • Conditional Formatting - how to change cell colour based on cell value

    I am in the process of moving some Excel spreadsheets into Numbers on my iPad. The Excel spreadsheet had conditional formatting in certain cells. If the cell value was less than a certain amount (<46 for example), the cell background would automatically turn yellow.
    Is there any way to make Numbers on iPad do this?
    Thanks for any help you can provide.
    Scott

    I beleive this is one of those doable tings on desktop that gets taken out on ipad. If you would like to suggest this as an idea for apple to put in, please go to http://www.apple.com/feedback

Maybe you are looking for

  • Using page life cycle (OnPageLoadBackingBeanB)class to update page controls

    I used the onPageLoadbackingBeanbase class that exists in SRDemo to handle the page life cycle for my project ADF faces pages but found that the controls is null in all phases of the page How can i use the page life cycle for dealing with the page co

  • Latest version Of Oracle

    Hi, Can you Please update me the latest vesion of oracle for Production & Development side. Cheers, Moorthy.GS

  • To deinstall Grid Agent using response file

    HI. I have installed Agent on Oracle 10g using response file but now need to uninstall. I need to uninstall since after deleting old Agent home the response installer is complaining that I need to remove everything from old Agent home I have searched

  • Simplified chinese vs Traditional chinese.

    Hi! I'm doing a java application which displays some chinese characters. These chinese characters can either be in Simplified chinese format or Traditional chinese format. I use unicode to get these chinese characters and store them into a hashmap in

  • FM9 (TCS2) Installation Not On SSD?

    I just came across this entry under "Requirements" for a TCS2 installation: > 6.5GB of available hard-disk           space for installation; additional free space required           during installation (cannot install on flash-based           storage