Pattern matching problme - not getting desired result.

Hi,
According my program , If 'san' is in 'sangeetha', then it should display "hello".
but I am getting only 'hi'
Why ? any idea?
<%@ page import="java.util.regex.Pattern"%>
<%
if(Pattern.matches("san", "sangeetha"))
out.println("hello");
else
out.println("hi");
%>
Result : Hi

sangee wrote:
Hi,
According my program , If 'san' is in 'sangeetha', then it should display "hello".No, that isn't what your patten say. You should read about regular expressions and learn how to use them, or switch to String.indexOf or contains.
Kaj

Similar Messages

  • Not getting desired result in Calculated column

    Hi
    I am using below formula in a caculated column,
    =IF(OR(ISBLANK([Start Date]),ISBLANK([End Date])),"",IF(ISERROR(DATEDIF([End Date],TODAY(),"d")),(IF(ISERROR(DATEDIF([Start Date],TODAY(),"d")),IF([Start Date]-TODAY()<=7,"New",""),"Ongoing")),IF(DATEDIF([End
    Date],TODAY(),"d"),"Completed","Ongoing")))
    my requirement is that
    1. If start date, or end date is blank the value of Status column is blank
    2. when the today date is 7 days before the start date value of Status column is New
    3. If the Today date is between the Start date and end date value of Status column is Ongoin
    4. If the Today date is after the End datevalue of Status column is Completed
    Thanks
    Paru

    Hi Paru,
    Please check the data type returned from formula.
    In SharePoint 2013, we can use JSLink to achieve your requirement.
    Example code:
    https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I lost my password and i could get into my phone, i tried but it said connect to itune. i did, but i did not get any result. please give me some advises how do i get my password back or reset with a new one?

    Ipjone6, silver, 64GB
    I lost my password and i could get into my phone, i tried but it said connect to itune. i did, but i did not get any result. please give me some advises how do i get my password back or reset with a new one?

    how to reset password:
    https://iforgot.apple.com/password/verify/appleid

  • Custom Search Portlet not getting the results as expected.

    Hi All,
    I am using CustomSearchPortlet and I am having following problems. I created an itemtype IT with attributes A1,A2.Then I configured my custom search portlet to search based on A1,A2 attributes only. I have created 3 instances of items Item1,Item2,Item3 based on itemtype IT as follows
    Item1(A1=value11,A2=value12)
    Item2(A1=value21,A2=cat22)
    Item3(A1=value11,A2=value32)
    and when I search for value11, I get Item1,Item3 as results. Till here it was nice and behaving as expected. Suddenly after some time, it stopped working and i am not getting the results I used to get before. The only thing i remember to have changed in the meanwhile was to change the A2 attribute values of some of these items. my searchtext remained the same as value11. I was confused as to why the custom search portlet is not getting these results that it was getting before...Thanks for any help in solving this.
    Thanks,
    Prasanth.

    Hi,
    If Oracle Text is enabled in your portal, the updated items need to be synchronised before they can be returned in the Search. Since you updated those items, though not changing values for this particular attribute, it will be in the queue for indexing and hence will not be returned until it is indexed.
    Thanks.

  • Without using SubReport or SQL Command in Main Report, get desired results without duplicating

    It seems so simple.  I just need the cost, at a certain time (based on a parameter), for each item.  I wrote a SQL Command that works beautifully, but when it connects to the existing report, it slows to a horrible crawl and cannot be used for tables with over 4 million records.  Here is the SQL Command that provides the desired results:
    SELECT TOP 1 WITH TIES "INVENTITEMPRICE"."ITEMID", "INVENTITEMPRICE"."PRICETYPE", "INVENTITEMPRICE"."MARKUP", "INVENTITEMPRICE"."PRICEUNIT", "INVENTITEMPRICE"."PRICE", "INVENTITEMPRICE"."PRICEQTY", "INVENTITEMPRICE"."ACTIVATIONDATE", "INVENTITEMPRICE"."DATAAREAID"
    FROM ("AX09PROD"."dbo"."INVENTITEMPRICE" "INVENTITEMPRICE" INNER JOIN "AX09PROD"."dbo"."INVENTTABLE" "INVENTTABLE" ON (("INVENTITEMPRICE"."ITEMID"="INVENTTABLE"."ITEMID") AND ("INVENTITEMPRICE"."DATAAREAID"="INVENTTABLE"."DATAAREAID")))
    WHERE  ("INVENTITEMPRICE"."DATAAREAID"=N'TMC' AND "INVENTITEMPRICE"."PRICETYPE"=0 AND "INVENTITEMPRICE"."ACTIVATIONDATE"<={?As Of Date})
    ORDER BY ROW_NUMBER () OVER(PARTITION BY "INVENTITEMPRICE"."ITEMID" ORDER BY "INVENTITEMPRICE"."ACTIVATIONDATE" DESC)
    I've attached the report with saved data.  However, when I remove the restrictions of just certain items, it is unusable as it is SO SLOW!
    I can also get the desired results from using a subreport but it takes forever to export due to the number of records/items.  Whenever possible, I avoid subreports for this reason.  I've attached that report with data as well.
    Please be patient as I'm not savvy in SQL, but decent in generating reports.  What am I doing wrong?  This seems SO simple.  The premise is that I want the corresponding information based on the date entered:  If the date entered is 3/15/2014, the result should be 91.15 as indicated below.  I'd simply like this value to be placed in a formula per item.
    Item 80014:
    Activation Date
    Cost Price
    6/2/2014
    104.43
    4/1/2014
    91.58
    3/1/2014
    91.15
    2/1/2014
    92.89
    1/1/2014
    93.57
    Any assistance would be GREATLY appreciated!
    Thanks!
    Teena
    Update:  I was unable to attach the reports with .rpt or .txt extensions.  There were well under 1MB.  Any suggestions?

    hi Teena,
    if you're going the inline subquery route, try something like the following...the last line in the sub-query 'where' clause should in theory take care of matching the correct price based on relating the item id's between your cost price & inventory data. this should leave you with distinct values for each itemid then. hopefully it won't error out as i'm just guessing on the syntax.
    SELECT DISTINCT
    "INVENTTABLE"."ITEMID",
    "INVENTTRANS"."DATAAREAID",
    "INVENTTRANS"."DATEPHYSICAL",
    "INVENTTRANS"."QTY",
    "INVENTTABLE"."ITEMGROUPID",
    "INVENTTABLE"."ITEMNAME",
    "INVENTTRANS"."TRANSREFID",
    "INVENTTRANS"."STATUSISSUE",
    "INVENTTABLE"."ITEMTYPE",
    "INVENTTRANS"."TRANSTYPE",
    "INVENTTRANS"."RECID",
    "INVENTTRANS"."DIRECTION",
    SELECT TOP 1 "INVENTITEMPRICE"."PRICE"
    FROM "AX09PROD"."dbo"."INVENTITEMPRICE" "INVENTITEMPRICE"
    WHERE  "INVENTITEMPRICE"."DATAAREAID" LIKE 'TMC%'
    AND "INVENTITEMPRICE"."PRICETYPE"=0
    AND "INVENTITEMPRICE"."ACTIVATIONDATE"<={?As Of Date}
    AND "INVENTITEMPRICE"."ITEMID" = "INVENTTABLE"."ITEMID"
    ORDER BY "INVENTITEMPRICE"."ACTIVATIONDATE" DESC
    ) AS ITEMPRICE
    FROM  
    "AX09PROD"."dbo"."INVENTTABLE" "INVENTTABLE"
    LEFT OUTER JOIN "AX09PROD"."dbo"."INVENTTRANS" "INVENTTRANS"
    ON ("INVENTTABLE"."DATAAREAID"="INVENTTRANS"."DATAAREAID")
    AND ("INVENTTABLE"."ITEMID"="INVENTTRANS"."ITEMID")
    WHERE 
    "INVENTTRANS"."DATAAREAID" LIKE 'TMC%'
    AND (("INVENTTABLE"."ITEMGROUPID" LIKE 'RAW%') OR ("INVENTTABLE"."ITEMGROUPID" BETWEEN '000' AND '999') OR ("INVENTTABLE"."ITEMGROUPID" LIKE 'Ship_Box'))
    AND "INVENTTABLE"."ITEMTYPE" IN (0,1)
    ORDER BY 
    "INVENTTABLE"."ITEMGROUPID",
    "INVENTTABLE"."ITEMID",
    "INVENTTRANS"."DATEPHYSICAL" ASC
    Message was edited by: Jamie Wiseman

  • Help!!!it's not the desired result of oci bulk update!!

    here is demo_update of oci/samples cdemodr1.c,i modified a little,and the other of cdemodr1.c keeps unchanged:
    1.
    give the result:
    after demo_insert
    in4[i] = 400.555 + (float)i;//c4 value
    get the result:
    C1 C4
    1 400.554993
    2 401.554993
    3 402.554993
    4 403.554993
    5 404.554993
    6 405.554993
    7 406.554993
    8 407.554993
    9 408.554993
    10 409.554993
    i expect to update c4 value to:
    in4[i] = 1401.555 + (float)i;
    and get the result:
    C1 C4
    1 1400.554993
    2 1401.554993
    3 1402.554993
    4 1403.554993
    5 1404.554993
    6 1405.554993
    7 1406.554993
    8 1407.554993
    9 1408.554993
    10 1409.554993
    but after my modified demo_update,
    the result is not the expectation,
    the resule is:
    C1 C4
    1 1403.55505
    2 1403.55505
    3 1403.55505
    4 1403.55505
    5 1403.55505
    6 1403.55505
    7 1403.55505
    8 1403.55505
    9 1403.55505
    10 1403.55505
    2.
    table create script:
    create table TAB1
    c1 integer not null
    c2 char(40),
    c3 varchar2(40),
    c4 float,
    c5 decimal,
    c6 decimal(8,3),
    c7 numeric,
    c8 numeric(7,2),
    c9 date,
    c10 raw(40),
    constraint ind_tab1
    organization index;

    3.
    here is my modified demo_update():
    please help me to check out where it goes wrong!!
    thank you!!!
    static sword demo_update(OCISvcCtx svchp, OCIStmt stmthp,
    OCIBind bndhp[], OCIError errhp)
    int i, j;
    int range_size = 3; /* iterations */
    sb4     len;
    * This function updates columns in table TAB1, for certain rows
    * depending on the values of the :low and :high values in
    * in the WHERE clause. It executes this statement 3 times, (3 iterations)
    * each time with a different set of values for :low and :high
    * Thus for each iteration, multiple rows are returned depending
    * on the number of rows that matched the WHERE clause.
    * The rows it updates here are the rows that were inserted by the
    * cdemodr1.sql script.
    /* The Update Statement with RETURNING clause */
    text sqlstmt = (text )
    "UPDATE TAB1 SET C2 = :1, C3 = :1, \
    C4 = :1, C5 = :1, C6 = :1, \
    C7 = :1, C8 = :1, C9 = :1, C10 = :1 \
    /* Prepare the statement */
    if (OCIStmtPrepare(stmthp, errhp, sqlstmt, (ub4)strlen((char *)sqlstmt),
    (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIStmtPrepare() update\n");
    report_error(errhp);
    return OCI_ERROR;
    /* Initialise the buffers for insertion */
    for (i = 0; i < MAXITER; i++)
    //in1[i] = 300 + i;
    memset((void *)in2, (int) 'a'+i%26, (size_t) 40);
    memset((void *)in3[i], (int) 'A'+i%26, (size_t) 40);
    in4[i] = 1401.555 + (float)i;
    in5[i] = 500 + i;
    in6[i] = 600.280 + (float)i;
    in7[i] = 700 + i;
    in8[i] = 800.620 + (float)i;
    in9[i][0] = 119;
    in9[i][1] = 185 - (ub1)i%10;
    in9[i][2] = (ub1)i%12 + 1;
    in9[i][3] = (ub1)i%25 + 1;
    in9[i][4] = 0;
    in9[i][5] = 0;
    in9[i][6] = 0;
    for (j = 0; j < 40; j++)
    in10[i][j] = (ub1) (i%0x08);
    rowsret[i] =0;
    len = /*sizeof(in1[0]) + */sizeof(in2[0]) + sizeof(in3[0]) + sizeof(in4[0]) + sizeof(in5[0])
         + sizeof(in6[0]) + sizeof(in7[0]) + sizeof(in8[0]) + sizeof(in9[0]) + sizeof(in10[0]);
    /* Bind all the input buffers to place holders (:1, :2. :3, etc ) */
    //if (bind_input(stmthp, bndhp, errhp))
    // return OCI_ERROR;
    if (/*OCIBindByPos(stmthp, &bndhp[0], errhp, (ub4) 10,
    (dvoid *) &in1[0], (sb4) sizeof(in1[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    ||*/ OCIBindByPos(stmthp, &bndhp[1], errhp, (ub4) 1,
    (dvoid *) in2[0], (sb4) sizeof(in2[0]), SQLT_AFC,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[2], errhp, (ub4) 2,
    (dvoid *) in3[0], (sb4) sizeof(in3[0]), SQLT_CHR,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[3], errhp, (ub4) 3,
    (dvoid *) &in4[0], (sb4) sizeof(in4[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[4], errhp, (ub4) 4,
    (dvoid *) &in5[0], (sb4) sizeof(in5[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[5], errhp, (ub4) 5,
    (dvoid *) &in6[0], (sb4) sizeof(in6[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[6], errhp, (ub4) 6,
    (dvoid *) &in7[0], (sb4) sizeof(in7[0]), SQLT_INT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[7], errhp, (ub4) 7,
    (dvoid *) &in8[0], (sb4) sizeof(in8[0]), SQLT_FLT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[8], errhp, (ub4) 8,
    (dvoid *) in9[0], (sb4) sizeof(in9[0]), SQLT_DAT,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT)
    || OCIBindByPos(stmthp, &bndhp[9], errhp, (ub4) 9,
    (dvoid *) in10[0], (sb4) sizeof(in10[0]), SQLT_BIN,
    (dvoid *) 0, (ub2 *)0, (ub2 *)0,
    (ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIBindByPos()\n");
    report_error(errhp);
    return OCI_ERROR;
    if (/*OCIBindArrayOfStruct(bndhp[0], errhp, s1, indsk[0], rlsk[0], rcsk[0])
    ||*/ OCIBindArrayOfStruct(bndhp[1], errhp, s2, indsk[1], rlsk[1], rcsk[1])
    || OCIBindArrayOfStruct(bndhp[2], errhp, s3, indsk[2], rlsk[2], rcsk[2])
    || OCIBindArrayOfStruct(bndhp[3], errhp, s4, indsk[3], rlsk[3], rcsk[3])
    || OCIBindArrayOfStruct(bndhp[4], errhp, s5, indsk[4], rlsk[4], rcsk[4])
    || OCIBindArrayOfStruct(bndhp[5], errhp, s6, indsk[5], rlsk[5], rcsk[5])
    || OCIBindArrayOfStruct(bndhp[6], errhp, s7, indsk[6], rlsk[6], rcsk[6])
    || OCIBindArrayOfStruct(bndhp[7], errhp, s8, indsk[7], rlsk[7], rcsk[7])
    || OCIBindArrayOfStruct(bndhp[8], errhp, s9, indsk[8], rlsk[8], rcsk[8])
    || OCIBindArrayOfStruct(bndhp[9], errhp, s10, indsk[9], rlsk[9], rcsk[9]))
    (void) printf("FAILED: OCIBindArrayOfStruct()\n");
    report_error(errhp);
    return OCI_ERROR;
    (void) printf("\n\n DEMONSTRATING UPDATE....RETURNING \n");
    if (OCIStmtExecute(svchp, stmthp, errhp, (ub4) range_size, (ub4) 0,
    (CONST OCISnapshot*) 0, (OCISnapshot*) 0,
    (ub4) OCI_DEFAULT))
    (void) printf("FAILED: OCIStmtExecute() update\n");
    report_error(errhp);
    return OCI_ERROR;
    /* Commit the changes */
    (void) OCITransCommit(svchp, errhp, (ub4) 0);
    /* Print out the values in the return rows */
    //(void) print_return_data(range_size);
    return OCI_SUCCESS;

  • Not getting subvi results back in main VI

    I've got a subvi that I using in another subvi that then gets used in the main VI.  The results from the first subvi transfer to the second subvi correctly but the results do not get transfered into the main VI.  I've wired the connecotr in the second subvi and the main VI the same way.  Can't labview transfer information like this?
    I've attached a few jpg's for clarity, or attempted clarity!

    Ah ha!
    The while loop ends in the first subvi by a time out, it finishes the array of tests then sends results to a spreadsheet.
    Attachments...(hopefully it works this time)
    Attachments:
    top_level.JPG ‏47 KB
    subvi.JPG ‏67 KB
    mid-level.JPG ‏25 KB

  • Not getting desired fact measures in answers

    Hello, In my schema I have 2 fact tables and 5 Dimension tables. In a particular case, I have two fact tables F1 and F2 and a Dimension D1.
    The relationship is like this D1 -< F1>- F2. That is there exist a relationship between the fact tables.
    In my repository I have D1-<F1 and D1-<F2
    Now, in Answers, when I am selecting a column from D1 and a measure column from F1 and F2 both; I am getting blank results and only values for Dimension Column are shown. When I remove one of the Fact columns I can see the values from Dimension and Fact measures and vice-versa.
    Any idea why this is happening and how can I correct it?
    Thank you for your time!

    Ashish,
    This scenario has been discussed so widely resulting with no widely accepted solution.
    Note: Bmm layer is not good at supporting joins between multi-star schemas - in other words between multi fact tables, apart from summary or aggregate tables. Whenever a query involving a non-conformed dimension is fired, the fact table that doesn't have a direct raltionship with the dimension is treated as null.
    Thus to overcome such kind of scenarios here are 2 solutions I recommend:
    1. To eliminate nulls in f2 column when f1,f2& d1 are queried associate f2 measures with grand total level of d1. <-- It is associated with only a grand total level just becasue it does not in anyway refer to dimension d1, when compared to other levels which have keys associated with dimension. (I assume this as a quirk in OBIEE).
    2. Create an logical table source alias (by dragging f2 onto sources folder) and within this logical source join f1 to d2 and d2 to f2 (hope now you understand, we are joining them through a conformed dimension). Thus whenever a query invloving f1,f2,d1 is fired is routed through this source. <-- You might ask why i need to route only through d2? well it is a conflicting scenario and is left upto the developers.
    mark as answered if helpful& let me know if you have further questions.
    P.S Also i think i did publish a post on this on my blog...
    -bifacts :-)
    http://www.obinotes.com
    Edited by: bifacts on Nov 3, 2010 11:26 PM

  • Group by Query not giving desired results

    Hi,
    I've a requirement to find minimum month based on status:
    The following query is giving error :
    SELECT
              b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
              MIN(a.period_name)
    FROM     table a,
         table b
    WHERE     a.app_id     =     b.app_id
    AND          b.app_name      =     'NAME1'
    AND          a.book_id     =     &book_id
    AND          a.status      =      'O'
    GROUP BY      b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
    for ex: in the above query if I've four records with status 'O' and period_name as 'May-12', 'Jun-12','Jul-12' ,'Aug-12' then I need to pick 'May'
    Thanks,
    Kiran

    Hi, Kiran,
    user518071 wrote:
    Hi,
    I've a requirement to find minimum month based on status:
    The following query is giving error :
    SELECT
              b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
              MIN(a.period_name)
    FROM     table a,
         table b
    WHERE     a.app_id     =     b.app_id
    AND          b.app_name      =     'NAME1'
    AND          a.book_id     =     &book_id
    AND          a.status      =      'O'
    GROUP BY      b.app_name,
              DECODE (a.status,
              'C','Closed',
              'O','Open',
              'F','Future',
              'W','Pending',
              'N','Not Opened') decode_status
    for ex: in the above query if I've four records with status 'O' and period_name as 'May-12', 'Jun-12','Jul-12' ,'Aug-12' then I need to pick 'May'
    Thanks,
    KiranIt looks like you're almost there.
    If period_name is a DATE, then
    MIN (a.period_name)is finidng the earliest period name, such as 5 May 2012 17:03:49. If you just want to see 'May 2012', then change that to
    TO_CHAR ( MIN (a.period_name)
            , 'Mon YYYY'
            )If a.period_name is a VARCHAR2, then change it to a DATE. The best way to do this is permanently. There is no reason to store date information in VARCHAR2 columns. Oracle supplies DATE columns; there's no extra cost for using them. DATE columns were designed for storing date information, use them to do that.
    if you must keep your date information in VARCHAR2 a column, then use TO_DATE in the query. It will be slow, and you'll have run-time errors if any of the information is in the wrong format. That's what happens when you store date information in VARCHAR2 columns.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • The dashboard propmt not showing desired results

    Hi,
    I have propmt created using this condition.But it is not showing me the desired results.The code seems to be correct.any help plz...
    case when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 0 and 30 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 0 and 30 then '30 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 31 and 60 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 31 and 60 then ' last 60 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 then 'last 90 days'
    else '> 90 and max 100 Days' end

    Hi,
    Create a dummy column for the below code
    case when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 0 and 30 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 0 and 30 then '30 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 31 and 60 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL2,CURRENT_DATE) between 31 and 60 then ' last 60 days'
    when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 or TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 61 and 90 then 'last 90 days'
    else '> 90 and max 100 Days' endfilter it as is prompted for that column after giving filter as is prompted you can hide that column or remove it.
    Save the report
    Assign points and close thread, if your question is answered....
    Cheers,
    Aravind

  • Problem in query not getting desired output .

    i have the following table
    mysql> select * from emp;
    +------+-------+--------+-------+
    | eid  | ename | salary | depid |
    +------+-------+--------+-------+
    |   11 | ram   | 5000   | d1    |
    |   22 | shyam | 3000   | d1    |
    |   23 | mohan | 5500   | d2    |
    |   44 | radha | 8000   | d3    |
    |   48 | abhi  | 10000  | d3    |
    +------+-------+--------+-------+
    i am  executing  the following query :
    mysql> select  depid,count(depid) from emp where salary >5100 group by depid;
    and getting following result :
    +-------+--------------+
    | depid | count(depid) |
    +-------+--------------+
    | d2    |            1 |
    | d3    |            2 |
    +-------+--------------+
    2 rows in set (0.00 sec)
    i wants out put like this :
    +-------+--------------+
    | depid | count(depid) |
    +-------+--------------+
     |d1    |            0 |
    | d2    |            1 |
    | d3    |            2 |
    +-------+--------------+
    thanks in advance .
    csghanny.

    Hi
    csghanny,
    You question seems to be wrong.
    Because you are providing the filter condition where salary is greater than 5100. and for department d1, there is no salary more than 5100.
    +------+-------+--------+-------+
    | eid  | ename | salary | depid |
    +------+-------+--------+-------+
    |   11 | ram   | 5000   | d1    |
    |   22 | shyam | 3000   | d1    |
    |   23 | mohan | 5500   | d2    |
    |   44 | radha | 8000   | d3    |
    |   48 | abhi  | 10000  | d3    |
    +------+-------+--------+-------+
    select  depid, count(depid) from emp where salary >5100 group by depid;
    so there is no chance that this query will return the output what you are expecting.
    let us know, if you requirement is something different, so we can help you.
    Please Mark as Answer if my post solved your problem or Vote As Helpful if this helps. Blogs: www.sqlserver2005forum.blogspot.com

  • SPEL not giving desired result

    Hi ALL,
    SPEL
    *${oa.TestPVO1.xxDisable}* on Disable Property for a button
    In CO
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    am.invokeMethod("hide");
    In AM
    public void hide()
    OAViewObject disvo = (OAViewObject)getTestPVO1();
    if (!disvo.isPreparedForExecution())
    disvo.executeQuery();
    Row drow = disvo.createRow();//.getCurrentRow();
    disvo.insertRow(drow);
    drow.setAttribute("xxDisable", Boolean.FALSE);
    NOT giving desired o/p to disable the button
    Thanks,
    Sombit.
    Edited by: Sombit on Oct 1, 2009 7:33 AM

    Try assigning the SPEL value in the *VORowImpl.
    First, in order to assign a value to SPEL, you'll need to create a custom VO. Here's a sample query I've used to create my VO to pull data pertainining to if an Attribute should be mandatory/rendered.
    SELECT min(descriptive_flex_context_code) descriptive_flex_context_code, min(Enabled) Enabled, min(END_USER_COLUMN_NAME) END_USER_COLUMN_NAME, min(required_flag) required_flag, min(application_column_name) application_column_name,
    min(xxx.LOV) LOV
    from
    (SELECT descriptive_flex_context_code,'Y' Enabled, END_USER_COLUMN_NAME, required_flag, application_column_name,
    decode(ffvv.flex_value,null,'N','Y') LOV
    FROM FND_DESCR_FLEX_COL_USAGE_VL fdfc,
    fnd_flex_values_vl ffvv
    WHERE (fdfc.APPLICATION_ID=20045)
    and (fdfc.DESCRIPTIVE_FLEXFIELD_NAME LIKE 'SPL Account Map')
    and fdfc.enabled_flag = 'Y'
    and fdfc.display_flag = 'Y'
    and fdfc.application_column_name = 'ATTRIBUTE5'
    and ffvv.flex_value_set_id(+) = fdfc.flex_value_set_id
    and rownum = 1) xxx
    Once the VO is created, I created several transient "boolean" attributes in my VO. These attributes will be assigned a value based on code I place in my *VORowImpl since this is the file which controls attribute assignments.
    But before that, in my *VOImpl, I've defined a custom method which is used to execute the VO from my AM.
    public class Ref5PVOImpl extends OAViewObjectImpl
    * This is the default constructor (do not remove)
    public Ref5PVOImpl()
    public void initRef5PVO()
    // setWhereClause("descriptive_flex_context_code in (select vendor_name from spl_account_map where cont_cd = :1)");
    setWhereClauseParams(null); //Always reset
    // setWhereClauseParam(0, acct);
    // System.out.println("value_selected customer>> "+acct);
    executeQuery();
    In my *VORowImpl, I've added custom code to my Attribute methods so that they return the proper values when invoked...
    public String getMakeRequired()
    if (getRequiredFlag()!= null)
    if ("Y".equals(getRequiredFlag()))
    //if(getMessageChoiceAttribute()==null)
    System.out.println("Required returned yes");
    return "yes";
    else
    System.out.println("Required returned no");
    return "no";
    else
    return "no"; //poplist will be disabled - DFF is not configured
    public Boolean getOptionRender()
    if (getLov()!= null)
    // In this method check if the Message Text Input is valid
    if ("N".equals(getLov()))
    System.out.println("OptionRender returned true "+ getLov());
    return Boolean.TRUE; //text input will be enabled if no LOV exists
    else
    System.out.println("OptionRender returned false "+ getLov());
    return Boolean.FALSE; //text input will be disabled if LOV exists
    else
    return Boolean.FALSE; //text input will be disabled - DFF is not configured
    Then add your SPEL directive into your field's Property inpector...
    ${oa.Ref5PVO1.MakeRequired}
    ${oa.Ref5PVO1.OptionRender}

  • Summing command is not getting the result

    Hi All,
    I am using summing command in my script to print page total on every page.
    I have used:
    SUMMING &ITAB_TDS-BASAMT& INTO &ZTDS-BASE_AMT&
    here itab-tds is my internal table which contains the line items..and ztds is the R/3 transparent table(global) in which the field base_amt is the currency typr field.
    But when I debud the script, i find that ZTDS-BASE_AMT does not get any values(inspite that itab_tds-basamt has values).
    I have declared ZTDS in the tables stmt in the print program(tables: ztds. )
    plz tell me how to get rid of this problem?
    Regards,
    Niyati

    Hi,
    I think this will solve your problem.
    - To use command SUMMING:
    /: SUMMING PROGRAM_SYMBOL INTO TOTAL_SYMBOL
    The PROGRAM_SYMBOL is the global variable you want to sum, TOTAL_SYMBOL is a variable defined in the sapscript:
    /: DEFINE TOTAL_SYMBOL = '0'.
    You should try to define TOTAL_SYMBOL just once (for example in a window you use only once).
    Reward points to all useful answers.
    Regards,
    SaiRam

  • Can you use iTunes match and not get duplicates if you maintain mp3s and aiffs files of the same song in either the same or separate libraries?

    I maintain a collection of aiff files and mp3 files of the same music.
    Aiff for home listening and Mp3 for my devices.
    I can arrange these in the same or seperate libraires.
    Will "itunes match" duplicate the songs in the cloud if they in the same or seperate libraies on the same mac?
    If not, is anyone aware of how to manage seperate Mp3 and Aiff libraries so as not to get duplicates in itune match?
    All assistance is appreciated.
    Thanks!

    Hello mracole,
    I checked my "purchases" and the 7/19/13 purchases don't show up.  However, the earlier versions from usually several years back...the ones that are Matched...often do show up in my Purchases.  I suspect that somehow those REALLY purchased several year old versions were deleted and redownloaded by me so I could change them to the 256 kbps versions under iTunes Match.  They were probably 128 kbps versions originally when purchased.
    Why the earlier versions that were really purchased are now identified as Matched is puzzling.
    Why I now have Purchased versions from 7/19/13 is puzzling too...especially since these versions do NOT show up in my purchases.
    Calling Apple Support if a good idea unless someone can explain this mystery.  I might even take one of my laptops to the Apple store and show a Genius.
    Thank you very much for taking the time to respond, Mr. Luigi

  • Sdo_nn is not showing desired results

    Hello,
    We have the following query :
    SELECT p.codigo_proveedor_ca, p.descripcion AS Proveedor, DECODE(p.habitual,0,'N','S') AS HAB, DECODE(p.h_24,0,'N','S') H24,
         b.codigo_base, b.tipo_via || ' ' || b.nom_via || ',' || b.numero_via || ' ' || B.PISO AS DIRECCION_PROV, b.codigo_pais,
    b.codigo_provincia, b.codigo_ine, b.codigo_zona, mg.numero AS NUMERO_GEN, b.localidad, ROUND(MDSYS.SDO_NN_DISTANCE(1),0) AS DISTANCIA,
    b.GIS_X, b.GIS_Y, b.GIS_NIVEL_XY, b.GIS_GEO_OK, b.GIS_TIPO_SRIDENUM
    FROM SAT_BASES_PROVEEDORES b,
         SAT_BASE_PROVEEDOR_MEDIOS_GEN mg,
         SAT_PROVEEDORES_CA p
    WHERE b.codigo_pais = 'ESP' AND b.activo = 1
    AND mg.codigo_proveedor_ca = b.codigo_proveedor_ca AND mg.codigo_base = b.codigo_base
         -- Medio Genérico 'TAXI'
         AND mg.codigo_medio_generico = '2' AND mg.activo = 1 AND P.ACTIVO = 1
         AND p.codigo_proveedor_ca = b.codigo_proveedor_ca
         -- Coordinates of GRANOLLERS
         AND SDO_NN(b.GEOMETRIA,MDSYS.SDO_Geometry(2001, 1000000,MDSYS.SDO_Point_type(188161,5043776,NULL),NULL, NULL) ,
         'SDO_BATCH_SIZE = 25', 1 ) = 'TRUE'
    ORDER BY DISTANCIA;
    What we want is to get the providers which are near to a given town. To get this we are using SDO_NN function and also
    SDO_NN_DISTANCE to calculate the distance to the given coordinates.
    Our problem is that there are two providers with the same coordinates that should be shown in the query result but one of them is not shown and we don't understand why.
    If we use SDO_NUM_RES instead of SDO_BATCH_SIZE the provider is shown, but as far as I know, if you use this parameter not all the WHERE clauses are evaluated. Am I wrong?
    What are we doing wrong?
    Thanks in advance,
    Eva.

    Are you on Oracle 9i? In 9i, I have never been able to get this query to work successfully this way. I had to rewrite it to use a in-line view and a rownum and make some other changes. I think it is buggy, as are many of the 9i spatial objects (full of horrid memory leaks etc.)
    I have been able to hack around the fact that it cannot find the nearest neighbor on it's own, by using an inline view in this way, but it has holes, I am sure:
    Select DISTANCE, (list all your other selections) from
    SELECT /*+ordered*/ SDO_NN_DISTANCE(1) DISTANCE, p.codigo_proveedor_ca, p.descripcion AS Proveedor, DECODE(p.habitual,0,'N','S') AS HAB, DECODE(p.h_24,0,'N','S') H24,
    b.codigo_base, b.tipo_via || ' ' || b.nom_via || ',' || b.numero_via || ' ' || B.PISO AS DIRECCION_PROV, b.codigo_pais,
    b.codigo_provincia, b.codigo_ine, b.codigo_zona, mg.numero AS NUMERO_GEN, b.localidad, ROUND(MDSYS.SDO_NN_DISTANCE(1),0) AS DISTANCIA,
    b.GIS_X, b.GIS_Y, b.GIS_NIVEL_XY, b.GIS_GEO_OK, b.GIS_TIPO_SRIDENUM
    FROM SAT_BASES_PROVEEDORES b,
    SAT_BASE_PROVEEDOR_MEDIOS_GEN mg,
    SAT_PROVEEDORES_CA p
    WHERE b.codigo_pais = 'ESP' AND b.activo = 1
    AND mg.codigo_proveedor_ca = b.codigo_proveedor_ca AND mg.codigo_base = b.codigo_base
    -- Medio Genérico 'TAXI'
    AND mg.codigo_medio_generico = '2' AND mg.activo = 1 AND P.ACTIVO = 1
    AND p.codigo_proveedor_ca = b.codigo_proveedor_ca
    -- Coordinates of GRANOLLERS
    AND SDO_NN(b.GEOMETRIA,MDSYS.SDO_Geometry(2001, 1000000,MDSYS.SDO_Point_type(188161,5043776,NULL),NULL, NULL) ,
    'SDO_BATCH_SIZE = 25', 1 ) = 'TRUE'
    AND ROWNUM < 1000
    ORDER BY DISTANCE
    WHERE ROWNUM < 2';
    This should give you the closest result. If you want the closest 2, you would set that in the last line. I had to mess around with the rownum < 1000 line in my query. It appears that the order by distance has no affect. If I set it to ROWNUM < 50, often times, the closest 2 items weren't in the inner select elements. So they weren't available in the outer results.
    I also found this issue very frustrating. I actually had a hard time believeing it was so junky, until I proved it was the problem with this statement. Please let us know if it solves your issue also.

Maybe you are looking for

  • Print Preview in web report problem

    After Clicking Print buttonn on the web report, i select Print Preview from IE Explorer and here the variable values passed to the print function in web template, are getting displayed and actually it is part of URL , getting displayed in the Print P

  • Display variant for transaction FBL3N - can it be protected?

    Hi, I have made a display variant for transaction FBL3N (G/L account line item display). Can I protect this variant? I don't like other users to overwrite it. Thank you. Kind regards, Linda

  • Modeling state transitions between screens

    Hi, I'm trying to build a flex application that is made of 20 or so screens. Some of these screens are serially connected, much in a wizard manner, but many others are not. I have not found a language construct yet that would allow me to model these

  • Best type of charger for iPad and iPhone?

    If I need to buy a new charger what do you recommend?

  • 4 odd issues with Leopard Finder

    Leopard is great, I just have a few things that seem off. 1) Every-time I restart, I lose the preference for what app opens .wav, .aif, .mp3, and all other audio files. I have to again, right-click, select open with, change-all. Every-time. Can anyon