Using Syle Function to colorize the backgorund of cells in an AdvancedDataGrid

I would like to use a Style Function to colorize cells in an
AdvancedDataGrid. I can get the foreground color set sucessfully
with {color : "yellow"}. I cannot seem to get the background color
set -- I have tried background, backgroundcolor, backgrounColor,
bgcolor and bgColor - all with no success. Any ideas woul be
appeciated.

Hi,
Please visit the URL below for implementation details
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&product Id=2
Hope this helps

Similar Messages

  • Use SQL function to get the original order number using the invoice number

    Hi All,
    wondering is someone can help me with this challenge I am having?  Often I need to return the original order numbers that created the resulting invoce.  This is a relatively simple seriese of joins in a query but I am wanting to simplify it using a SQL function that can be referenced each time easily from with in the SELECT statement.  the code i currently have is:
    Use SQL function to get the original order number using the invoice number
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    RETURN @OrderList 
    END
    it is run by the following query:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number here'
    The issue is that this returns the order number for all of the lines in the invoice.  Only want to see the summary of the order numbers.  ie if 3 orders were used to make a 20 line inovice I only want to see the 3 order numbers retuned in the field.
    If this was a simple reporting SELECT query I would use SELECT DISTINCT.  But I can't do that.
    Any ideas?
    Thanks,
    Mike

    Thanks Gordon,
    I am trying to get away from the massive table access list everytime I write a query where I need to access the original order number of the invoice.  However, I have managed to solve my own problem with a GROUP BY statement!
    Others may be interested so, the code is this:
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    GROUP BY T6.DocNum
    RETURN @OrderList 
    END
    and to call it use this:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number'

  • Error using LISTAGG function to aggregate the strings.

    HI
    I am using LISTAGG function to aggregate the strings but throws a error ORA - 19011
    The output of the aggregated function exeeds the varchar limit.
    I dont know how to change it to a LOB.
    Can you please help me.
    This is the code.
    I have used both the functions.
    RTRIM(XMLAGG(XMLELEMENT(e,FDCT.USER_NAME || ' ')).extract('//text()'), ' ')
    or
    LISTAGG(FDCT.USER_NAME, ',') WITHIN GROUP (ORDER BY FDCT.USER_NAME)
    Edited by: 787819 on Jun 22, 2011 1:46 PM

    If a function returns a VARCHAR2, then it will error (or sometimes truncate depending on function) when reaching the limit of the datatype.
    Perhaps an alternative would be to write your own user-defined aggregate function that works with a CLOB.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10765/aggr_functions.htm#ADDCI2120
    A comma-separated string over 32767 in length sounds of dubious value to me anyway...

  • I have just updated my iPhone to version 5.1, and the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. Can someone help??

    I have just updated my iPhone to version 5.1. After the update, the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. It happens to my friends as well. What should I do? Can someone help?? Thanks!!!!

    Slide the camera button up

  • Can I use "dvt" function for customizing the chart format in OBIEE 11g?

    Hi,
    ".pcxml" file cannot be found in OBIEE11g. However, can I use "dvt" function for customization? If yes, how?
    Reference for dvt function:
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12418/tagdoc/dvt_pieGraph.html

    Hello,
    I know it's possible, because i already found some blogs about changing the chart colors and turning off the animated graphs.
    <Graph visualEffects="NONE" animationDuration="0">
    But we want to alter more chart options, like make a bar chart default stacked. In 10G this was possible. I think this is also
    possible in 11G through the dvt-graph-skin.xml, but what i want to know is, is there a document that explains which tags you could use in this file.
    It would be great to get some help on this.

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Using analytic function to get the right output.

    Dear all;
    I have the following sample date below
    create table temp_one
           id number(30),  
          placeid varchar2(400),
          issuedate  date,
          person varchar2(400),
          failures number(30),
          primary key(id)
    insert into temp_one values (1, 'NY', to_date('03/04/2011', 'MM/DD/YYYY'), 'John', 3);
    insert into temp_one values (2, 'NY', to_date('03/03/2011', 'MM/DD/YYYY'), 'Adam', 7);
    insert into temp_one values (3, 'Mexico', to_date('03/04/2011', 'MM/DD/YYYY'), 'Wendy', 3);
    insert into temp_one values (4, 'Mexico', to_date('03/14/2011', 'MM/DD/YYYY'), 'Gerry', 3);
    insert into temp_one values (5, 'Mexico', to_date('03/15/2011', 'MM/DD/YYYY'), 'Zick', 9);
    insert into temp_one values (6, 'London', to_date('03/16/2011', 'MM/DD/YYYY'), 'Mike', 8);this is output I desire
    placeid       issueperiod                               failures
    NY              02/28/2011 - 03/06/2011          10
    Mexico       02/28/2011 - 03/06/2011           3
    Mexico        03/14/2011 - 03/20/2011          12
    London        03/14/2011 - 03/20/2011          8All help is appreciated. I will post my query as soon as I am able to think of a good logic for this...

    hI,
    user13328581 wrote:
    ... Kindly note, I am still learning how to use analytic functions.That doesn't matter; analytic functions won't help in this problem. The aggregate SUM function is all you need.
    But what do you need to GROUP BY? What is each row of the result set going to represent? A placeid? Yes, each row will represent only one placedid, but it's going to be divided further. You want a separate row of output for every placeid and week, so you'll want to GROUP BY placeid and week. You don't want to GROUP BY the raw issuedate; that would put March 3 and March 4 into separate groups. And you don't want to GROUP BY failures; that would mean a row with 3 failures could never be in the same group as a row with 9 failures.
    This gets the output you posted from the sample data you posted:
    SELECT       placeid
    ,             TO_CHAR ( TRUNC (issuedate, 'IW')
                  , 'MM/DD/YYYY'
                ) || ' - '|| TO_CHAR ( TRUNC (issuedate, 'IW') + 6
                                             , 'MM/DD/YYY'
                               )     AS issueperiod
    ,       SUM (failures)                  AS sumfailures
    FROM        temp_one
    GROUP BY  placeid
    ,            TRUNC (issuedate, 'IW')
    ;You could use a sub-query to compute TRUNC (issuedate, 'IW') once. The code would be about as complicated, efficiency probably won't improve noticeably, and the the results would be the same.

  • How can I use oracle function to decode the encode value

    Hi everybody,
    If the data is encode value how can I decode this value

    DBMS_OBFUSCATION_TOOLKIT
    DBMS_OBFUSCATION_TOOLKIT allows an application to encrypt data using either the Data Encryption Standard (DES) or the Triple DES algorithms.
    The Data Encryption Standard (DES), also known as the Data Encryption Algorithm (DEA) by the American National Standards Institute (ANSI) and DEA-1 by the International Standards Organization (ISO), has been a worldwide encryption standard for over 20 years. The banking industry has also adopted DES-based standards for transactions between private financial institutions, and between financial institutions and private individuals. DES will eventually be replaced by a new Advanced Encryption Standard (AES).
    DES is a symmetric key cipher; that is, the same key is used to encrypt data as well as decrypt data. DES encrypts data in 64-bit blocks using a 56-bit key. The DES algorithm ignores 8 bits of the 64-bit key that is supplied; however, developers must supply a 64-bit key to the algorithm.
    Triple DES (3DES) is a far stronger cipher than DES; the resulting ciphertext (encrypted data) is much harder to break using an exhaustive search: 2**112 or 2**168 attempts instead of 2**56 attempts. Triple DES is also not as vulnerable to certain types of cryptanalysis as is DES. DES procedures are as follows:
    DESEncrypt Procedure
    DESDecrypt Procedure
    Oracle installs this package in the SYS schema. You can then grant package access to existing users and roles as needed. The package also grants access to the PUBLIC role so no explicit grant needs to be done.
    This chapter discusses the following topics:
    Overview of Key Management
    Summary of DBMS_OBFUSCATION Subprograms
    Overview of Key Management
    Key management, including both generation and secure storage of cryptographic keys, is one of the most important aspects of encryption. If keys are poorly chosen or stored improperly, then it is far easier for a malefactor to break the encryption. Rather than using an exhaustive key search attack (that is, cycling through all the possible keys in hopes of finding the correct decryption key), cryptanalysts typically seek weaknesses in the choice of keys, or the way in which keys are stored.
    Key generation is an important aspect of encryption. Typically, keys are generated automatically through a random-number generator. Provided that the random number generation is cryptographically secure, this can be an acceptable form of key generation. However, if random numbers are not cryptographically secure, but have elements of predictability, the security of the encryption may be easily compromised.
    The DBMS_OBFUSCATION_TOOLKIT package does not generate encryption keys nor does it maintain them. Care must be taken by the application developer to ensure the secure generation and storage of encryption keys used with this package. Furthermore, the encryption and decryption done by the DBMS_OBFUSCATION_TOOLKIT takes place on the server, not the client. If the key is passed over the connection between the client and the server, the connection must be protected using Oracle Advanced Security; otherwise the key is vulnerable to capture over the wire.
    Key storage is one of the most important, yet difficult aspects of encryption and one of the hardest to manage properly. To recover data encrypted with a symmetric key, the key must be accessible to the application or user seeking to decrypt data. The key needs to be easy enough to retrieve that users can access encrypted data when they need to without significant performance degradation. The key also needs to be secure enough that it is not easily recoverable by an unauthorized user trying to access encrypted data he is not supposed to see.
    The three options available to a developer are:
    Store the key in the database
    Store the key in the operating system
    Have the user manage the key
    Storing the Key in the Database
    Storing the keys in the database cannot always provide bullet-proof security if you are trying to protect data against the DBA accessing encrypted data (since an all-privileged DBA can access tables containing encryption keys), but it can provide security against the casual snooper, or against someone compromising the database files on the operating system. Furthermore, the security you can obtain by storing keys in the database does not have to be bullet-proof in order to be extremely useful.
    For example, suppose you want to encrypt an employee's social security number, one of the columns in table EMP. You could encrypt each employee's SSN using a key which is stored in a separate column in EMP. However, anyone with SELECT access on the EMP table could retrieve the encryption key and decrypt the matching social security number. Alternatively, you could store the encryption keys in another table, and use a package to retrieve the correct key for the encrypted data item, based on a primary key-foreign key relationship between the tables.
    A developer could envelope both the DBMS_OBFUSCATION_TOOLKIT package and the procedure to retrieve the encryption keys supplied to the package. Furthermore, the encryption key itself could be transformed in some way (for example, XORed with the foreign key to the EMP table) so that the key itself is not stored in easily recoverable form.
    Oracle recommends using the wrap utility of PL/SQL to obfuscate the code within a PL/SQL package itself that does the encryption. That prevents people from breaking the encryption by looking at the PL/SQL code that handles keys, calls encrypting routines, and so on. In other words, use the wrap utility to obfuscate the PL/SQL packages themselves. This scheme is secure enough to prevent users with SELECT access to EMP from reading unencrypted sensitive data, and a DBA from easily retrieving encryption keys and using them to decrypt data in the EMP table. It can be made more secure by changing encryption keys regularly, or having a better key storage algorithm (so the keys themselves are encrypted, for example).
    Storing the Key in the Operating System
    Storing keys in the operating system (that is, in a flat file) is another option. With Oracle8i you can make callouts from PL/SQL, which you could use to retrieve encryption keys. If you store keys in the O/S and make callouts to retrieve the keys, the security of your encrypted data is only as secure as the protection of the key file on the O/S. Of course, a user retrieving keys from the operating system would have to be able to either access the Oracle database files (to decrypt encrypted data), or be able to gain access to the table in which the encrypted data is stored as a legitimate user.
    User-Supplied Keys
    If you ask a user to supply the key, it is crucial that you use network encryption, such as that provided by Oracle Advanced Security, so the key is not passed from client to server in the clear. The user must remember the key, or your data is nonrecoverable.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_obtool.htm#ARPLS028
    Joel P�rez

  • How to use Mail functionality OPTT in the Schema

    Dear All,
        We have a requirement where we need to send a mail to the Time Administrator if Time Evalution ends in Error.  We have implemented the functionality OPTT MAIL option in the schema, but it is not sending the mail to Time Administrator. We have maintained the Time Administrator table T526 with the SAP ID.
    Could anybody tell us, we have to do anyother configuration to enable the mail function
    Thanks in Advance
    Rajesh.S

    Hello Folks,
        Can anyone please let me know How to send a mail notification to the Time Administrator.
    In the Schema, OPTT MAIL 1 has declared.
    The Time Administrator is maintained in T526 table.
    Do we need to do other than above to send mail.
    Kindly let me know.
    Note. The COLER function is not used in the Schema.

  • How to Insert & Return a Row using a Function based on the Input parameter

    Hi Guys, Plz help me the following code i am converting from Sql Server to Oracle.
    I want equivalent code in Oracle.
    ALTER FUNCTION [dbo].[GetDateRange]
         @Period     VARCHAR(50)
    RETURNS @DateRange TABLE(StartDate     DATETIME,EndDate DATETIME,[Name] NVARCHAR(500), [Description] Nvarchar(2000) )
    AS
    IF(LTRIM(RTRIM(@Period)) = 'LQ')
    BEGIN
    ''''CALCULATION
              INSERT INTO @DateRange
                             StartDate,
                             EndDate,
    [Name],
    [description]
                   SELECT     @StartDate,@EndDate,'Last Quarter',
    'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+ ' to '+Cast(@EndDate as Nvarchar(11))
    END
         RETURN
    END
    above Function i am using in another Procedure
    select ----
    FROM     dbo.SalesFact SF ,
                   dbo.DateDimension DD,                    
                   dbo.GetDateRange('LY') GDR
         WHERE     DD.DateKeyID = SF.BillDateKeyID AND
                   DD.Date >= GDR.StartDate AND
                   DD.Date < GDR.EndDate
    Edited by: 801668 on Oct 11, 2010 10:26 PM

    hi i'm sending again the following code
    ALTER FUNCTION [dbo].[GetDateRange]
         @Period     VARCHAR(50)
    RETURNS @DateRange TABLE
    (StartDate     DATETIME,     EndDate     DATETIME,[Name] NVARCHAR(500), [Description] Nvarchar(2000) )
    AS
    BEGIN
    DECLARE @ToDay          DATETIME,
    @StartDate     DATETIME,
    @EndDate     DATETIME
    DECLARE
    @V_Getdate DATETIME
    ,@V_Getdate_2 DATETIME
    ,@V_dateA datetime
    ,@V_dateB datetime
    ,@V_dateC datetime
    ,@V_dateD Datetime
    ,@StartFirstdayofquarter datetime
    ,@EndLastdayofthequarter datetime
    ,@quater int
    ,@FirstdayofPreviousyr Datetime
    ,@LastdayofPreviousyr Datetime
    ,@FirstdayofPreviousyr6MTD Datetime
    ,@TodayDayOfWeek INT
    ,@EndOfPrevWeek DateTime
    ,@StartOfPrevWeek DateTime
    ,@V_Date_1 datetime
    ,@V_P6MV1 datetime
    ,@V_P6MV2 Datetime
    ,@StartFirstdayofquarter_1 datetime
    ,@EndLastdayofthequarter_1 datetime
    ,@i int
    ,@CurrentRowNum int
    ,@CurrentQuarter int
    ,@V_Startdate datetime
    ,@V_Startdate2 datetime
    ,@V_enddate datetime
    ,@V_Quarter int
    ,@V_rownum int
    SET @Period=LTRIM(RTRIM(@Period))
    SET @V_Getdate = (SELECT CONVERT(DATETIME,(SELECT CONVERT(VARCHAR(10),(Select LastETLDate from Parameterconfig),101))))
    --Where parameterconfig is a table
    SET @V_Getdate_2=@V_Getdate
         IF(LTRIM(RTRIM(@Period)) = 'LQ')
         BEGIN
    SET @ToDay = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(10),@V_Getdate,101) + ' 00:00:00.000'))--#Ch003
    --If Today is in between 1st January to 31st March then return
    --1st Oct of previous year as StartDate and 1st Jan of present year as EndDate
    IF((DATEPART(MM,@ToDay) = 1) OR (DATEPART(MM,@ToDay) = 2) OR (DATEPART(MM,@ToDay) = 3 ))
    BEGIN
    SET @StartDate = (SELECTCONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,DATEADD(YYYY,-1,@ToDay))) +'-10-01 00:00:00.000'))
    SET @EndDate = (SELECTCONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-01-01 00:00:00.000'))
         INSERT INTO @DateRange(StartDate,EndDate,[Name],[description]     )
         SELECT     @StartDate,@EndDate,'Last Quarter',
    'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+ ' to '+Cast(@EndDate as Nvarchar(11))
    END
         --If Today is in between 1st April to 30th June then return
         --1st Jan of present year as StartDate and 1st April of present year as EndDate
    IF((DATEPART(MM,@ToDay) = 4) OR (DATEPART(MM,@ToDay) = 5) OR (DATEPART(MM,@ToDay) = 6 ))
    BEGIN
    SET @StartDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-01-01 00:00:00.000'))
    SET @EndDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-04-01 00:00:00.000'))
         INSERT INTO @DateRange(StartDate,EndDate,[Name],[description]     )
    SELECT     @StartDate,@EndDate,'Last Quarter ',
    'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
    END
    --If Today is in between 1st July to 30th September then return
    --1st April of present year as StartDate and 1st July of present year as EndDate
    IF((DATEPART(MM,@ToDay) = 7) OR (DATEPART(MM,@ToDay) = 8) OR (DATEPART(MM,@ToDay) = 9 ))
    BEGIN
    SET @StartDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-04-01 00:00:00.000'))
    SET @EndDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-07-01 00:00:00.000'))
    INSERT INTO @DateRange(StartDate,EndDate,[Name],[description])
    SELECT     @StartDate,@EndDate,'Last Quarter',
    'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
    END
              --If Today is in between 1st Oct to 31St Dec then return
              --1st July of present year as StartDate and 1st Oct of present year as EndDate
    IF((DATEPART(MM,@ToDay) = 10 ) OR (DATEPART(MM,@ToDay) = 11) OR (DATEPART(MM,@ToDay) = 12 ))
    BEGIN
    SET @StartDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-07-01 00:00:00.000'))
    SET @EndDate = (SELECT     CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
              '-10-01 00:00:00.000'))
    INSERT INTO @DateRange(StartDate,EndDate,[Name],[description])
    SELECT     @StartDate,@EndDate,'Last Quarter',
    'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
    END
    END
    RETURN
    END
    above function i'm using in another procedure. which acts as a virtual table. for joining purpose.

  • Using analytic function to get the data

    Hi
    Version is 11g
    My table has this data
    NAME SALARY LAST_UPDA
    a 1000 01-JAN-07
    a 2000 01-JAN-09
    a 2500 01-JUN-10
    b 2000 01-AUG-10
    c 5000 01-JUN-07
    c 6000 08-JAN-09
    c 4500 01-FEB-10
    I want to pick the salary and name of the person when it was last updated (max(last_update_date)).
    Couple of ways of doing this I think are
    SELECT distinct name,
    TRUNC(
    AVG(salary) KEEP (DENSE_RANK LAST
    ORDER BY TO_CHAR(last_update_Date,'YYYY') )
    OVER (PARTITION BY NAME)
    ) t
    FROM kmdebug;
    OR
    SELECT * FROM KMDEBUG
    WHERE (LAST_UPDATE_DATE, NAME) IN (SELECT MAX(LAST_UPDATE_DATE), NAME
    FROM KMDEBUG
    GROUP BY NAME);
    They give the desired result.
    NAME SALARY LAST_UPDA
    a 2500 01-JUN-10
    b 2000 01-AUG-10
    c 4500 01-FEB-10
    But the problem with the first version is DISTINCT. I want to get result set without using DISTINCT
    The problem with second version is, it could be inefficient way of doing it espeically when KMDEBUG table would be big.
    Thank you
    MSK

    A couple of thoughts.
    1. 11g is not a version number.
    SELECT * FROM v$version;2. Read the FAQ and learn how to use tags to format your listing so others can read it. (blue circular icon to the right)
    3. Post DDL to create your table and DML to load your sample data.
    Then, perhaps, someone can try your query and consider how to get you what you want.
    And, when you make requests like "without using DISTINCT" you need to explain why. Because otherwise this just looks like someone trying to get us to do their homework for them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Select using XMLAGG function cutting off the string

    Hello,
    I have string "Oracle & Oracle", when run thru the following statement I am getting &amp as not full string,
    how to avoid this and to get the right values
    SQL> select col1 from t;
    COL1
    SQL & SQL
    Test & Test
    Oracle & Oracle
    SQL> select
      2  RTRIM (XMLAGG (XMLELEMENT (E,XMLATTRIBUTES (col1|| ',' AS "Seg"))ORDER BY col1 ASC).EXTRACT ('./E[not(@Seg = preceding-sibling::E/@Seg)]/@Seg'),',') col1
      3  from t;
    COL1
    Oracle &amp; Oracle,SQL &amp; SQL,Test &amp; TestThe expected output is
    COL1
    Oracle & Oracle,SQL & SQL,Test & TestAny help would be greatly appreciated
    Thanks,

    Hi,
    & has a special meaning in XML.
    One way to avoid the problem is to avoid using '&' in your XML opeations. If you can identify some string that never occurs in col1 (I used '~?~' below) then you can change all the '&'s in col1 to that string before doing the XML operations, and change all the '~?~'s back to '&'s afterwards, like this:
    select  REPLACE ( RTRIM ( XMLAGG ( XMLELEMENT ( E
                                                     , XMLATTRIBUTES (  REPLACE ( col1
                                                  , '~?~'
                                                       || ',' AS "Seg"
                                       ) ORDER BY col1 ASC
                                 ).EXTRACT ('./E[not(@Seg = preceding-sibling::E/@Seg)]/@Seg')
              , '~?~'
              )    AS new_col1
    from    t;

  • I am writing a program that needs to draw gradient lines according to the points that i touch on ipad. For this i am using "DrawLinearGradient" function. But the 2 colors that i am giving for drawing gradient is not dividing equally in the complete line.

    Can anyone please help about the parameters that need to be passed corectly.
    CGColorSpace colorSpace = CGColorSpace.CreateDeviceRGB();
    CGColor[] colors = {UIColor.Red.CGColor,UIColor.Green.CGColor};
    float[] locations = {0.0f,0.5f,0.5f,1.0f};
    CGGradient gradient = new CGGradient(colorSpace,colors,locations);
    ColorMessage.FontSize = width;
    context.SetLineWidth(width);
    context.SaveState();
    context.Clip();
    context.DrawLinearGradient(gradient,penVertices[0],penVertices[count-1],0);
    context.StrokePath();
    gradient.Dispose();
    colorSpace.Dispose();
    context.RestoreState();

    Wouldn't this be better posted in a developers forum? This forum is for Using an iPad, not writing programs for one.

  • How to use custom function for formatting the Line Chart Axes?

    Hi...
    I'm using a Line chart who's y axis value range from 0 to 50000. This is a number which it gets from it's dataProvider. I want to format this and show it as
    $50,000
    $40,000
    $30,000
    $20,000
    $10,000
    $0
    instead of
    50000
    40000
    30000
    20000
    10000
    0
    Here's my linechart code:
    <mx:LineChart id="revTimeLineChart"
                width="100%" height="100%"
                showDataTips="true" >
                <mx:horizontalAxis>
                   <mx:CategoryAxis id="lcCatAxis" categoryField="name"/>
                </mx:horizontalAxis>
                <mx:series>
                   <mx:LineSeries id="ls" yField="revenue" displayName="Revenue" showDataEffect="{slideIn}"/>      (yField is what I want to format....)
                </mx:series>
    </mx:LineChart>
    Can you please let me know how can this be achieved?
    Cheers!
    Deepak

    Hi,
    You could do something like this,
    http://www.codersrevolution.com/index.cfm/2008/10/14/Flex-Charting-Format-your-X-and-Y-Axi s
    hope it helps!
    Regards ,
    Bhavika

  • Use of substr function will avoid the use of indexes in a table

    i have one table which will contain some 3,00,000 records, it contains some 11 primary keys i am using some update statements to update some fields in the records (of 3,00,000 i will compare some 1,50,000 records with 1,50,000 another records) i am using substr function in all the select statements. whether usage of substr function will avoid the use of index
    can any one clarify?

    contains some 11 primary keys by this I suppose you mean to say the table has a composite PK on 11 columns.
    i am using substr function in all the select statementsCould you please post your SQL statement?

Maybe you are looking for