Datepart (sybase) for oracle conversion

Hello

I have problem conversion "datepart' from sybase to oracle.
Select datepart (dw, getdate ()).
Could you please help me with this.
Thank you!

You can use EXTRACT or TO_CHAR, a few examples below:

SQL> select extract(year from sysdate), extract(month from sysdate), extract(day from sysdate)
  2  from dual
  3  /

EXTRACT(YEARFROMSYSDATE) EXTRACT(MONTHFROMSYSDATE) EXTRACT(DAYFROMSYSDATE)
------------------------ ------------------------- -----------------------
                    2009                         9                       9

SQL> select to_char(sysdate, 'yyyy')
  2  from dual
  3  /

TO_C
----
2009

SQL> select to_char(sysdate, 'dw')
  2  from dual
  3  /

TO
--
42

With greetings
Krystian Zieja
[Project Envision | http://www.projectenvision.com]

Tags: Database

Similar Questions

  • Conversion of language or translation is available for oracle istore

    Hello gurus,

    I deal with several languages in iStore.There all the messages that appear in the iStore site are the MESSAGES of FND. A language that I use almost 100 DNF MESSAGES like this, I will use more than 5 languages for the same site. Its really painful to create the FND MESSAGES for each language. Whats my question here is
    "Any conversion of language or translation is available for oracle istore for this? Could someone help me on this please.

    Please suggest me to go through this difficulty. Its very high priority.

    Thank you
    Vinoth

    I go through your message and I work according to her but before that I need to confirm if this concerns a position of FND_MESSAGE or translation OFA language translation.

    OPS.

    Customization of translation in Oracle E-Business Suite - R11 [ID 372952.1]
    OA Framework customization and extensibility Guide: Version 5.7 + [236618.1 ID]

    For FND_MESSAGES, you can do it manually once in any proceeding and move it to another instance using FNDLOAD and afmdmsg.lct

    Advice on FNDLOAD [ID 735338.1]
    FNDLOAD: Impossible to crush message pre-existing [785081.1 ID]

    Thank you
    Hussein

  • How transform the trailing spaces & AREAS of data from sybase to oracle

    Helllo,

    We are the migration of data from sybase to Oracle using goldengate... Source Sybase with SPACES (single / Multiple) as data to CHAR/VARCHAR that will be migrated to the VARCHAR2 data type in Oracle. I'm having trouble trying to implement under two conditions to transform the data

    1) Remove SPACES during the IPL for CHAR/VARCHAR

    example: Data Source: "TRAILING SPACE.

    Given target expected - remove the spaces of trailinging: "TRAILING SPACE.

    2) If the data with SPACES like a value (single or Multiple) will be loaded as a single SPACE in Oracle.

    example : Source data                                                  :  "          "

    Expected data from target - unique space:

    Map: dbo. Target TEST_TABLE DEV01. Table_test, COLMAP (USEDEFAULTS, CRE_ID = @IF (@STRRTRIM (CRE_ID) = @NULL AND CRE_ID <>@NULL, ' ', @STRRTRIM (CRE_ID)));

    I tried above mapping in the settings file, but it returns error like below, guidance on the highest implementation requirement will be useful.

    ... RIM (CRE_ID) = @NULL AND CRE_ID...

    ^

    Error in the COLMAP clause. Invalid function or argument.

    Under column mapping is worked :-)

    Map: dbo. Target TEST_TABLE DEV01. TABLE_TEST, COLMAP (USEDEFAULTS, CRE_ID = @IF (@STRLEN (@STRTRIM (CRE_ID)) = 0, ' ', @STRRTRIM (CRE_ID)));

  • Cognos for obiee conversion framework requirements

    Hi all

    I'm working on a request for proposal for a project that includes the conversion of Cognos in OBIEE. Now, I have no knowledge on the functioning of Cognos, but the system "AS IS" a lot of cubes which they build cognos reports. Also, most of their system is transactional and dimensionless.

    I know that for this convert to OBIEE, it may require ETL work and then I can build the RPD file but could you be it someone please let me know if there is any other SETTING that is required before proceeding with the conversion. From a technical point of view, what are the requirements before we can begin to migrate to OBIEE. Can anyone let me know the measures of high level that needs to be done for this type conversion. Will be very grateful to you all.

    Thank you
    Ronny

    No, OBIEE can point directly to the Cognos Cubes. Yes, you will need to move forward with the ETL process.

    In addition, according to the source, you have your org can go for Oracle Business Intelligence Applications...
    http://www.Oracle.com/us/solutions/ENT-performance-bi/BI-applications-066544.html
    It's something called (Build Vs buy i.e. OBIEE vs OBI Apps). A business intelligence solution pre-built with prebuit ETL, DW, OBIEE. You can check out the link and learn more on this...

  • Convert or map Typedonnees decimal Transact-SQL for Oracle Number data type?

    MSSQL 2005
    Oracle 10.2 g

    In a MSSQL table, I have a column with the data type set on (decimal (1.0), null) with the values of line-1. (695 lines in total)

    In the Oracle table, the proposed mapped column is a number data type. When I import data, I received 695 errors with the message "invalid value for the field. How to properly convert or map Decimal (MSSQL) Transact-SQL for Oracle Number data type for a negative value?

    Thank you.

    How do you load data into Oracle? What tool or programming language you are using? Can you post something cause what you stated in your post should work, but there may be some ODBC, or other type of conversion factors to be taken into account.

     > create table t1 (field1  number(1,0));
    
    Table created.
    
     > insert into t1 values (-1);
    
    1 row created.
    
    UT1 > select * from t1;
    
        FIELD1
    ----------
            -1
    

    HTH - Mark D Powell.

  • GROUP BY clause diff in Sybase and Oracle

    Hello

    I am migrating from Sybase to Oracle code and came across a strange problem which is widely known to others :)
    In Sybase, you can use columns or calculations in SELECTION expressions that do not appear
    in the GROUP BY clause from the query. As

    SELECT order.custid, customer.name, MAX (payments)
    -> IN the order, customer
    -> WHERE order.custid = customer.custid
    -> GROUP BY order.custid;
    works fine but for SQL, we must add customer.name to the customer of the GROUP BY clause.

    In the same spirit, here is my SQL query

    INSERT INTO GTT_CTRT_recalc_proc
    (id_fin_rec,
    id_imnt,
    id_instr_opn,
    dt_instr_opn,
    dt_opn,
    dt_cls_loanet,
    dt_prcss,
    am_invst)
    SELECT t1.id_fin_rec,
    T1.id_imnt,
    T1.id_instr_opn,
    T1.dt_instr_opn,
    T1.dt_opn,
    NVL (t1.dt_cls_loanet, l_dt_to),
    T1.dt_prcss,
    Sum (T2.am_invst) + (0.123 * (1 - abs (sign (0 - SUM (t2.am_invst)))))
    OF GTT_CTRT_TEMP_recalc_process t1, GTT_CTRT_TEMP_recalc_process t2
    WHERE t2.id < = t1.id
    AND t2.id_imnt = t1.id_imnt
    AND t2.id_instr_opn = t1.id_instr_opn
    AND t2.dt_instr_opn = t1.dt_instr_opn
    T1.id_imnt GROUP,
    T1.id_instr_opn,
    T1.dt_instr_opn,
    T1.dt_opn,
    T1.dt_cls_loanet,
    T1.dt_prcss;

    Has no t1.id_fin_rec in GROUP BY it fails in SQL.

    I know that if I add this column in GROUP BY, it will work fine, but told me to keep the feature because it is as the result before and after the addition of the column is different, of course.

    If please guide me what we can do in this situation and should work around that?

    Thank you
    Aashish

    Use the PARTITION MORE rtaher than GROUP BY

    INSERT INTO GTT_CTRT_recalc_proc
                (id_fin_rec, id_imnt, id_instr_opn, dt_instr_opn, dt_opn, dt_cls_loanet, dt_prcss, am_invst)
    SELECT t1.id_fin_rec, t1.id_imnt, t1.id_instr_opn, t1.dt_instr_opn, t1.dt_opn, NVL(t1.dt_cls_loanet, l_dt_to),
           t1.dt_prcss,
             SUM(t2.am_invst) OVER(PARTITION BY t1.id_imnt, t1.id_instr_opn, t1.dt_instr_opn, t1.dt_opn, t1.dt_cls_loanet, t1.dt_prcss)
           + (0.123 * (1 - ABS(SIGN(
                          0 - SUM(t2.am_invst) OVER(PARTITION BY t1.id_imnt, t1.id_instr_opn, t1.dt_instr_opn, t1.dt_opn, t1.dt_cls_loanet, t1.dt_prcss)))))
      FROM GTT_CTRT_TEMP_recalc_process t1, GTT_CTRT_TEMP_recalc_process t2
     WHERE t2.ID <= t1.ID
       AND t2.id_imnt = t1.id_imnt
       AND t2.id_instr_opn = t1.id_instr_opn
       AND t2.dt_instr_opn = t1.dt_instr_opn
    
  • Hello from Firefox can be used for group conversations?

    Firefox is heavily used at my company and I would like to add Firefox Hello for seminars and online training for our employees in the field. Is this possible? Multiple users in a conversation in Firefox Hello?

    Hi Pasquell31, Hello to firefox at the moment cannot be used for a conversation between two people.
    multi-party videoconferencing is on the roadmap to long term, but it will take a lot of Engineering (Hello firefox is based on the webrtc standard which is a peer-to-peer protocol between two machines-multipart calls can be a rather difficult thing to understand on this basis)

  • Help. Temp for voltage conversion.

    I'm currently trying to find a best way to calibrate the thermocouple read outs. I would like to be able to enter any temp for all TC and labView output the corresponding voltage. So I was hoping someone would have a way to make this temp for voltage conversion. Example if I want to do 250 C I need 10.153 mV how labView could be made to calculate this.

    This will allow you to enter the temperature you want for the simulation and corresponding voltage.

  • Electrodes for Oracle spatial 11.2.0.4.0

    What patches are needed for Oracle spatial 11.2.0.4.0?

    I don't know what kind of response you expect an open question...

    Simply apply the last power supply and go from there.

    Bryan

  • Is it possible to install oracle fail-safe-kind-of (active-passive) SAN replication for oracle?

    Dear Experts,

    Is it possible to configure replication of SAN (active-passive) integrated security for oracle for oracle?

    To get the RTO < 60 seconds

    • If the primary host fails, the remote site should have the option to start the oracle database.
    • Sites are geographically remote.

    SAN storage replication, can it be used in my scenario?

    • I have no option to implement oracle Data Guard as its very expensive.

    Is that what someone achieved something similar with SAN storage replication?

    • I have oracle SE.
    • It is obvious that the all-flash backup can be quick.

    What should be the strategy to have DR site get a few seconds, if the primary site failed for some reason any

    • Daily incremental backup with RMAN. And archive backup runs for every 1 minutes
    • To have the site of DR upward and running within 60 seconds, it still requires too much time to restore the database on remote site and have archive APPLIED setpoint
    • What could be the solution with san replication? RTO is 60 seconds

    Thanks and greetings

    SAN storage replication, can it be used in my scenario?

    I have no option to implement oracle Data Guard as its very expensive.

    --> If you want to use the data that it is free of CHARGE, additional license is not required for normal data guard

    --> additional license is only for the ADG

    Is that what someone achieved something similar with SAN storage replication?

    I have oracle SE.

    It is obvious that the all-flash backup can be quick.

    --> Here, I understand that if oraclle EA is going to be expensive

    --> Again, you can use manual standby

    --> What you are looking for SAN replication, you will need to check with the storage vendor

    --> If your intention is to check with oracle storage, then this may be the correct discussion room

    What should be the strategy to have DR site get a few seconds, if the primary site failed for some reason any

    Daily incremental backup with RMAN. And archive backup runs for every 1 minutes

    To have the site of DR upward and running within 60 seconds, it still requires too much time to restore the database on remote site and have archive APPLIED setpoint

    What could be the solution with san replication? RTO is 60 seconds

    --> If your intention is to check with oracle storage, then this may be the correct discussion room

    Check in this

    https://community.Oracle.com/community/Server_%26_storage_systems/storage

  • Code review for Oracle 11 g Administration Dataguard

    Can all give the code to review for exams for Oracle 11 g Dataguard Administration code.

    Thanks in advance.

    There is no review of Data Guard 11g.  The review of Data Guard Administration 12 c is 1Z0-066:

    Exam1Z0-066

  • A design of query for the conversion of time difference in days, hours, Minutes

    Hi all

    A design of query for the conversion of time difference of time in number of days remaining remaining hours minutes and rest in seconds. Made this one till now. Please suggest for all modifications, until now, it seems to work very well, kindly highlight for any anomaly.

    WITH DATA (startDAte, EndDate, Datediff) AS (SELECT to_date ('2015-10-01 10:00:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-20-01 03:00:49 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-10-01 10:00','yyyy-dd-mm hh24:mi:ss')-to_date('2015-20-01 03:00','yyyy-dd-mm hh24:mi:ss') FROM dual)

    UNION ALL SELECT to_date ('2015-10-01 10:00:39 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-20-01 03:00:40 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-10-01 10:00','yyyy-dd-mm hh24:mi:ss')-to_date('2015-20-01 03:00','yyyy-dd-mm hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 10:30:45 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 11:00:50 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 10:30','yyyy-dd-mm hh24:mi:ss')-to_date ('2015-11-01 11:00 ',' yyyy-mm-dd hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 09:00:50 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 10:00:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 09:00','yyyy-dd-mm hh24:mi:ss')-to_date ('2015-11-01 10:00 ',' yyyy-mm-dd hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 08:30:49 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 09:30:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 08:30','yyyy-dd-mm hh24:mi:ss')-to_date('2015-11-01 09:30','yyyy-dd-mm hh24:mi:ss') FROM dual

    )

    Select

    trunc ((EndDate-StartDate)) days.

    trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24) hours)

    trunc (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60) Minutes,))

    (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60 - trunc (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60)) * 60 seconds))))

    data;

    Thanks for the answers in advance.

    AHA!

    TO_TIMESTAMP expects a string as input, so it first makes an implicit conversion from DATE to a string, in the format of NSL_DATE_FORMAT.

    To convert the TIMESTAMP DATE independently NLS_DATE_FORMAT, use

    CAST ( AS TIMESTAMP)

  • What Linux RHEL (Linux Red Hat Enterprise Server 6.7) compatible for oracle database 11.2.0.4 with grid Infrastructure?

    Compatible Linux RHEL (Linux Red Hat Enterprise Server 6.7) for oracle database 11.2.0.4 with grid Infrastructure.

    Hi all

    We plan to patch Linux Redhat Enterprise Server (6.4 and 6.5) to 6.7.

    I tried Searchin' on support of oracle for the compatibility of the database for Linux patches, but not able to find accurate information.

    can anyone share the ID document or information related to it.

    If OS RHEL 6 update 4 to 6-7 update patch

    (1) is it compatible

    (2) bugs or problems reported

    (3) in addition to the binary link again than the DBA to perform any other

    Thank you

    Hello

    6.7 RHEL is certified for the database 11.2.0.3 or newer. In other words, it is certified for RHEL 6.7 11.2.0.4

    Certification information for the Oracle database on Linux x 86-64 (Doc ID 1304727.1)

    -Jonathan Rolland

  • We are in the streams we want to use the tools of replication of database of 3rd party for Oracle freeware. Pls suggest

    We are in the streams we want to use the tools of replication of database of 3rd party for Oracle freeware. Pls suggest

    Hello

    GoldenGate and shareplex are large databases for heteregenous platforms oracle replication tools.

    Shareplex replicates data between heteregenous platforms for example source on Linux and Windows.Shareplex target come from queues so that when we define it a few tables in the configuration of the source files, it will get automatically reproduced in the target database.

    SharePlex 8.6.2 technical documentation

    Concerning

    Rami

  • Oracle Application Management Pack for Oracle E-Business Suite Guide 12.1.0.4.0?

    Hello fellow pioneers OEM.

    I am trying to locate the Oracle Application Management Pack for Oracle E-Business Suite Guide 12.1.0.4.0


    I have a beautiful SR but still no answer on that of the analyst. Thank you.

    DA

    Currently the latest version of MPA is 12.1.0.3.0

Maybe you are looking for

  • Can't remove my iPod in itunes podcasts

    I download Radio 4 podcasts for my ipod Nano.  The part of the subscription will easily and podcasts download without problems.  But when I want to delete a podcast because I have already heard, it remains on the ipod or downloads again the next time

  • Music stored on iPad

    I'm sure that I understand this, but I must confess that I have not. On my iPad it says I 413 (2.42 GB) songs recorded audio on my iPad Mini. I do not understand why I would have stored songs. I played a lot of songs on the iPad, but they are all res

  • Toshiba Media Controller does not support Flash Player 11?

    My Toshiba media controller plug not launch my apps on internet games and downloads.and I get a message saying that it is because he does not support the latest version of Adobe flash player 11. I got around him for awhile by backdating the system re

  • Recovery of Active directory on a domain controller

    Nice day We operate a windows 2008 R2 server. At one point, the server has begun to restart and later was not log. One of the problems is that we have only created a domian controller and there is no backup. Now we've managed to log on to the compute

  • HP 14-r219TX: 2 user-accessible memory slot?

    2 user-accessible slot means that I can add an extra memory on my laptop? (2 GB ram SDRAM DDR3L;) 1600 MHz MEMORY CLOCK SPEED) is my current memory and I would install this additional memory (if POSSIBLE or COMPATIBLE) 4 GB of RAMSpeed of memory1066