Time Function in Oracle

Note that there is no specific time function in Oracle.
What is the most efficient way to change the time segment of a Date or Timestamp field (column)?
I need to pick up the date from the system but the time requires manual entry.
Thanks

And if you want to do some calculations with them, this will give you some ideas:
SQL> select sysdate
  2       , sysdate + interval '1' minute
  3       , trunc(sysdate) + numtodsinterval(7,'hour')
  4       , trunc(sysdate) + 7/24
  5    from dual
  6  /
SYSDATE             SYSDATE+INTERVAL'1' TRUNC(SYSDATE)+NUMT TRUNC(SYSDATE)+7/24
01-10-2007 07:34:02 01-10-2007 07:35:02 01-10-2007 07:00:00 01-10-2007 07:00:00
1 rij is geselecteerd.
SQL> select systimestamp
  2       , systimestamp + interval '5' hour
  3       , trunc(systimestamp) + numtodsinterval(60 * 7 + 38,'minute')
  4       , trunc(systimestamp) + (60 * 7 + 38) / (24 * 60)
  5    from dual
  6  /
SYSTIMESTAMP
SYSTIMESTAMP+INTERVAL'5'HOUR                                                TRUNC(SYSTIMESTAMP) TRUNC(SYSTIMESTAMP)
01-10-07 07:34:02,296000 +02:00
01-10-07 12:34:02,296000000 +02:00                                          01-10-2007 07:38:00 01-10-2007 07:38:00
1 rij is geselecteerd.Regards,
Rob.

Similar Messages

  • Need Assistance for VBA function in oracle how to implement

    My very respected and Senior, regards,
    Sir, hope you will in best of health and wealth by the grace of God,
    Sir, i have a request problem as i m very junior against you and you have passed this time before many years ago as i m standing where. Sir i m a very junior developer of oracle and have a problem putting on your desk with the hope that you can help my as a boss.
    Sir me have to calculate yield of Bond using oracle form
    i have tried my best and tired
    there is a formulae in excel which give the Yield() when we provide the parameters
    and i need the excel formulae or the oracle calculation code of PLSQL for this.
    How can i get yield when i have price, coupon rate, frequency, issue and maturity of the coupon , coupon period , next coming coupon , and others detail.
    or tell me how to use EXCEL VBA for this problem ,
    thnx n regards,
    yours student, junior developer youngest brother
    Faraz
    How can I get the solution using Excel VBA function with oracle
    so that move values to excel calculate them and copy the result from excel to oracle forms

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • How to identify a One time Customer in Oracle Apps AR

    Hello,
    How to identify a One time Customer In Oracle APps AR?
    Is it possible to find out how many number of transactions a Customer does so that, if the number of transactions is 1, then that customer is a one time customer. or else he is not?
    Thank you
    Bob

    Hi Bob,
    to my knowledge, i cannot recollect a seeded report from oracle that could meet your requirement. You can try running the Transaction Register report from your Go live date till now, so that system would generate a list of all the Invoices along with the Customer Name, then you could export this to excel and perform a sort, filter and groupby to get the desired result ....
    However if you are a person with technical expertise, check the table RA_CUSTOMER_TRX_ALL this stores all the transaction related information ..... you can select TRX_NUMBER, BILL_TO_CUSTOMER_ID from this table and perform a count by customer...(I am not sure on the syntax and usage of sql functions) you can get the desired results ...
    Also in future, while creating a new customer if you know well in advance that this customer is going to be an ONE TIME CUSTOMER, there you could capture that information in any unused field on the customer configuration or can enable a DFF and capture this information, so it becomes very easy to identify such customers or have a report built based on it...
    I assume there is an objecive behind trying to find One time customers or customers with a single transaction history ... are you planning to disable/end date/inactivate such customers ....?
    Regards,
    Ivruksha

  • Recursive functions in Oracle SQL.

    OK,
    Here is the pivot problem. Only this time were on an Oracle 11.1.0.7.0.
    I've created a table called:
    CREATE TABLE STAGING.MY_TAB_COLS
      TABLE_NAME   VARCHAR2(30 BYTE),
      COLUMN_NAME  VARCHAR2(30 BYTE)
    )And I've put the following data into it:
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'SSN_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'FIRST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'LAST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'DOB_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_SSN_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_FIRST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_LAST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_DOB_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'MPI');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'SSN_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'FIRST_NAME_A_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'FIRST_NAME_B_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'LAST_NAME_A_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'LAST_NAME_B_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_SSN_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_FIRST_NAME_A_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_FIRST_NAME_B_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_LAST_NAME_A_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAEADP1', 'EMP_LAST_NAME_B_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'MPI_OLD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_SSN_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_LAST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_FIRST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_DOB');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_SSN');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_LAST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_FIRST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_DOB');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_NON_SSN_ID');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_SSN_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_FIRST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_FIRST_NAME_B_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_LAST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_LAST_NAME_B_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_FIRST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_FIRST_NAME_B_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_LAST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'EMPLOYEE_LAST_NAME_B_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'PATIENT_SSN_STANDARDIZED');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAMAET1', 'MPI');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'EMPLOYEE_SSN');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'EMPLOYEE_FIRST_NAME');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'EMPLOYEE_LAST_NAME');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'EMPLOYEE_DATE_OF_BIRTH');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_SSN');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_FIRST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_LAST_NAME_SOURCE');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_DOB');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PRESCRIBER_LAST_NAME');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'MPI');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_FIRST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_FIRST_NAME_B_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_LAST_NAME_A_STD');
    Insert into STAGING.MY_TAB_COLS
       (TABLE_NAME, COLUMN_NAME)
    Values
       ('AAPMED1', 'PATIENT_LAST_NAME_B_STD');My task for this problem is pretty straight forward.
    Using the ALL_TAB_COLS table I want to list out certain fields for each table name specified.
    All the tables have fields that are similar. I just want these table names to go across the top.
    And the field names to list out under each table.
    So you would have something like:
    AAEADP1                         AAMAET1                     AAPMED1
    SSN_SOURCE                      MPI_OLD                     EMPLOYEE_SSN
    FIRST_NAME_SOURCE               EMPLOYEE_SSN_SOURCE         EMPLOYEE_FIRST_NAME
    LAST_NAME_SOURCE                EMPLOYEE_LAST_NAME_SOURCE   EMPLOYEE_LAST_NAME
    DOB_SOURCE                      EMPLOYEE_FIRST_NAME_SOURCE  EMPLOYEE_DATE_OF_BIRTH
    EMP_SSN_SOURCE                  EMPLOYEE_DOB                PATIENT_SSN
    EMP_FIRST_NAME_SOURCE           PATIENT_SSN                 PATIENT_FIRST_NAME_SOURCE
    EMP_LAST_NAME_SOURCE            PATIENT_LAST_NAME_SOURCE    PATIENT_LAST_NAME_SOURCE
    EMP_DOB_SOURCE                  PATIENT_FIRST_NAME_SOURCE   PATIENT_DOB
    MPI                             PATIENT_DOB                 PRESCRIBER_LAST_NAME
    SSN_STANDARDIZED                EMPLOYEE_NON_SSN_ID         MPI
    FIRST_NAME_A_STANDARDIZED       EMPLOYEE_SSN_STANDARDIZED   PATIENT_FIRST_NAME_A_STD
    FIRST_NAME_B_STANDARDIZED       PATIENT_FIRST_NAME_A_STD    PATIENT_FIRST_NAME_B_STD
    LAST_NAME_A_STANDARDIZED        PATIENT_FIRST_NAME_B_STD    PATIENT_LAST_NAME_A_STD
    LAST_NAME_B_STANDARDIZED        PATIENT_LAST_NAME_A_STD     PATIENT_LAST_NAME_B_STD
    EMP_SSN_STANDARDIZED            PATIENT_LAST_NAME_B_STD   
    EMP_FIRST_NAME_A_STANDARDIZED   EMPLOYEE_FIRST_NAME_A_STD   
    EMP_FIRST_NAME_B_STANDARDIZED   EMPLOYEE_FIRST_NAME_B_STD   
    EMP_LAST_NAME_A_STANDARDIZED    EMPLOYEE_LAST_NAME_A_STD   
    EMP_LAST_NAME_B_STANDARDIZED    EMPLOYEE_LAST_NAME_B_STD   
                                    PATIENT_SSN_STANDARDIZED   
                                    MPI         Where each table name lists across with all of their column names under each table.
    The query that I have so far is The following:
      SELECT   T1.TABLE_NAME, T1.COLUMN_NAME
        FROM   my_tab_cols t1, (  SELECT   DISTINCT UPPER (SOURCE_TABLE) TABLE_NAME
                                     FROM MPI_DEMOGRAPHICS_TEST
                                 ORDER BY UPPER (SOURCE_TABLE)) tn
       WHERE   T1.TABLE_NAME = tn.TABLE_NAME
               AND (   T1.column_name LIKE '%MPI%'
                    OR T1.column_name LIKE '%SSN%'
                    OR T1.column_name LIKE '%E%SSN%'
                    OR T1.column_name LIKE '%R%SSN%'
                    OR T1.column_name LIKE '%P%SSN%'
                    OR T1.column_name LIKE '%BIRTH%'
                    OR T1.column_name LIKE '%DOB%'
                    OR T1.column_name LIKE '%FIRST%NAME%'
                    OR T1.column_name LIKE '%LAST%NAME%'
                    OR T1.column_name LIKE '%CLIENT%NAME%'
                    OR T1.column_name LIKE '%SOURCE_TABLE%'
                    OR T1.column_name LIKE '%TABLE%')
    ORDER BY   T1.TABLE_NAME, t1.column_id; It just list everything straight down.
    Where the MPI_DEMOGRAPHIES_TEST table feeds the relevant table names to the ALL_TAB_COLS table.
    It can just be substituted with a list of the values, AAEADP1, AAMAET1, AAPMED1.
    Is there a 'pivot' function in Oracle 11.1 that I can use to list these column names out sideways as opposed to what I did before?
    Thanks,

    Hi,
    Here's one way to get results like that using the Oracle 11 SELECT ... PIVOT feature:
    WITH     got_nums     AS
         SELECT     column_name
         ,     ROW_NUMBER () OVER ( PARTITION BY  table_name
                                   ORDER BY          column_name
                           )                    AS r_num
         ,     DENSE_RANK () OVER ( ORDER BY      table_name)     AS c_num
         FROM     my_tab_cols
            WHERE   column_name     LIKE '%MPI%'
            OR     column_name     LIKE '%SSN%'
    --      OR     column_name     LIKE '%E%SSN%'          -- Included in '%SSN% above
    --      OR     column_name     LIKE '%R%SSN%'          -- Included in '%SSN% above
    --      OR     column_name     LIKE '%P%SSN%'          -- Included in '%SSN% above
            OR     column_name     LIKE '%BIRTH%'
            OR     column_name     LIKE '%DOB%'
            OR     column_name     LIKE '%FIRST%NAME%'
            OR     column_name     LIKE '%LAST%NAME%'
            OR     column_name     LIKE '%CLIENT%NAME%'
    --      OR     column_name     LIKE '%SOURCE_TABLE%'     -- Included in %TABLE% below
            OR     column_name     LIKE '%TABLE%'
        UNION
            SELECT  table_name                         AS colum_name
         ,     0                              AS r_num
         ,     DENSE_RANK () OVER ( ORDER BY      table_name)     AS c_num
         FROM     my_tab_cols
    SELECT       *
    FROM       got_nums
    PIVOT       (   MIN (column_name)
           FOR c_num     IN ( 1     AS table_1
                            , 2     AS table_2
                      , 3     AS table_3
    ORDER BY  r_num
    ;Output:
    R_NUM TABLE_1                        TABLE_2                        TABLE_3
        0 AAEADP1                        AAMAET1                        AAPMED1
        1 DOB_SOURCE                     EMPLOYEE_DOB                   EMPLOYEE_DATE_OF_BIRTH
        2 EMP_DOB_SOURCE                 EMPLOYEE_FIRST_NAME_A_STD      EMPLOYEE_FIRST_NAME
        3 EMP_FIRST_NAME_A_STANDARDIZED  EMPLOYEE_FIRST_NAME_B_STD      EMPLOYEE_LAST_NAME
        4 EMP_FIRST_NAME_B_STANDARDIZED  EMPLOYEE_FIRST_NAME_SOURCE     EMPLOYEE_SSN
        5 EMP_FIRST_NAME_SOURCE          EMPLOYEE_LAST_NAME_A_STD       MPI
        6 EMP_LAST_NAME_A_STANDARDIZED   EMPLOYEE_LAST_NAME_B_STD       PATIENT_DOB
        7 EMP_LAST_NAME_B_STANDARDIZED   EMPLOYEE_LAST_NAME_SOURCE      PATIENT_FIRST_NAME_A_STD
        8 EMP_LAST_NAME_SOURCE           EMPLOYEE_NON_SSN_ID            PATIENT_FIRST_NAME_B_STD
        9 EMP_SSN_SOURCE                 EMPLOYEE_SSN_SOURCE            PATIENT_FIRST_NAME_SOURCE
       10 EMP_SSN_STANDARDIZED           EMPLOYEE_SSN_STANDARDIZED      PATIENT_LAST_NAME_A_STD
       11 FIRST_NAME_A_STANDARDIZED      MPI                            PATIENT_LAST_NAME_B_STD
       12 FIRST_NAME_B_STANDARDIZED      MPI_OLD                        PATIENT_LAST_NAME_SOURCE
       13 LAST_NAME_A_STANDARDIZED       PATIENT_DOB                    PATIENT_SSN
       14 LAST_NAME_B_STANDARDIZED       PATIENT_FIRST_NAME_A_STD       PRESCRIBER_LAST_NAME
       15 LAST_NAME_SOURCE               PATIENT_FIRST_NAME_B_STD
       16 MPI                            PATIENT_FIRST_NAME_SOURCE
       17 SSN_SOURCE                     PATIENT_LAST_NAME_A_STD
       18 SSN_STANDARDIZED               PATIENT_LAST_NAME_B_STD
       19                                PATIENT_LAST_NAME_SOURCE
       20                                PATIENT_SSN
       21                                PATIENT_SSN_STANDARDIZEDIf you don't want to see the r_num column, use your front-end to hide it (e.g., in SQL*Plus: "COLUMN r_num NOPRINT"), or do the pivot in a sub-query, and only select table_1, table_2 and table_3 in the main query.
    As with all pivots, you have to hard-code an upper bound to the number of pivoted columns. I used 3 above. You could use 4, or 5, or 45, but you must specify exactly how many columns to display.
    If you say there will be 3 tables, and there actually are more than 3, then the query will still run, but all the tables after the first 3 will be ignored.
    If you say there will be 3 tables, and there actually are fewer, then the query will still run, but you will have NULL columns at the end of each output row.
    This sorts the output alphabetically by table_name and column_name. You can sort by anything you want by changing the analytic ORDER BY clauses. For example, if you are using all_tabl_columns and you want the columns to appear in order by column_id, then you would say:
    ,     ROW_NUMBER () OVER ( PARTITION BY  table_name
                              ORDER BY          column_id     -- instead of column_name
                      )                    AS r_num

  • Any Predefined Function in Oracle as 'ListAgg'

    Hi All,
    if we give input as '1,2,3,4,5'
    to get output as,
    1
    2
    3
    4
    5
    but there is a function for vice versa, listagg, just as like that I want to find out, if it is there any?Thanks,

    UNPIVOT
    http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-pivot.html
    Edited by: Sven W. on Jul 29, 2010 2:00 PM
    After reading your post the third time I'm still not clear what you want.
    Well there is a ListAgg function in Oracle. Do you want that?
    http://www.oracle.com/technetwork/oramag/2009/09-nov/o69asktom-089919.html
    Edited by: Sven W. on Jul 29, 2010 2:01 PM

  • SQL Devloper Migration from SQL SerProcedurs created as Functions in Oracle

    Hi All,
    This is the first time I am using SQL Deveoper to migrate SQL Server database to Oracle.
    I have SQL Developer 3 and I did migration from SQL Sever 2008 to Oracle 10g using online migration.
    Everything was done perfectly, but there are some extra tables created in Oracle which are not present in SQL Server database.
    And also I observed lot of programs which are stored procedures in SQL Server are converted as functions in Oracle.
    Does someone knows how to fix this problem.
    Thanks

    Hi,
    A SQL*Server stored procedure can be converted to an Oracle function depending on how it is written and what it is doing. In the documentation -
    Oracle® SQL Developer
    Supplementary Information for Microsoft SQL Server and
    Sybase Adaptive Server Migrations
    In Chapter 3 in the section -
    3.4.2 Function
    It says under Table 3-6 -
    In Microsoft SQL Server or Sybase
    Adaptive Server, you can convert a stored
    procedure to a function in Oracle because
    the stored procedure in Microsoft SQL
    Server or Sybase Adaptive Server can
    RETURN an integer value to the calling
    routine using a RETURN statement. A
    stored procedure returns a status value to
    the calling routine even in the absence of
    a RETURN statement. The returned status
    is equal to ZERO if the procedure
    execution is successful or NON-ZERO if
    the procedure fails for some reason. The
    RETURN statement can return only
    integer values
    And what tables do you see in oracle that are not there in SQL*Server ? Some tables are created as part of the migration as they are needed to have the same functionality as in SQL*Server.
    Does your migrated Oracle database work in the same way as the SQL*Server database ? If not, then please give use specific examples and we can follow up.
    Regards,
    Mike

  • Grid Functionality in Oracle Forms

    Hi All,
    This is regarding Grid Functionality in Oracle Forms 6i. Do we have Grids concept in Oracle Forms? If yes please explain me about creating Grids in Forms?..And If anyone has any document related to this topic please provide it to me..Even I searched in oracle Portal, Oracle Forums and metalink as well but could not locate any relavent documents on it....... It would be a great help if you provide information on the same.
    Thanks in Advance.

    hello ,
    just open data block property set property "number of record displayed=10"
    so u can see 10 records at time like grid in vb or .net
    u can navigate record using up/down key.
    it's not a grid but mulit record data block.
    Regards
    Chandan

  • Caps lock on Functionality in oracle apex4.1 on login page

    How to implement Caps lock on Functionality in oracle apex4.1 on login page?
    Edited by: 975943 on Dec 10, 2012 3:23 AM

    Rohit,Thanks for prompt reply.
    I have created on Display item named 'P1_CAPSLOCK',which will be enable instead of showing alert using following code.
    <div class="ui-state-highlight ui-corner-all"> <table><tbody><tr><td> <span class="ui-icon ui-icon-alert"></span> </td><td> <p>Caps Lock is enabled.</p> </td></tr></tbody></table> </div>and have added following file in JS
    <link type="text/css" href="/i/libraries/jquery-ui/1.8/themes/cupertino/jquery-ui.css" rel="stylesheet">and have updated your code as,
    $x_Hide('P1_CAPSLOCK');
    $('#P1_PASSWORD').keypress(function(e)
       var s = String.fromCharCode( e.which );
        if ( s.toUpperCase() == s && s.toLowerCase() != s && !e.shiftKey ) {
            $x_Show('P1_CAPSLOCK');
    });now i wanna disable this display item same time when user off the caps lock key.Have sent you linkedin req.kindly accept.
    Edited by: OracleMiracle on Dec 11, 2012 5:18 AM

  • HT204406 Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for

    Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for weeks. I have allowed my compter to run for days and the songs are still not accessible.  I have a Match subscription and Match is working.  If I click on the "Genre" link the greyed out songs show that they are ready for download from the cloud but I cannot download them.  I have downloaded over 1500 other songs, so I am trying to understand what is going on here. I would appreciate any help anyone can give me.
    Thanks

    I did think about that and if I have to I will do that, however there are about 50 songs. I have closed and reopened iTunes several times and I am sure that I have the latest version. It fails right away but I can click on the cloud download icon and download the song that it failed on ... therefore it is not that song "or any one song" causing the issue. Any ideas?

  • How to use elapsed time function with state machine in Lab VIEW

    Hello
    I've been trying to use state machine with elapsed time function in order to sequentially start and stop my code. The arrangement is to start the code for 1 minute then stop for 5 minutes. I've attached the code, the problem is when I place the elapsed time function out of the while loop it doesn't work, on the other hand when I place it inside the loop it does work but it doesn't give the true  signal to move to the next state. 
    Could you please have a look to my code and help me to solve this issue.
    Regards 
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    daq assistance thermocouple(sate machine raj).vi ‏436 KB

    Rajab84 wrote:
    Thanks apok for your help
    even with pressing start it keeps running on wait case 
    could you please explain the code for me, the use of Boolean crossing, increment , and equal functions 
    Best Regards 
    Rajab 
    OK..I modded the example to stop after 2 cycles. Also recommend taking the free online LabVIEW tutorials.
    run vi. case statement goes to "initialize", shift registers are initialized to their constants. goto "wait"
    "start"= false, stay in current state. If true, transition to "1 min" case
    reset elapsed timer with True from shift register(counter starts at zero)."time has elapsed"=false, stay in current state(1 min). If true, goto "5min" case
    reset elapsed timer with True from shift register of previous case(counter starts at zero)."time has elapsed"=false, stay in current state(5 min). If true, goto "1min" case. Also, bool crossing is looking for "true-false" from "5 min" compare function to add cycle count.
    Once cycle count reaches 2, stop while loop.... 
    Attachments:
    Untitled%202[1].vi ‏42 KB

  • I am looking for an app that can unmute my iphone after a preset time, eg 1 or 2 hours. Does anybody know an app with this feature?? The apps I have found are linked to a calendar or a place, I just need the timer function..

    I am looking for an app that can unmute my iphone after a preset time, eg 1 or 2 hours. Does anybody know an app with this feature?? The apps I have found are linked to a calendar or a place, I just need the timer function..

    thanks. yes i am aware of the VoiceOver feature but it is NOT the solution to my problem. as you said, it is a solution to a different set of issues. i want the text to speech ability because i there are books i need to read but do not have the time to sit down and read them and have become used to listening to them read to me either by a professional human reader or with the text to speech software on the Kindle.
    I think Apple makes the best audio devices but i am really disappointed in this inexplainable shortcoming. if apple can give us siri they ought to be able to design a nice little button that i can push to turn on text to speech while i am in a document, book, magazine or webpage. clearly it is possible as apple has added the "reader" button in safari to have web pages dropped into the reader format.
    thanks for your suggestion though, it is what everyone suggests but it does not address the issue.

  • Subpartition with MOD Function in Oracle 11g

    Hi All,
    Can we create Subpartition based on MOD Function in Oracle 11g ?

    Hi!
    What are you refering with "MTS"? Anybody knows a term like this (except MultiThreaded Server).

  • RANK FUNCTION IN ORACLE 8I

    제품 : PL/SQL
    작성날짜 : 2001-09-11
    RANK FUNCTION IN ORACLE 8I
    ==========================
    EXPLANATION
    oracle 8i(8.1.6) 부터 가능한 rank function 입니다.
    8.1.5 에서는 ora-923 error 가 납니다.
    plsql 내에서는 oracle 9i 부터 가능합니다.
    8.1.6에서는 ora-900 error가 납니다.
    EXAMPLE
    <RANK() OVER ( query_partition_clause ORDER_BY clause) >
    - 중복 rank 값만큼 다음 순위는 생략
    SQL>SELECT deptno, ename, sal, comm,
    RANK() OVER (PARTITION BY deptno ORDER BY sal DESC, comm) as rk
    FROM emp;
    DEPTNO ENAME SAL RK
    10 KING 5000 1
    10 CLARK 2450 2
    10 MILLER 1300 3
    20 3500 1
    20 SCOTT 3000 2
    20 FORD 3000 2
    20 JONES 2975 4
    20 ADAMS 1100 5
    20 SMITH 800 6
    30 BLAKE 2850 1
    30 ALLEN 1600 2
    30 TURNER 1500 3
    30 WARD 1250 4
    30 MARTIN 1250 5
    40 JAMES 777 1
    9 1
    <DENSE_RANK( ) OVER ( query_partition_clause ORDER_BY clause ) >
    - 중복 rank 의 수와 무관하게 numbering
    SQL>SELECT dname, ename, sal, DENSE_RANK()
    OVER (PARTITION BY dname ORDER BY sal) as drank
    FROM emp, dept
    WHERE emp.deptno = dept.deptno
    AND dname IN ('SALES', 'RESEARCH');
    DNAME ENAME SAL DRANK
    RESEARCH SMITH 800 1
    RESEARCH ADAMS 1100 2
    RESEARCH JONES 2975 3
    RESEARCH SCOTT 3000 4
    RESEARCH FORD 3000 4
    RESEARCH 3500 5
    SALES WARD 1250 1
    SALES MARTIN 1250 1
    SALES TURNER 1500 2
    SALES ALLEN 1600 3
    SALES BLAKE 2850 4
    plsql 내에서 사용 가능 :oracle 9i 부터
    SQL> create table
    rank_emp(deptno number(2), ename varchar2(20), sal number(5), rk number(2));
    테이블이 생성되었습니다.
    SQL> create or replace procedure window_plsql AS
    query_str VArchar2(1000);
    begin
    query_str := 'insert into rank_emp
    SELECT deptno, ename, sal,
    RANK() OVER (PARTITION BY deptno ORDER BY sal DESC, comm) as rk
    FROM emp' ;
    Execute Immediate query_str;
    end;
    2 /
    프로시저가 생성되었습니다.
    SQL> exec window_plsql
    PL/SQL 처리가 정상적으로 완료되었습니다.
    SQL> select * from rank_emp;
    DEPTNO ENAME SAL RK
    10 KING 5000 1
    10 CLARK 2450 2
    10 MILLER 1300 3
    20 SCOTT 3000 1
    20 FORD 3000 1
    20 JONES 2975 3
    20 ADAMS 1100 4
    20 SMITH 800 5
    30 BLAKE 2850 1
    30 ALLEN 1600 2
    30 TURNER 1500 3
    DEPTNO ENAME SAL RK
    30 WARD 1250 4
    30 MARTIN 1250 5
    30 JAMES 950 6
    14 개의 행이 선택되었습니다.

    That's correct
    The differences between Standard and Enterprise Edition are listed here:
    http://www.oracle.com/technology/products/oracle8i/pdf/8i_fam.pdf

  • Function in oracle to find number of occurances of a character in a string

    hi,
    is there any function in oracle to find the number of ocurrances of a character in a string ?
    or is there any simple way of doing the same, rather than writting many lines of code as my program is already very complex.
    Maria

    Hi Maria,
    I don't know of such a function in Oracle, but maybe you could use this:
    length(search_string) - length(replace(search_string, character_to_be_found))
    For example: select length('Hello') - length ( replace('Hello', 'l')) from dual;
    Hope this is what you're looking for
    Danny

  • T-SQL functions in ORACLE

    Use T-SQL functions in ORACLE too, so you can write one script version that works in SYBASE, SQLSERVER and ORACLE when need to use the following functions:
    ceiling, charindex, dateadd, datediff, datename, datepart, day, db_id, db_name, getdate, host_id, host_name, left, len, month, replicate, right, space, str, str_replace, stuff, substring, suser_id, suser_name, user_id, user_name and year.
    The file [comp_tsql_ORA_schema.txt|http://forums.databasejournal.com/attachment.php?attachmentid=564&d=1258547015] creates the tablespace and schema to put the objects, and the file [comp_tsql_ORA.txt|http://forums.databasejournal.com/attachment.php?attachmentid=569&d=1259256898] creates the functions into the new schema. They will be avaliable for any schema of the oracle instance.
    Hope this help!
    Any suggestion please contact.
    aklein2003
    Edited by: user1958693 on 26/11/2009 10:16

    jgarry wrote:
    J2EE beta released around 1999. Religious programming wars far preceded that. Here's but [one example|http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/1c50bc13e9302f00/34bb8f3ac77e2388?q=programming+language+religion#34bb8f3ac77e2388] from a quick google. I'm no longer convinced that elegance is a desirable trait for a language. So call me a heretic.
    Ever tried XLISP? :-)
    It's different. Back then it was simply the language itself. And it was not really a religious kind of battle, but more a mine-is-bigger-and-better-than-yours one.
    With Java, it is all about The Acrhitecture and the blessed language of Java. ;-)
    I wouldn't so much blame J2EE believers for that. I think there is a fundamental complexity to web type paradigms that hasn't been described in a precise and encompassing enough manner to enable correct project planning.The basic problem is that the database is treated as a persistent storage layer only. A bit bucket. And that is exactly what a database is not.
    But as it is used that, loads of database features now need to be duplicated in the application layer. Which is done. Very poorly.
    Heck, I've even been told that J2EE's 3-tier architecture is not client server. Such ignorance is really unbelievable. Or is it pure stupidity?Until you just made me look it up, I would have thought that too, I'm sure I saw client/server defined as two-tier in the last century. But I have much more stupid misdefinitions to deal with on a daily basis, simply from the multiplicity of paradigms. I tend to retreat into my shell. Hehehe. Know that feeling... These days I rather run away, or set shields to full power, than try to get in yet another frustrating, fruitless and futile discussion with a Java head about the wonders of the J2EE architecture. Or trying to explain that this "new" architecture is predated with what we used in the 80's on mainframe systems with transaction monitors, block devices (the 80's web browsers) and databases - which software layer for software layer was almost identical to "+The Great Architecture+" of today. (and we did it without buzzwords too) ;-)
    Client-server is a software architecture and in essence describes 3 basic software components. The User Interface (UI), the Application (APP) and the Database (DB). And there are various ways to put these components together in a client-server architecture. The mistake that the Java fanbois make is thinking that client-server means having the client as the UI and APP as a single component (so-called fat client) and then the DB component as the server.
    There are numerous versions of these - including the APP component being a server component (as we now these days more commonly used in over the web).
    My beef with the J2EE "+religion+" always has been that client-server is client-server. The fundamentals stay the same.

Maybe you are looking for

  • Ship to party Address is not Printing-Script

    Hi All, We are facing a problem for a particular PO. When we see the print preview for a particular PO for the first time Ship to party address is not printing .Whereas in the next time if we see the print preview its showing that address.Its because

  • Java Process with High CPU

    I have a java process running on HP-UX with a 1.4.2 JVM. This program is using some third-party code (quartz) to act as a batch scheduler similar to cron. When running in production, the process runs fine for several days and then starts maxing out t

  • On windows 7 machine, safari fails to display web sites

    on windows 7 machine, safari fails to display web sites

  • Landline Cable Help

    I have two landlines running into my house...one of which works and the other--I use for my home office--which does not.  I was told by Verizon tech supervisors that they are aware of the issue, it is on their end and that they can have someone come

  • Disk utility copying hard drive, can I use computer for other tasks

    I had backup my entire hard drive and its taking forever, can I use other apps and continue to work ? Thanks for any help!!