Getting specific row of the result set.

table: employee
empno           number(20)
ssan           varchar2(9)
date_time_stamp date
My Sql gets all the empno where ssan and date_time_stamp are equal.
However I need previous row from max(empno) where ssan & date_time_stamp are equal.
For eg:
empno     ssan           date_time_stamp
100     123456789     01-FEB-2004
101     000000000     02-FEB-2004
102     123456789     01-FEB-2004
103     123456789     01-FEB-2004
105     123456789     01-FEB-2004
I need row with empno = 103.
My current sql fetches all rows for particular ssan where ssan and date time stamp are equal that fetches all empno for particular ssan and date time stamp. I want the max(empno) -1 (previous row of the result set).
Here is my sql:
select empno,ssan,date_time_stamp
from employee e
where date_time_stamp in (select date_time_stamp from employee where e.ssan = ssan)
order by empno,ssan;
The above sql will fetch
empno     ssan           date_time_stamp
100     123456789     01-FEB-2004
102     123456789     01-FEB-2004
103     123456789     01-FEB-2004 ---> I need this row, previous row from max(empno) where ssan and date time
stamp are matching.
105     123456789     01-FEB-2004
101     000000000     02-FEB-2004

If I understand correctly, you want the second highest empno for each unique combination of ssan and date_time_stamp. If so, given
SQL> SELECT * FROM employee;
     EMPNO SSAN      DATE_TIME_S
       102 123456789 01-feb-2004
       103 123456789 01-feb-2004
       105 123456789 01-feb-2004
       100 123456678 01-feb-2004
       102 123456678 01-feb-2004
       103 123456678 01-feb-2004
       101 000000000 02-feb-2004
       105 123456678 01-feb-2004
       100 123456678 02-feb-2004
       102 123456678 02-feb-2004
       103 123456678 02-feb-2004
       105 123456678 02-feb-2004
       100 123456789 01-feb-2004Then something like this should do it.
SQL> SELECT empno,ssan,date_time_stamp
  2  FROM (SELECT empno,ssan,date_time_stamp,
  3               RANK() OVER (PARTITION BY ssan,date_time_stamp
  4                            ORDER BY empno DESC) rk
  5        FROM employee)
  6* WHERE rk = 2;
     EMPNO SSAN      DATE_TIME_S
       103 123456678 01-feb-2004
       103 123456678 02-feb-2004
       103 123456789 01-feb-2004HTH
John

Similar Messages

  • How to exclude the XML declaration from each row of the result set?

    Hi,
    I have a table with an XMLTYPE column and would like to SELECT a set of rows. How can I exclude the XML declaration from each row in the result set? My query currently looks like this, I'm executing it through Spring JDBC:
    SELECT XMLSerialize(CONTENT t1.xmltext) FROM myschema.event t1 WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e") ORDER BY t1.time DESC
    After selecting, in my application I convert each row into a String and concatenate all rows into one big string in order to parse it into a DOM model. I get a parser exception (org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed) because there are multiple XML declarations in my big string. Of course, I could manually check the String of each row whether it starts with the XML declaration, but it would be nicer if I could instruct the DB not to add it in the first place. Is there a way?
    Thanks!
    -- Daniela

    Hi,
    A couple of options I can think of :
    SELECT XMLSerialize(CONTENT
    XMLtransform(t1.xmltext,
      xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output omit-xml-declaration="yes"/> 
    <xsl:template match="/"><xsl:copy-of select="*"/></xsl:template>
    </xsl:stylesheet>')
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;or simply,
    SELECT XMLSerialize(CONTENT
      extract(t1.xmltext,'/')
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;

  • How to add a dummy row in the result set of a SELECT statement.

    Hello Everyone -
    I have requirment to add a dummy row in the result set of a SELECT statement.
    For e.g. lets say there is a table Payment having following colums:
    Payment_id number
    status varchar2(10)
    amount number
    payment_date date
    so here is the data :-
    Payment_id Status Amount payment_date
    1 Applied 100 12/07/2008
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    Here is my SQL
    Select * form payment where payment_date >= 01/01/2009
    Output will be
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    My desired output is below
    2 Reversed 200 01/ 06/2009
    3 Applied 300 01/ 07/2009
    2 Reversed -200 01/ 06/2009 ------(Dummy Row)
    Thrid row here is the dummy row which I want to add when status is "Reversed"
    I would be very thankful for any kind of help in this regard ...
    Thanks,
    Gaurav

    Cartesion joining against a dummy table is a useful method of creating a dummy row:
    with my_tab as (select 1 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 1 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 1 Payment_id, 'Applied' Status, 100 Amount, to_date('12/07/2008', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 2 Payment_id, 'Reversed' Status, 200 Amount, to_date('01/05/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 3 Payment_id, 'Applied' Status, 300 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 4 Payment_id, 'Reversed' Status, -400 Amount, to_date('01/06/2009', 'mm/dd/yyyy') payment_date from dual union all
                    select 2 cust_id, 5 Payment_id, 'Applied' Status, 500 Amount, to_date('01/07/2009', 'mm/dd/yyyy') payment_date from dual),
                    --- end of mimicking your table
          dummy as (select 'Reversed' col1, 1 rn from dual union all
                    select 'Reversed' col1, 2 rn from dual)
    select mt.cust_id,
           mt.payment_id,
           mt.status,
           decode(dummy.rn, 2, -1*mt.amount, mt.amount) amount,
           mt.payment_date
    from   my_tab mt,
           dummy
    where  mt.status = dummy.col1 (+)
    order by mt.cust_id, mt.payment_id, dummy.rn nulls first;
    CUST_ID     PAYMENT_ID     STATUS     AMOUNT     PAYMENT_DATE
    1     1     Applied     100     07/12/2008
    1     2     Reversed     200     06/01/2009
    1     2     Reversed     -200     06/01/2009
    1     3     Applied     300     06/01/2009
    2     1     Applied     100     07/12/2008
    2     2     Reversed     200     05/01/2009
    2     2     Reversed     -200     05/01/2009
    2     3     Applied     300     06/01/2009
    2     4     Reversed     -400     06/01/2009
    2     4     Reversed     400     06/01/2009
    2     5     Applied     500     07/01/2009Edited by: Boneist on 07-Jan-2009 23:10
    NB. You may have to mess around with the ordering if that's not come back in the order you wanted. You didn't mention what the rules were for any expected ordering though, so I've made up my own *{;-)
    Also, I added an identifier (cust_id) to differentiate between different sets of payments, since that's usually the case. Remove that if it's not applicable for your case.

  • INSERTing a blank row in the result set

    Hi friends,
    SELECT * FROM EMPLOYEES ORDER BY DEPARTMENT_ID;
    In the result of the above, I need to INSERT a blank row in the result for each DEPARTMENT_ID. i.e., the result should look like the following:
    EMP_ID - NAME - SALARY - DEPARTMENT_ID
    101 - Albert - 10,000 - 10
    102 - Benjamin - 8,000 - 10
    103 - Chitra - 10,500 - 20
    104 - David - 4,500 - 20
    105 - Elango - 6,000 - 20
    106 - Fathima - 6,000 - 30
    107 - Ganga - 9,000 - 30
    etc.
    I don't want to insert into the table. Just in display I need a blank row.
    Thanks in advance.
    Edited by: Iniyavan on Mar 8, 2010 11:37 AM

    Are you looking for this?
    satyaki>select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>break on deptno
    satyaki>
    satyaki>
    satyaki>select empno,
      2            ename,
      3            sal,
      4            deptno
      5     from emp
      6     order by deptno;
         EMPNO ENAME             SAL     DEPTNO
          7782 CLARK            2450         10
          7839 KING             5000
          7934 MILLER           1300
          7566 JONES            2975         20
          7902 FORD             3000
          7876 ADAMS            1100
          7369 SMITH             800
          7788 SCOTT            3000
          7521 WARD             1250         30
          7844 TURNER           1500
          7499 ALLEN            1600
         EMPNO ENAME             SAL     DEPTNO
          7900 JAMES             950         30
          7698 BLAKE            2850
          7654 MARTIN           1250
    14 rows selected.
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • How to get specific rows from the vo or Iterator in the backing bean?

    Hi,
    I have to get the specific number of rows from iterator in the backing bean. means i want to get the records from the VO or Iterator only from 5 th record to 10th record its like rownum in SQL.
    We can use rownum in VO sql query. but there would be a performance issue with that ...
    SO i am trying to get the rows from ADF Iterator once we fetch from DB.
    Is it possible to do that ?
    Do we have any way to set the pointer to the VO/Iterator like setFirst() and after that setMaxResult to retrun the rows between first and maxresult..
    Thanks

    If this is for pagination, then af:table offers pagination by design when you set accessmode=RangePaging or RangePagingIncremental in VO. Paginated queries are fired when scroll down in the table. Explore this option before you try out any custom solution
    To answer the question,
    Note: same logic i have implpemented ADF with EJB ..In EJB Query class we have setFirst(int) and setMaxResult(int) methods...simply i did setFirst(30) and setMaxResult(10)..It worked fine...Theoretically speaking the same can be achieved by setting setRangeStart() on the viewobject(which in turn sets to the default rowset) and by setting max fetch size on VO + accessmode=RangePaging. However when you use table with ADF binding, these will be overridden by the binding layer. If you are not using ADF binding, then the above is same as what you did for JPA entity. Other option is, you build expert mode VO with rownum for this special case, which will work if you dont need to set accessmode=RangePaging for VO.

  • Inserting row in the result set

    Hi
    need to insert a row in resultset when previous row typ=c and next row typ=p then need to insert one row in between typ c and p with typ =s see the #temp_result table for result expected
    --drop table temp1
    --drop table temp1_result
    --presently data:-
    create table temp1
    (id int,
    ord int,
    typ varchar(2),
    dt date)
    insert into temp1 values (101, 1, 'c', '2001-10-01')
    insert into temp1 values (101, 2, 'p', '2001-11-11')
    insert into temp1 values (102, 1, 'c', '2002-10-01')
    insert into temp1 values (102, 2, 'p', '2002-11-01')
    insert into temp1 values (102, 3, 'p', '2002-12-01')
    insert into temp1 values (103, 1, 'c', '2003-10-01')
    insert into temp1 values (103, 2, 'p', '2003-11-01')
    insert into temp1 values (104, 1, 'c', '2004-10-01')
    insert into temp1 values (104, 2, 'c', '2004-11-01')
    insert into temp1 values (104, 3, 'p', '2004-12-01')
    insert into temp1 values (105, 1, 'c', '2005-10-01')
    insert into temp1 values (105, 2, 'p', '2005-11-01')
    insert into temp1 values (105, 3, 'c', '2005-12-01')
    insert into temp1 values (106, 1, 'c', '2006-08-01')
    insert into temp1 values (106, 2, 'p', '2006-09-01')
    insert into temp1 values (106, 3, 'c', '2006-10-01')
    insert into temp1 values (106, 4, 'p', '2006-11-01')
    insert into temp1 values (106, 5, 'p', '2006-12-01')
    select * from temp1
    order by id, ord
    --result expected:-
    create table temp1_result
    (id int,
    ord int,
    typ varchar(2),
    dt date)
    insert into temp1_result values (101, 1, 'c', '2001-10-01')
    insert into temp1_result values (101, 2, 's', '')
    insert into temp1_result values (101, 3, 'p', '2001-11-11')
    insert into temp1_result values (102, 1, 'c', '2002-10-01')
    insert into temp1_result values (102, 2, 's', '')
    insert into temp1_result values (102, 3, 'p', '2002-11-01')
    insert into temp1_result values (102, 4, 'p', '2002-12-01')
    insert into temp1_result values (103, 1, 'c', '2003-10-01')
    insert into temp1_result values (103, 2, 's', '')
    insert into temp1_result values (103, 3, 'p', '2003-11-01')
    insert into temp1_result values (104, 1, 'c', '2004-10-01')
    insert into temp1_result values (104, 2, 'c', '2004-11-01')
    insert into temp1_result values (104, 3, 's', '')
    insert into temp1_result values (104, 4, 'p', '2004-12-01')
    insert into temp1_result values (105, 1, 'c', '2005-10-01')
    insert into temp1_result values (105, 2, 's', '')
    insert into temp1_result values (105, 3, 'p', '2005-11-01')
    insert into temp1_result values (105, 4, 'c', '2005-12-01')
    insert into temp1_result values (106, 1, 'c', '2006-08-01')
    insert into temp1_result values (106, 2, 's', '')
    insert into temp1_result values (106, 3, 'p', '2006-09-01')
    insert into temp1_result values (106, 4, 'c', '2006-10-01')
    insert into temp1_result values (106, 5, 's', '')
    insert into temp1_result values (106, 6, 'p', '2006-11-01')
    insert into temp1_result values (106, 7, 'p', '2006-12-01')
    select * from temp1_resultregards
    Edited by: @2**** on 31-Jan-2012 06:48

    Well, in an Oracle database, something like this...
    SQL> ed
    Wrote file afiedt.buf
      1  with temp as (select 101 as id, 1 as ord, 'c' as typ, date '2001-10-01' as dt from dual union all
      2                select 101, 2, 'p', date '2001-11-11' from dual union all
      3                select 102, 1, 'c', date '2002-10-01' from dual union all
      4                select 102, 2, 'p', date '2002-11-01' from dual union all
      5                select 102, 3, 'p', date '2002-12-01' from dual union all
      6                select 103, 1, 'c', date '2003-10-01' from dual union all
      7                select 103, 2, 'p', date '2003-11-01' from dual union all
      8                select 104, 1, 'c', date '2004-10-01' from dual union all
      9                select 104, 2, 'c', date '2004-11-01' from dual union all
    10                select 104, 3, 'p', date '2004-12-01' from dual union all
    11                select 105, 1, 'c', date '2005-10-01' from dual union all
    12                select 105, 2, 'p', date '2005-11-01' from dual union all
    13                select 105, 3, 'c', date '2005-12-01' from dual union all
    14                select 106, 1, 'c', date '2006-08-01' from dual union all
    15                select 106, 2, 'p', date '2006-09-01' from dual union all
    16                select 106, 3, 'c', date '2006-10-01' from dual union all
    17                select 106, 4, 'p', date '2006-11-01' from dual union all
    18                select 106, 5, 'p', date '2006-12-01' from dual)
    19  --
    20  -- end of test data
    21  --
    22  select id
    23        ,row_number() over (partition by id order by ord, typ) as ord
    24        ,typ
    25        ,dt
    26  from (
    27        select id
    28              ,ord
    29              ,case when rn = 2 and add_typ = 's' then add_typ else typ end as typ
    30              ,case when rn = 1 then dt else null end as dt
    31        from (
    32              select t.id, t.ord, t.typ, t.dt
    33                    ,case when typ = 'c' and lead(typ) over (partition by id order by ord) = 'p' then 's'
    34                     else null end as add_typ
    35              from   temp t
    36             ) x
    37             cross join (select rownum rn from dual connect by rownum <= 2)
    38        where not (rn = 2 and add_typ is null)
    39       )
    40* order by id, ord
    SQL> /
            ID        ORD T DT
           101          1 c 01-OCT-2001 00:00:00
           101          2 s
           101          3 p 11-NOV-2001 00:00:00
           102          1 c 01-OCT-2002 00:00:00
           102          2 s
           102          3 p 01-NOV-2002 00:00:00
           102          4 p 01-DEC-2002 00:00:00
           103          1 c 01-OCT-2003 00:00:00
           103          2 s
           103          3 p 01-NOV-2003 00:00:00
           104          1 c 01-OCT-2004 00:00:00
           104          2 c 01-NOV-2004 00:00:00
           104          3 s
           104          4 p 01-DEC-2004 00:00:00
           105          1 c 01-OCT-2005 00:00:00
           105          2 s
           105          3 p 01-NOV-2005 00:00:00
           105          4 c 01-DEC-2005 00:00:00
           106          1 c 01-AUG-2006 00:00:00
           106          2 s
           106          3 p 01-SEP-2006 00:00:00
           106          4 c 01-OCT-2006 00:00:00
           106          5 s
           106          6 p 01-NOV-2006 00:00:00
           106          7 p 01-DEC-2006 00:00:00
    25 rows selected.

  • How to pass one row of a result set to a cffunction?

    I can pass the entire result set of a query to a cffunction,
    but the function only needs one row.
    The code below is a syntax error, where "3" is array index
    notation for the third row of the result set.
    What is the correct way to pass one row of a result set to a
    cffunction?
    Thank you.

    iirc, cf does not allow one to reference and access a row of
    a resultset
    like that.
    you will have to create a structure/array that holds the data
    from
    specific query row and pass that to your function. looping
    over
    queryname.columnlist list will make it easier and not
    specific to any
    particular query. make it into another function that accepts
    a query and
    row number as arguments and returns a struct/array of that
    row data (or
    automatically passes it to another function).
    sample code for creating a structure of specific query row
    data:
    <cfset rowstruct = {}>
    <cfloop list="#queryname.columnlist#" index="col">
    <cfset rowstruct[col] = queryname[col][somerownumber]>
    </cfloop>
    <cfdump var="#rowstruct#">
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • OBIEE Answers does not display the result set of a report query

    Hi,
    We have a pivot table type of report in Oracle Business Intelligence Enterprise Edition v.10.1.3.3.2 Answers that has the following characteristics:
         3 Pages
         3 Sections , 4 Columns
         18363 Rows in the result set
    As per the NQQuery.log, the query for this report executes successfully resulting in 18363 rows. However, nothing comes up in the display on Answers. Moreover, no error is reported. The instanceconfig.xml file has the following setting:
    <PivotView>
         <CubeMaxRecords>30000</CubeMaxRecords>
         <CubeMaxPopulatedCells>300000</CubeMaxPopulatedCells>
    </PivotView>
    Even with these settings, Answers just returns a blank page - nothing is displayed in the name of the result set of the report query. Has anyone encountered this problem scenario before?
    Any help is much appreciated.
    Thanks,
    Piyush

    Hi Fiston / Pradeep,
    Thanks for your inputs. A few points to note:
    -> I am actually not getting any error message in answers or the NQQuery log. Moreover I am not getting any errors related to "query governor limit exceeding in cube generation" also.
    -> I have other pivot table type of reports in the same repository that work fine. In fact the report which has this issue even works sometimes - what actually is happening is that if I alter the number of sections from 3 to 4, then the result set changes from 14755 Rows to 18363 Rows and as per the NQQuery.log in both cases the query completes successfully. However, when the result set has 14755 rows, I get to see the output in Answers; however when the result set is 18636 rows, the Answers screen just goes blank and does not show any output or error. This makes me believe that there is some parameter in instanceconfig or the NQSconfig file - I have tried a lot of changes but nothing works !
    Any help is much appreciated.
    Best Regards,
    Piyush

  • Getting the first row of a result set

    I need to get the first row returned from a select query that looks like this:
    SELECT DISTINCT parm1 FROM table1 WHERE parm1 > 10 ORDER BY parm1
    Can someone please show me how to do this?
    Alex

    Because you're only getting one row you don't need to bother with a DISTINCT clause. You'll need to order your data first and then nab the first row from that result set.
    SELECT parm1
      FROM (SELECT   parm1
                FROM table1
               WHERE parm1 > 10
            ORDER BY parm1)
    WHERE ROWNUM <= 1;

  • How to get the result set in batches

    I have a query which results into large data. This data i want to display in a group of 20. After every 20 records i want to add header and footer to it.
    Is it possible to get the result set data into batch of 20 ? means can i specify start and end index of query ?
    regards
    Manisha

    What I am saying is that a big query with lots of
    joins will probably be slow, and as such would be a
    ripe candidate for batching the responses, if it were
    not possible to speed/optimize it. Batching is nice
    to look at for the user, but is not a solution for
    performance problems. In essence it is irrelevant
    that it adds a little performance deficit, as it
    appears to be running a lot quicker, and gives more
    feedback to the user.Then let me say it again....
    - "Join" is a term that applies to a method of doing queries in the database....
    - Query 1 which uses a join and returns 15 rows
    - Query 2 which does not use a join and returns 1500 rows.
    Given the above then Query 1 will provide better overall performance for the system than Query 2 in a properly configured database.
    If it doesn't then the database is not set up correctly.
    And again this will be irrespective of whether the query is scrollable or not.

  • By which method,i can get  the no of rows in the record set?

    Does anyone help me that by which method,i can get the no of rows in the record set?
    now i use next() to check whether the next record is available or not?

    shashi_rajak wrote:
    under Practice Exercise #1 heading :
    there is a statement.
    "Now, the COUNT function does not need to retrieve all of the fields from the table (ie: employee_number, employee_name, and salary), but rather whenever the condition is met, it will retrieve the numeric value of 1. Thus, increasing the performance of the SQL statement."And have you ever tried it? Or do you simply blindly believe everything you read? And what sort of "authority" is "tech on the net"?
    P.S. A quick test on Oracle (and you must do each query at least twice throwing away the first result, as Oracle always caches things which will have an effect, and averaging the remaining attempts).
    count(*) -- 1 min 17 secs for 35,311,978 rows
    count(1) -- 1 min 19 secs for 35,311,978 rows
    Edit: And the table has 46 columns.

  • How to get the specific error from the result of sectrustevaluate()

    I am using SectrustEvaluate(trust,result) function to test the server certificate against the root ca installed in keychain.
    Result of server certificate validation in case if comes as recoverable faliure how may i know what was the reason which causing it to recoverable failure.
    I want to throw the specific error to UI to know why server certificate evaluation failed.
    No API's available in ios , Some API's are there available in MAC.
    Please Advise.

    If you are on iOS I think you are out of luck.  See red text under kSecTrustResultRecoverableTrustFailure.
    https://developer.apple.com/library/ios/documentation/Security/Reference/certifk eytrustservices/Reference/reference.html#//apple_ref/c/func/SecTrustEvaluate
    The way you handle this depends on the OS.
    In iOS, you should typically refuse the certificate. However, if you are performing signature validation and you know when the message was originally received, you should check again using that date to see if the message was valid when you originally received it.
    In OS X, you can call the SecTrustGetTrustResult function to get more information about the results of the trust evaluation, or the SecTrustGetCssmResult function to get information about the evaluation in a form that can be passed to CSSM functions.

  • Getting message : The result set for this selection was empty on sm20

    Hi,
       I assigned below parameters in rz10 :
    rsau/user_selection                                 1
    rsau/max_diskspace/per_day                  1950M
    rsau/max_diskspace/per_file                 650M
    rsau/enable                                               1
       I activated security audit profile in sm19 also.But when iam going to sm20 for analysis of security audit log iam not getting report iam getting this message  :     The result set for this selection was empty.
    Gudie me for the same.
    Thanku

    Hi,
    The result set for this selection was empty.
    I think your configuration is OK except one thing...
    Check in SM19, if you have selected "Filter Active" check box in "Filter 1 and Filter 2" screen and Also "Audit Classess".
    Even though security audit is enabled in SM19, without selecting filter it will not log the events and give you the above message.
    Regards.
    Rajesh Narkhede

  • Does Hibernate throw and error if the result set is above a specific #

    Does Hibernate throw and error if the result set is above a specific #
    of records?

    why do you ask?Maybe he hasn't been able to find the bug in his code yet, so he's casting further and further about for more and more esoteric explanations for what he's seeing? ;-)
    (God knows I've been there...)

  • The result set that contain 10 rows always

    Hi all,
    I'm wondering if there is some way to produce the result set of a query in 10 rows always, in other word i run a query and i want that the result set in 10 row even if the query dosn't return any row.
    I need that row as a placeholder.
    thanks
    Francesco

    Happened to be GUI developer and try to take advantage of SQL,
    select * from (select rownum rn, e.* from emp e where rownum<11 and 1=2) e
    right join (select rownum rn from dual connect by rownum<11) t
    on t.rn=e.rn
    RN 
    EMPNO ENAME 
    JOB         
    MGR HIREDATE    
    SAL  
    COMM
    DEPTNO    
    RN
    5
    8
    3
    1
    2
    10
    6
    7
    4
    9
    10 rows selected.
    select * from (select rownum rn, e.* from emp e where rownum<11) e
    right join (select rownum rn from dual connect by rownum<11) t
    on t.rn=e.rn
    RN 
    EMPNO ENAME 
    JOB         
    MGR HIREDATE    
    SAL  
    COMM
    DEPTNO    
    RN
    1  
    7369 SMITH 
    CLERK      
    7902 17-DEC-80   
    800               
    20     
    1
    2  
    7499 ALLEN 
    SALESMAN   
    7698 20-FEB-81  
    1600   
    300    
    30     
    2
    3  
    7521 WARD  
    SALESMAN   
    7698 22-FEB-81  
    1250   
    500    
    30     
    3
    4  
    7566 JONES 
    MANAGER    
    7839 02-APR-81  
    2975               
    20     
    4
    5  
    7654 MARTIN
    SALESMAN   
    7698 28-SEP-81  
    1250  
    1400    
    30     
    5
    6  
    7698 BLAKE 
    MANAGER    
    7839 01-MAY-81  
    2850               
    30     
    6
    7  
    7782 CLARK 
    MANAGER    
    7839 09-JUN-81  
    2450     
    0    
    10     
    7
    8  
    7788 SCOTT 
    ANALYST    
    7566 19-APR-87  
    3000               
    20     
    8
    9  
    7839 KING  
    PRESIDENT       
    17-NOV-81  
    5000     
    0    
    10     
    9
    10  
    7844 TURNER
    SALESMAN   
    7698 08-SEP-81  
    1500     
    0    
    30    
    10
    10 rows selected.

Maybe you are looking for

  • Bit locker drive encryption failed due to power failer and hard disk corrupted

    I ran Bitlocker drive ecryption drive D. My pc is windows 7 ultimate, while it was in progress of 1% due to power failer the encryption failed, when power resume the drive didn't showed the file format nor the size but it shows the size in disk manag

  • Opening pdf in jsf whithout normal download

    hi all i need to open pdf file when i click the menu in my project. i dont want a normal link since i need to set the response with cache enabled only when i click the link. i dont want a normal download too. when i click the menu it should open dire

  • Is there a way to download ios7 while the ios dev center is down for maintenance?

    I enrolled yesterday to the ios dev center,  I received my confirmation e-mail but I can't subscribe because the website is in maintenance. I really need to have ios 7 and be able to push apps before tomorrow. Is there anything I can do? Thanks, Xtre

  • Create tablespace using RAW device

    Hi, When you create the tablespace using RAW device, you no need to specify the size parameter in the sql. It works in Solaris but not in Linux. I dont know why, can anyone experience this issue before? please let me know Thanks Veera

  • Jump Forward

    I have one of the original ipods -- lately I've been wanting to "jump forward" (or backward) while listening to a language lesson on my ipod. i see buttons for "go to the beginning" and "go to the end". I've tried the tap on the wheel approach but it