Operator functions or?

Hi all,,
In sqldeveloper ,
I have 2 columns named A and B. column 'A' has data 1 for all rows.
column 'B' has data 12 for all rows. ( ref.below example)
my requirement is that, i need to get 'C' column and the first row of 'C' should be the total of A+B i.e, 1+12 which will give the answer 13.
Next row of column 'C' should retrieve the answer as 14. i.e, answer of 1st row of C's data + 2nd row of A's data and so on for all rows. Do i need to use any operator functions or which method can i achieve this?
eg:
A B C
1 12 13
1 12 14
1 12 15
1 12 16
1 12 17
thanks in advance.

What an odd question.
If it is just A+B from the first row and then cumulatively adding A from the subsequent rows then something along the lines of...
SQL> create table tblsum(a number, b number);
Table created.
SQL> insert into tblsum (a, b) values (1,12);
1 row created.
SQL> insert into tblsum (a, b) values (1,12);
1 row created.
SQL> insert into tblsum (a, b) values (1,12);
1 row created.
SQL> insert into tblsum (a, b) values (1,12);
1 row created.
SQL> insert into tblsum (a, b) values (1,12);
1 row created.
SQL> select a, b, sum(a+(case when rownum=1 then b else 0 end)) over (order by rownum) as d from tblsum;
         A          B          D
         1         12         13
         1         12         14
         1         12         15
         1         12         16
         1         12         17
SQL> insert into tblsum (a,b) values (3, 15);
1 row created.
SQL> select a, b, sum(a+(case when rownum=1 then b else 0 end)) over (order by rownum) as d from tblsum;
         A          B          D
         1         12         13
         1         12         14
         1         12         15
         1         12         16
         1         12         17
         3         15         20
6 rows selected.but we really need something to distinguish what order the rows are in... which is difficult when all (or most) of the data is identical.
We could even do something like...
SQL> select a, b, min(b) over ()+count(*) over (order by rownum) from tblsum;
         A          B MIN(B)OVER()+COUNT(*)OVER(ORDERBYROWNUM)
         1         12                                       13
         1         12                                       14
         1         12                                       15
         1         12                                       16
         1         12                                       17But.... why? that's the question.

Similar Messages

  • Problem in Adhoc Query's set operation functionality.

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

  • In Logic account the operator function is not working properly

    Hi all ,
    When am defiining the logic accounts using a operator as Function ,it is not working at all showing a red border in the cell and not able to update the grid .
    InValue/Exp-> am using a function -> CurVal > 0 then Result=CurVal else Result ="skip" endif
    Please suggest me if there is some workaround available for this ?

    Thanks for the Link!!
    We are using the FDM version 11.1.1.3 and Target as HFM .
    Now i am creating a logic account say Item - L1100 ,Type-IN, Criteria value-1100,Operator-Function(Not working),
    Value/Exp->If CURVAL > 0 Then      RESULT = CURVAL Else Result=”Skip” End If.
    As soon as i select the operator(Function) ,it shows a red border on the operator cell and couldn't able to update the grid .
    Have searched the OTN discussion forumns and find no answer for this !! Could you please sugesst me if any workaround available for this piece ?
    Thanks
    Kenny

  • Time Evaluation : Operation/Function to update quota entitlement

    Hi,
    within time evaluation quato entitlements are determined.
    Due to changes legislation, under particluar circumstancens the entitlement of the quota need to be updated.
    I've build all 'circumstances' in a time evaluation rule and now all what needs to be done, is to perform a deduction an a specific quuta type. The number of hours to be deducted is already stored in a time wage type (as part of the new calculation rules).
    Which operation or function can be used to update the quota entitlement with the number of hours stored in the time wage type.
    Thanks,
    Wilfred.

    Hi,
    if was looking at this operation but couldn't manage to get things working as I would like.
    Is there a link available with more detailed information on this operation besides the information available in SAP (PDSY)?
    Thanks,
    Wilfred.

  • Like operator functionality

    We have a simple select query which is using the 'Like' operator on a char(4) column.
    In a oracle windows environment when we have a query such as:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns everything which is = to 'AB' and doesn't seem to be including the trailing 2 spaces as would be stored becasue the column is char(4)
    In a oracle unix environment when we the same query:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns nothing...
    It appears as if the version running on a windows environment is truncating the trailing 2 spaces when using the like expression but in a unix environment, it is not. Does anybody have any idea or clue what could be occuring or if there is some database setting which could cause this to occur?

    Quote from Oracle Doc:
    Character Values
    Character values are compared using one of these comparison rules:
    Blank-padded comparison semantics
    Nonpadded comparison semantics
    The following sections explain these comparison semantics.
    Blank-Padded Comparison Semantics If the two values have different lengths, then Oracle first adds blanks to the end of the shorter one so their lengths are equal. Oracle then compares the values character by character up to the first character that differs. The value with the greater character in the first differing position is considered greater. If two values have no differing characters, then they are considered equal. This rule means that two values are equal if they differ only in the number of trailing blanks. Oracle uses blank-padded comparison semantics only when both values in the comparison are either expressions of datatype CHAR, NCHAR, text literals, or values returned by the USER function.
    Nonpadded Comparison Semantics Oracle compares two values character by character up to the first character that differs. The value with the greater character in that position is considered greater. If two values of different length are identical up to the end of the shorter one, then the longer value is considered greater. If two values of equal length have no differing characters, then the values are considered equal. Oracle uses nonpadded comparison semantics whenever one or both values in the comparison have the datatype VARCHAR2 or NVARCHAR2.
    "

  • Transform operator function

    Hi ,
    Can someone tell me how to convert date formats ?
    I know I will have to use the transform operator to_char/to_date of owb .....but where to i specify
    will I have to use the to_date function of transform operator ? or will I have to use to_char of transform operator?
    in OWB mapping..
    1) I have a date as 23-feb-2000 say from emp.hiredate table column , which I will need to convert to 20000223 i.e yyyymmdd .
    2) Also please suggest how to convert 23-feb-2000 to just just 2000 i.e yyyy.
    which option of to_char/to_date do i use??
    where do I type iin the formats in the lenght tab,?format tab ? ......
    rgds
    s

    If column HIREDATE is a DATE datatype you can use;
    to_char(HIREDATE, 'YYYY')
    to get the year for example.
    Play around in SQLPlus to get the hang of it (I have constructed a sample date, in first couple of examples);
    select to_char(to_date('01-JAN-1999','DD-MON-YYYY'),'YYYY') from dual;
    select to_char(to_date('01-JAN-1999','DD-MON-YYYY'),'YYYYMMDD') from dual;
    select to_char(HIREDATE,'YYYYMMDD') from SCOTT.EMP;
    The to_date function is for constructing dates. The to_char function is for constructing strings. Each can provide format masks.
    The Expression operator can be used to perform sets o expressions for more compact map designs.
    Cheers
    David

  • Searching operation functions differently

    I have a strange problem. I created an entity bean with bean managed persistence to work with LDAP.
    When I perform a search as in
    dirContext.dirContext.search("o=seagate.com", "uid=pwilson", new SearchControls()) ;
    and the uid is present in LDAP
    I do get a SearchResult from the operation with the object when running from a regular class outside Weblogic a server.
    However, if I run the same query from the entity bean, the SearchResult is empty? I have to specify
    the entire searchBase, as in say, "ou=People, o=seagate.com" and not just the root to get the search to succeed. Any ideas what I might be
    doing wrong or missing. Thanks in advance.

    To make a phone feature request go here:
    http://windowsphone.uservoice.com/forums/101801-feature-suggestions

  • PCR Operations/Functions

    Hi All,
    Can you pls let me know the operations to read  employee start date, a date type from IT 0041and leave start date in the PCR.
    Thanks,
    Karunakar

    Hi Karunakar,
    I doubt whether you can read the exact dates in date specification. But i have used those dates fo date comparision with current date.
    You can use HRS operation to fill the difference between current date with date specification.
    With Regards
    Shyam V

  • Does Oracle R12 support Parallel Operations functionality

    The example is more like the following:
    I have a job J1 with qty 5 made up of pieces x,y,z and operations 10,20,30,40,50.
    Piece X must be marked at operation 10, this cycle time is 1 shift
    Piece Y must be cut at operation 20, cycle time is 1/2 shift
    Piece Z must be washed at operation 30, cycle time is 1/2 shift
    Pieces x, y and z all come together to be assembled at operation 40
    The way oracle is currently set up, pieces x,y,z all have to go to operation 10 and then they have to go to operation 20 and then 30, which amounts to 2 shifts. While the quantity is at operation 10, pieces y and z are just sitting there and I'm not working on them and hence wasting time. I can't just move a quantity from 10 to 40 because I haven't completed operations 20 and 30 to pieces y and z which I need for 40. If I had parallel operations, I could do 10, 20 and 30 all at the same time and reduce my overall cycle time to 1 shift (the length of the longest operation).

    Hello rthome,
    that is a good news for me. Can you provide a "how to" guide about XE's AQ access via AQxmlServlet. I am interested in:
    1. On which Application Server AQxmlServlet was tested?
    2. Where can I get missing jars that are not shipped with Oracle XE? (ORACLE_HOME/JDBC/LIB/nls_charset12.jar, ORACLE_HOME/lib/http_client.jar, ORACLE_HOME/oc4j/j2ee/home/lib/javax-ssl-1_2.jar, ORACLE_HOME/lib/servlet.jar, ORACLE_HOME/lib/xmlparserv2.jar, ORACLE_HOME/lib/xsu12.jar, etc.)
    3. Which JDK, JDeveloper versions where you using?
    Can you visit my topic:
    Oracle XE Advanced Queuing
    and see if you could point me to an answer on my problem.
    Thanks in advance
    Message was edited by:
    Kichas

  • Custom function/operation creation for payroll

    Hello Experts,
    I need to create the custom operation/function in PE04. I would appreciate if you could give me the step by step process.
    I tried to create the custom function in PE04 and it is not creating the form to include the source code.
    I appreciate your help.
    Thanks.

    Here you go
    http://help.sap.com/saphelp_45b/helpdata/en/96/79bc4bb27911d1a5400000e83ddb11/content.htm
    http://www.sapfans.com/forums/viewtopic.php?f=11&t=311346
    http://help.sap.com/saphelp_40b/helpdata/en/60/d8b913576311d189270000e8322f96/content.htm
    Good luck !
    Khan

  • A function in a subquery is call too many times.

    Dear all,
    I'm struggling to understand why a function in a subquery is called too many times.
    Let me explain with an example:
    create or replace function all_emp (v_deptno in number)
    return varchar2
    as
    v_all_emp varchar2(2000);
    begin
        dbms_output.put_line ('function called');
        for i in (select * from emp where deptno = v_deptno) loop
            v_all_emp := v_all_emp || i.ename || '; ';
        end loop;
    return v_all_emp;
    end;
    -- running just the subquery, calls the function all_emp only 4 times (once for each row in table dept)
    select
        d.deptno,
        d.dname,
        all_emp(d.deptno) f_all_emp
        from dept d;
    -- running the whole query, using regexp to split the value of f_all_emp into separate fields, causes that function all_emp is called 28 times, thus 6 times for each row!!
    select tmp.*,
    regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
    regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
    regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
    regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
    regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
    regexp_substr(f_all_emp,'[^;]*',1,11) emp6
    from
        (select
        d.deptno,
        d.dname,
        all_emp(d.deptno) f_all_emp
        from dept d) tmp
    ;I don't understand why Oracle is calling my function 28 times in this example, 4 times should be sufficient.
    Is there a way to force that the subquery is materialized first?
    Little background:
    Above function / query is of course a simple example.
    Actually I have pretty complex function, embedding in a subquery.
    The subquery is already slow (2 min to run), but when I want to split the result of the funciton in multiple (approx 20) fields it's over an hour due to above described behaviour.

    Optimizer merges in-line view and query results in:
    select  d.deptno,
            d.dname,
            all_emp(d.deptno) f_all_emp
            regexp_substr(all_emp(d.deptno),'[^;]*',1,1) emp1,
            regexp_substr(all_emp(d.deptno),'[^;]*',1,3) emp2,
            regexp_substr(all_emp(d.deptno),'[^;]*',1,5) emp3,
            regexp_substr(all_emp(d.deptno),'[^;]*',1,7) emp4,
            regexp_substr(all_emp(d.deptno),'[^;]*',1,9) emp5,
            regexp_substr(all_emp(d.deptno),'[^;]*',1,11) emp6
      from  dept d
    /That's why function is called 28 times. We can see it from explain plan:
    SQL> explain plan for
      2  select tmp.*,
      3          regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
      4          regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
      5          regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
      6          regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
      7          regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
      8          regexp_substr(f_all_emp,'[^;]*',1,11) emp6
      9    from  (
    10           select  d.deptno,
    11                   d.dname,
    12                   all_emp(d.deptno) f_all_emp
    13             from  dept d
    14          ) tmp
    15  /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 3383998547
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     4 |    52 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| DEPT |     4 |    52 |     3   (0)| 00:00:01 |
    8 rows selected.
    SQL>  If we use NO_MERGE hint:
    SQL> select  /*+ NO_MERGE(tmp) */
      2          tmp.*,
      3          regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
      4          regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
      5          regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
      6          regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
      7          regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
      8          regexp_substr(f_all_emp,'[^;]*',1,11) emp6
      9    from  (
    10           select  d.deptno,
    11                   d.dname,
    12                   all_emp(d.deptno) f_all_emp
    13             from  dept d
    14          ) tmp
    15  /
        DEPTNO DNAME          F_ALL_EMP  EMP1       EMP2       EMP3       EMP4       EMP5       EMP6
            10 ACCOUNTING     CLARK; KIN CLARK       KING       MILLER
                              G; MILLER;
            20 RESEARCH       SMITH; JON SMITH       JONES      SCOTT      ADAMS      FORD
                              ES; SCOTT;
                               ADAMS; FO
                              RD;
            30 SALES          ALLEN; WAR ALLEN       WARD       MARTIN     BLAKE      TURNER     JAMES
                              D; MARTIN;
        DEPTNO DNAME          F_ALL_EMP  EMP1       EMP2       EMP3       EMP4       EMP5       EMP6
                               BLAKE; TU
                              RNER; JAME
                              S;
            40 OPERATIONS
    function called
    function called
    function called
    function called
    function called
    function called
    SQL> explain plan for
      2  select  /*+ NO_MERGE(tmp) */
      3          tmp.*,
      4          regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
      5          regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
      6          regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
      7          regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
      8          regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
      9          regexp_substr(f_all_emp,'[^;]*',1,11) emp6
    10    from  (
    11           select  d.deptno,
    12                   d.dname,
    13                   all_emp(d.deptno) f_all_emp
    14             from  dept d
    15          ) tmp
    16  /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 2317111044
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     4 |  8096 |     3   (0)| 00:00:01 |
    |   1 |  VIEW              |      |     4 |  8096 |     3   (0)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| DEPT |     4 |    52 |     3   (0)| 00:00:01 |
    9 rows selected.
    SQL> Not sure why function is executed 6 and not 4 times. What we actually want is to materialize in-line view:
    SQL> with tmp as (
      2               select  /*+ materialize */
      3                       d.deptno,
      4                       d.dname,
      5                       all_emp(d.deptno) f_all_emp
      6                 from  dept d
      7              )
      8  select  tmp.*,
      9          regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
    10          regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
    11          regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
    12          regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
    13          regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
    14          regexp_substr(f_all_emp,'[^;]*',1,11) emp6
    15    from  tmp
    16  /
        DEPTNO DNAME          F_ALL_EMP  EMP1       EMP2       EMP3       EMP4       EMP5       EMP6
            10 ACCOUNTING     CLARK; KIN CLARK       KING       MILLER
                              G; MILLER;
            20 RESEARCH       SMITH; JON SMITH       JONES      SCOTT      ADAMS      FORD
                              ES; SCOTT;
                               ADAMS; FO
                              RD;
            30 SALES          ALLEN; WAR ALLEN       WARD       MARTIN     BLAKE      TURNER     JAMES
                              D; MARTIN;
        DEPTNO DNAME          F_ALL_EMP  EMP1       EMP2       EMP3       EMP4       EMP5       EMP6
                               BLAKE; TU
                              RNER; JAME
                              S;
            40 OPERATIONS
    function called
    function called
    function called
    function called
    SQL> explain plan for
      2  with tmp as (
      3               select  /*+ materialize */
      4                       d.deptno,
      5                       d.dname,
      6                       all_emp(d.deptno) f_all_emp
      7                 from  dept d
      8              )
      9  select  tmp.*,
    10          regexp_substr(f_all_emp,'[^;]*',1,1) emp1,
    11          regexp_substr(f_all_emp,'[^;]*',1,3) emp2,
    12          regexp_substr(f_all_emp,'[^;]*',1,5) emp3,
    13          regexp_substr(f_all_emp,'[^;]*',1,7) emp4,
    14          regexp_substr(f_all_emp,'[^;]*',1,9) emp5,
    15          regexp_substr(f_all_emp,'[^;]*',1,11) emp6
    16    from  tmp
    17  /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 634594723
    | Id  | Operation                  | Name                       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT           |                            |     4 |  8096 |     5   (0)| 00:00:01 |
    |   1 |  TEMP TABLE TRANSFORMATION |                            |       |       |            |          |
    |   2 |   LOAD AS SELECT           |                            |       |       |            |          |
    |   3 |    TABLE ACCESS FULL       | DEPT                       |     4 |    52 |     3   (0)| 00:00:01 |
    |   4 |   VIEW                     |                            |     4 |  8096 |     2   (0)| 00:00:01 |
    |   5 |    TABLE ACCESS FULL       | SYS_TEMP_0FD9D6603_20255AE |     4 |    52 |     2   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    12 rows selected.
    SQL> However, hint MATERIALIZE is an undocumented hint.
    SY.

  • Web Service from RFC function module

    Hi all,
    I'm searching for a way to create web services from RFC-enabled function modules. I know there is a wizard, but it's not suitable for my problem:
    I have around 30 function modules (number raising in near future) I want to enable for web services, most of them share the same structures representing the underlying data model. When one structure is modified (i.e. a new sub-structure is added) I have to recreate all web services, which is quite uncomfortable.
    In addition, using the wizard results in one wsdl-file for each web service operation, that leads to an administration overhead using this web services from a java frontend.
    So I'm searching for a "bulk creation". I also know the wizard can be used for a function group, but I can't put all my RFC-enabled function module in one function group, that would lead to confusion in the package.
    Does anyone know how web services are created programmaticaly? If I had a function module which creates the web services I could write a function module which creates all web services I need.
    Thank you in anticipation!
    Florian

    I'm not sure I understand the 're-create' part...how are you re-creating the web service?  if you modify the interface of a function-based web service, then you use the 'modify operations' functionality (context menu - right-click) to regenerate the web service interface; this works for a function group based web service as well and hits all of the methods at once.  As for the java overhead on function group services, stating the obvious, maybe you just need to lower the number of functions in your groups.  We use .Net-developed applications with multi-function webservices and don't have any overhead issues.

  • How to use BETWEEN Operator in physical layer in OBIEE 11g

    Hi Experts,
    How do I do the BETWEEN Operator functionality in Physical layer if my requirements is like this?
    TABLE_1.COLUMN_1 = TABLE_2 is between COLUMN_2 and COLUMN_3
    Below is the syntax for BETWEEN Operator function when I am trying to insert them.
    <<expression>> BETWEEN <<Upper Bound>> AND <<Lower Bound>>
    Thanks,
    Edited by: OBIEE/BIP Forumer on Nov 3, 2012 11:37 PM

    Below is an example diagram, as you can see, FACT TABLE have a join (an arrow one) towards TABLE_1 and TABLE_3. AS for the TABLE_3, this table is the one which I implement with the BETWEEN Operators function in Physical Layer. Also, the arrow in FACT TABLE and TABLE_3 is a red one with no arrow head line.
    TABLE_2
    ^
    l
    l
    l
    FACT TABLE ---------> TABLE_1
    l
    l
    l
    TABLE_3
    Edited by: OBIEE/BIP Forumer on Nov 4, 2012 2:33 AM

  • Call a function in a where clause of a select

    hello,
    is it possible to call a function in a where clause of a select????
    ex: select col1, col2
    from my_table
    where my_package.my_function(32199, 2008, col3, 'P');
    and i have error message "ORA-00920: invalid relational operator"
    FUNCTION my_function(v_matricule IN NUMBER,
              v_Year IN NUMBER,
              v_date IN DATE,
              v_type IN CHAR DEFAULT 'P')
    RETURN BOOLEAN;
    @+Rosagio

    user10225229 wrote:
    hello,
    is it possible to call a function in a where clause of a select????
    ex: select col1, col2
    from my_table
    where my_package.my_function(32199, 2008, col3, 'P');
    and i have error message "ORA-00920: invalid relational operator"
    FUNCTION my_function(v_matricule IN NUMBER,
              v_Year IN NUMBER,
              v_date IN DATE,
              v_type IN CHAR DEFAULT 'P')
    RETURN BOOLEAN;You can call a function if it returns a datatype that is supported by SQL. BOOLEAN is NOT supported by SQL.

  • How to use/implement xor binary operator in oracle

    Hi,
    Like in VB and .Net we have a Binary operator/expression called Xor for the following
    logic....
    EXAMPLE:
    A Integer = 10
    B Integer = 8
    C Integer
    c = (A Xor B) OUTPUT is 2
    1010 (10 in Binary)
    1000 (8 in binary)
    0010 (result is 2 in binary)
    I want to implement the same logic in Oracle do we have any builtin operator function
    for this? If we dont have can anyone please try to code it. It will be very helpful and
    urgent.
    Thanks in Advance
    Reddy

    do we have any builtin operator functionfor this?
    Up to a point. Specifically, Oracle has a BITAND() function. With this it is possible to code our own BITOR and BITXOR functions. I'm glad to say I personally haven't had to worry about bits for over ten years, but Connor McDonald has posted a solution on Jonathan Lewis's FAQ site.
    Cheers, APC

Maybe you are looking for

  • How do I move Lookout 5 w/ Fieldpoint 3 to a new PC

    I want to move my install of Lookout 5 from an old, slow computer to a newer, faster one. Both machines run Windows 2000 SP4. I have a clean install of Lookout 5 and Fieldpoint 3 on the new machine, and the old machine still works and is running on t

  • Size of schema / table / index

    Hi, Is there some direct queries or DBA views to find the following 1. current size of a particular schema 2. used, max, free size of a particular schema 3. size of each index in a schema 4. size of each table in a schema TIA regards, Prakash

  • How do i get photo into an iPad?

    How do i import photos into an ipad?

  • Cannot place cursor in password box to complete login.

    At the MLS Listings website , after entering any number in the User ID field and clicking "Sign In", the cursor cannot be placed in the password box of the next window. With Safari or IE, the cursor is already in the password box when the window is o

  • [SOLVED] Dovecot Systemd Service Fails

    Hello all, I can't find the reason for why my dovecot fails. My journalctl doesn't provide output for the PID I give it. $ systemctl status dovecot.service * dovecot.service - Dovecot IMAP/POP3 email server Loaded: loaded (/usr/lib/systemd/system/dov