some doubts in the conversion of oracle query

I have to convert the following query in ms access to oracle.

INSERT INTO the Bill (Reffacture, InvoiceDesc)
Select a_Invoices! [Ref provider] & "-" & Trim (a_Invoices! [invoice No.]) & "Q" & DatePart ("q", [invDate]) & "-" & DatePart("yyyy",[invDate]) & "SB" as Reffacture.
Trim (a_Invoice_Desc! [Invoice line Description]) AS a Expr4
Of a_Invoices a_Invoice_Desc INNER JOIN
WE (a_Invoices. [Ref provider] is a_Invoice_Desc. [Ref provider])
AND (a_Invoices. [Invoice No.] is a_Invoice_Desc. [Invoice No.)]
WHERE (((a_Invoices. [<>ACK GL account]) »--- »)) ;

for the quarter, I tried with select to_char (to_date ("PRVBTOT", "dd/mm/yy '"), 'Q') as quarterdate of "a_Invoices" - it worked, but how to combine all the

Hello

882431 wrote:
Thanks for the input... I have another doubt based on the date

I have a date stored in a field of type varchar, n'm copy in the date field

For example: ' 18/4/2011 0:0:0.0' varchar field is, I tried with "' 2011/4/18 as yyyy/mm/dd ', I can add hh: mm: for the moment (I wasn't looking this), but there is one.0, can someone please tell me how shud convert it..." Sorry if asking a basic question, I already searched but to no avail.

DATEs do not include fractions of a second. If you don't mind losing fractions of a second, you can simply remove them before pass the string to TO_DATE, like this

TO_DATE ( REGEXP_REPLACE ( varchar2_column
                , '\.[0-9]*$'
                )
     , 'YYYY/MM/DD HH24:MI:SS'
     )

REGEXP_REPLACE will remove the decimal point and any numbers after him. If the string does not contain a decimial, it is correct: REGEXP_REPLACE returns the immutable string in this case.

If the fraction of a second is important, use a TIMESTAMP instead of a DATE column (and use the TO_TIMESTAMP instead of TO_DATE function).

Tags: Database

Similar Questions

  • Question the use of Oracle query Variables

    Hello

    I am new to Oracle, I tried to extract the data from the Oracle database by using the following query which includes 1 variable SYSDATE_UTS, but when I try to execute the query I get an error. Please let me know what I am doing wrong and how I can fix.

    Error message
    -----
    ORA-06550: line 4, column 1:
    PLS-00428: an INTO clause in this SELECT statement
    -----

    Oracle query

    DECLARE SYSDATE_UTS NUMBER: = (sysdate-to_date('19700101','yyyymmdd')) * 86400;
    BEGIN

    SELECT
    INCIDENT_NUMBER,
    TO_DATE (to_char ((1/86400 * REPORTED_DATE) + to_date ('19700101', 'YYYYMMDD'), "jj/mm/aaaa hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as REPORTED_DATE_TIME,
    GROUP_TRANSFERS
    LAST_MODIFIED_BY
    , to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * LAST_MODIFIED_DATE, "mm/dd/yyyy hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as LAST_MODIFIED_DATE
    , (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) age
    CASE
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 0 AND 1, THEN ' 0 - 1 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 2 AND 4 and THEN 2-4 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 5 AND 9, THEN 5-9 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 10 AND 19, THEN 10-19 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) > 20 THEN ' Days 20 + ".
    ANOTHER "UNKNOWN".
    END AS AGE_GROUP
    OF IncidentDataBase
    and the STATE not in (4,5,6)
    and rownum < 10;
    END;

    If you run this query in sql * plus you can declare a sql * more variable, assign a numeric value according to 'now' and use in your application, i.e.

    SQL > variable NUMBER of SYSDATE_UTS;
    SQL > exec SYSDATE_UTS: = (sysdate-to_date('19700101','yyyymmdd')) * 86400;

    You would then call your request, referring to sql * more variable with a colon as SYSDATE_UTS prior to it (i.e.: SYSDATE_UTS)

    SELECT
    INCIDENT_NUMBER,
    TO_DATE (to_char ((1/86400 * REPORTED_DATE) + to_date ('19700101', 'YYYYMMDD'), "jj/mm/aaaa hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as REPORTED_DATE_TIME,
    GROUP_TRANSFERS
    LAST_MODIFIED_BY
    , to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 * LAST_MODIFIED_DATE, "mm/dd/yyyy hh24:mi:ss"), 'hh24:mi:ss dd/mm/yyyy') as LAST_MODIFIED_DATE
    , (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) age
    CASE
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 0 AND 1, THEN ' 0 - 1 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 2 AND 4 and THEN 2-4 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 5 AND 9, THEN 5-9 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) BETWEEN 10 AND 19, THEN 10-19 days
    WHEN (to_date (to_char (to_date ('01011970 ', 'ddmmyyyy') + 1/24/60/60 *: SYSDATE_UTS, ' mm/dd/yyyy'), ' mm/dd/yyyy'))-(to_date (to_char (+ to_date('19700101','yyyymmdd') + 1/86400 * REPORTED_DATE, ' mm/dd/yyyy'), ' mm/dd/yyyy')) > 20 THEN ' Days 20 + ".
    ANOTHER "UNKNOWN".
    END AS AGE_GROUP
    OF IncidentDataBase
    and the STATE not in (4,5,6)
    and rownum<>

    Table stores IncidentDataBase the "dates" in the number of seconds since the epoch unix?

  • I need some opinions on the conversion of doc and xls to pdf and jpg

    Hi all

    I'm working on a Java project (so all MS api or .net can not used) where we need to convert MS Office 2003 (first doc but also XLL if possible) files to pdf and jpg. Would be nice to convert txt as well as to fix the indexing research.

    Do you have previous experience in the conversion of doc (word files) to PDF?
    Searching the Internet I find a lot of links to this Web site dancrintea.ro/doc-to-pdf/, which apparently has a solution for all doc, xls, ppt.

    While waiting for a response on this solution, it would be useful that you can share your experience:
    -did you do in a Java project
    -What did you use and how it works

    Never the less important are the costs of the solution because we have to distribute my project to more customers.
    so I need something with a balance between costs and results - I want to say can not invest in an expensive solution for doc/xls to pdf format.

    Thank you for your sharing information.

    The answer to that is:
    It's hard. Very hard. There are few native Java solutions, your options are:

    (1) convince you the basic user who. Sucks DOC and RTF's The Way.
    2) Open Office script (or office). Open Office has an API that can do what you want
    (3) look at the alternative outside and everything, but as a general rule, they are reading rather than rendered data.

    Cool the OO API has even an example of file conversion.

  • Some doubts about the topology, interfaces and security modules

    Hello

    Below, some questions about the ODI:


    1. to use an LKM ODI always ask to use two different DATASERVERS (one for the SOURCE) and another to the TARGET?

    2. what would be the best way to create a new IKM with GROUP BY clauses?

    3. What is the required minimum PROFILE for developers users could import projects created in other ODI environments?

    4. If a particular WORK_REP is lost, it is possible that retrieve projects from version control information stored in the MASTER_REP?

    1.) Yes. LKM always loads data from one root to another.
    More than once I saw that even if there is a single physical server, several servers are configured in the topology Manager. This would lead to the use of a LKM because ODI consider 2 different servers.
    If the physical server is set only once, LKM won't be necessary.

    2.) IKM automatically adds a GROUP BY clause if it detects an aggregation function in the Interface implementation.

    3.) try to use the profile of the creator of NG.

    4.) this is not an easy task. But all the versioned objects are compressed and stored in a BLOB field in the master repository.
    You will need to know the names and versions you need to recover.
    SNP_VERSION and SNP_DATA have this information. Retrieves the field BLOB SNP_DATA and unpack using a zip utility. This will give you the XML property of the object that was transferred.
    Now, you can import this xml file and retrieve the object.

    You will need to loop through all the records in order of I_DATA, then extract to .xml file, and then import them to build the work rep.

  • Need to improve the performance of oracle query

    Hello
    Currently I wrote the request to get the maximun of XYZ company like this salary

    Select the salary of)
    Select the salary of the employee
    where the company = "XYZ".
    salary desc order)
    where rownum < 2;

    I thought to replace the same with the following query

    Select max (salary)
    the employee
    where the company = "XYZ";

    That one will be faster? can you provide some statistical data. It will be good if you share an oracle for this documentation.

    Thank you
    Khaldi

    Well, that's your requests, your data contained in your database, on your hardware... Anything that can have an impact. So who better to check if there is no difference in performance than yourself?

    Enable SQL tracing, run the statements, then analyze trace (with the help of tkprof or similar) files and look at the differences.

  • Some doubts about the navigation in unifying

    Hi all

    I had a few questions about unifying navigation.

    Is it possible to move the admin mode user mode access level?

    I mean, if a particular feature as Manager of the shell I can only access from admin mode is it possible to provide access even in user mode?

    If so, how?

    My 2nd question of doubt is, currently, we can access company BPs level "Journal of society" or "Resource Manager" under shell 'Company Workspace'.

    Is it possible to move the "journal of the society" or "Resource Manager" in the folder? If yes how?

    I tried in "navigation user mode" to move the company BPs level at shell of the House, but I can't do it.

    To answer your questions:

    (1) User-Mode browser can have the user feature included. You cannot change the view mode Admin or move functions admin for user mode.

    (2) you cannot move these on the Home tab.

  • rules of the clues in the text and oracle query using matches

    Dear all,

    I would like to ask questions about the function of rules and matches the oracle text.
    I followed a lead in the oracle text application developer guide.
    I have a table of rules like this:

    1 oracle
    2 larry or ellison
    3 oracle and text
    market share 4

    Then I create an index in this table. This is necessary for the matches function call. Here's the syntax:

    create index queryx on queries (query_string)
    indexType is ctxsys.ctxrule;

    Then, I noticed that the result on DR$ QUERYX$ I table as follows:

    0 2 2 1 LARRY (BLOB)
    MARKET 0 4 4 1 (BLOB) {MARKET} {ACTION}
    0 1 1 1 ORACLE (BLOB)
    0 3 3 1 ORACLE (BLOB) {TEXT}
    0 2 2 1 ELLISON (BLOB)

    What I want to ask is why do the words 'share' and 'text' appear in the DR table $ QUERYX$?

    When we use the function of the matches, it can search on the result of the index and therefore he walls can't find the word 'action '. Thus, when for example I ask like this:

    Select query_id queries where matches (query_string, "it only to share ten percent of all products sold") > 0

    It will give 0 results since no words in "it only to share ten percent of all products sold ' was in the index table. But in fact it could possibly be classified as category 4 rules which is "market share".

    I tried this in a large data set and get the same result.
    Here are my rules generated from my collection of document:

    1 {REQUIREMENTS of} & {ELICITATION}
    1 {REQUIREMENTS of} ~ {ELICITATION} & {ACTOR}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
    1 {REQUIREMENTS OF} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {PDF}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {PDF} & {SET}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {PDF} ~ {SET} & {UNNECESSARY}
    1 {REQUIREMENTS of} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {PDF} ~ {SET} ~ {UNNECESSARY} & {MISUSE}
    1 {INTERPRETATION} ~ {REQUIREMENTS}
    2 {DESIGN of} & {PERFORMANCE}
    2 {DESIGN of} ~ {REPRESENTATION} & {MAY} & {FOUNDATIO} & {OCTOBER}
    2 {DESIGN of} ~ {REPRESENTATION} & {MAY} & {FOUNDATIO} ~ {OCTOBER} & {PROCEDURAL}
    2 {DESIGN of} ~ {REPRESENTATION} & {MAY} & {FOUNDATIO} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
    2 {DESIGN of} ~ {REPRESENTATION} & {MAY} & {FOUNDATIO} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} & {ENTER}
    2 {DESIGN of} ~ {REPRESENTATION} & {MAY} & {FOUNDATIO} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} ~ {ENTER} & {NUMBER} & {LAYER}
    2 {DESIGN OF} ~ {REPRESENTATION} ~ {CAN}
    3 {PM} & {TEST} & {ATTRIBUTION}

    And this is the result of table with a ctxrule index:

    (only the column token_text shown)
    PM
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    INTERPRETATION

    so when I try to file a document with the word in there way, it should produce category 1 (based on rules), but since there is no word 'plan' in the tabel index, matches will return 0 means that the document is classifiedto not any category. I don't understand why this is happening. Everyone knows about it? I'd appreciate any help.
    Thank you very much.

    Share market means that the market immediately followed word on the part of the word, so if you don't have the word share then is not a match. If she had walked or hand, then he would be looking for just one part.

  • Doubts of the OFA

    Hi all

    I have some doubts about the OFA.
    (1) for the use of EO to perform an update in the database will be oracle use the api for the table of seedlings or usage, the hard update. If it is a hard update is a provision mentioning the api to be used?
    (2) why do we need to transfer the OA pages in ascii format only... While the xml corresponding to the VO pages can be transferred in binary format

    Concerning
    Srikanth Enuguru

    Hello

    See http://oracle.anilpassi.com/plsql-entity-based-oa-framework-oaplsqlentityimpl.html for PL/SQL entity objects and JDeveloper and TL EO JDeveloper guide guide to the topic "Entity for translatable objects Tables (TL)"

    The two EO for PL/SQL and _TL tables gave in CHAPTER 5: ŒUVRE of FEATURES SERVER-SIDE implementation.

    Hope this will help.

    Kind regards
    Out Sharma

  • Problems with the date in the procedure on Oracle 11 g

    Hi gurus,

    I have some problems with the date under Oracle 11 g format.

    Let me explain the situation:

    When I start such a request
    Select to_number (to_char (to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'))
    of sys.dual

    I had as a result 2009 under the number.

    When I do the same thing in a procedure of a package like this

    my_year: = to_number (to_char (to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'));

    the my_year variable contains the value 9 instead of 2009.

    Can someone explain to me what goes wrong?

    I just tested with the evolution of the variable nls_date_format of environment for the session and the database is complete without success.

    Kind regards
    Björn

    Yes, it has everything to do with your environment settings.

    SQL> set serveroutput on;
    SQL>
    SQL> declare
      2    my_date date;
      3    my_zeitstempel varchar2(32767);
      4    my_tageswechsel float;
      5  begin
      6    my_zeitstempel := '01.03.1998 07:00';
      7    my_tageswechsel := .25;
      8    my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24;
      9    dbms_output.put_line( my_date);
     10  end;
     11  /
    01-MAR-98
    
    PL/SQL procedure successfully completed.
    
    SQL> alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss'
      2  /
    
    Session altered.
    
    SQL> declare
      2    my_date date;
      3    my_zeitstempel varchar2(32767);
      4    my_tageswechsel float;
      5  begin
      6    my_zeitstempel := '01.03.1998 07:00';
      7    my_tageswechsel := .25;
      8    my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24;
      9    dbms_output.put_line( my_date);
     10  end;
     11  /
    01.03.1998 07:00:00
    
    PL/SQL procedure successfully completed.
    
  • Some doubts about Oracle DBA...

    Respected, professionals

    I am new to Oracle RAC DBA. Knew just CARS and have some doubts, associated with Oracle RAC databases and a few other s/n basic questions.

    (1) client connected to one of the rac node in the database of node three cars by scan listener. The node to which it is connected was dead. My question is - is that its connection automatically goes to the next available node

    without using TAF? Or he needs to connect again? I have to configure TAF as in 10g RAC? or the configuration of TAF to perform a SCAN is completely misconceptual?

    (2) a database connection request will be going to one of the node system of three-node rac (shooting technology in return for load balancing). How can I connect remotely to PuTTY tru particular node?

    Do I need to enter particular node (virtual host as IP) TNS in tnsnames.ora in my system oracle client?

    (3) we have a listener to scan with three IP for RAC 3-node addresses. If you add a new node, I need to create another listener with a single IP address scan? or do I need to add another IP existing scan listener? What should I do to connect again with existing scan listener node?

    My sincere apologies over the three questions are completely misleading or false.

    (4) incremental 11 g rman are speed, compared with 10 g rman. WHY?

    (5) how connect us using sqlplus. (No high level architectural decoration). I mean what happens when connect us to the database using SQL * more (SQLPLUS scott/tiger)?

    My sincere apologies if any inconvenience caused... I know this isn't a chat BOX... Please forgive me If my way of questioning is insulting and rude.

    Thank you

    Hello

    (1) client connected to one of the rac node in the database of node three cars by scan listener. The node to which it is connected was dead. My question is - is that its connection automatically goes to the next available node

    without using TAF? Or he needs to connect again? I have to configure TAF as in 10g RAC? or the configuration of TAF to perform a SCAN is completely misconceptual?

    If there is no TAF not configured you will have to reconnect.

    TAF can be configured on the side client (tnsnames.ora) or side (srvctl) server.

    (2) a database connection request will be going to one of the node system of three-node rac (shooting technology in return for load balancing). How can I connect remotely to PuTTY tru particular node?

    Do I need to enter particular node (virtual host as IP) TNS in tnsnames.ora in my system oracle client?

    You can connect to one of the nodes via PuTTY using the public IP node.

    To connect to a particular instance through SQLPLU, then you must specify the IP node-vip in tnsnames.ora.

    (3) we have a listener to scan with three IP for RAC 3-node addresses. If you add a new node, I need to create another listener with a single IP address scan? or do I need to add another IP existing scan listener? What should I do to connect again with existing scan listener node?

    You don't need to create another auditor SCAN.

    For your new node, you must assign the listener SCAN and LOCAL_LISTENER REMOTE_LISTENER must be defined on node-VIP.

    Ivica

    Post edited by: Ivica Arsov

  • 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)

  • some omitted spaces after the conversion of x 5

    I recently converted my 5 x aid project to version 7. After the conversion, some, not all, display of words merged compiled help, but does appear like that in Design view or when previewing in the topic. Normally, it happens after a word that is bold, or a hyperlink. When I look at the html code, it seems to be formatted correctly, in the following example, only the words Option display in bold management:

    Design/Preview menu screen - management Option
    HTML - < span style = "' make-weight: bold;" > </span > management option menu "
    Compiled help - Option Managementmenu

    The only way to add space is to insert a space before the/span tag. Of course, in the case of hyperlinks, it extends the hyperlink in space. It occurs sporadically throughout the project, and it will take me forever to try to capture all these occurrences. Anyone have any ideas on how to solve this problem? It also seems to be the case sometimes when I copy and paste from Word.

    Thank you very much for your help - Janet

    Yes, I always had the same results after you apply two patches. However, I installed version 8, and who took care of the problem. Thanks for the idea!

  • Where to download the conversion oracle discoverer metadata Wizard.

    I want to migrate to oracle discovere reports of OBIEE, so where I can download metadata conversion wizard.


    Concerning
    F

    Hi F
    The conversion of metadata Disocverer Wizard comes with OBIEE. You must download and install OBIEE so you can use it.

    Have a look here for more information: http://www.oracle.com/technology/products/bi/discoverer-migration/index.html

    Best wishes
    Michale

  • PIO, LIO and the cost of an Oracle query

    Hi guys,.

    Here are the definitions I've read to

    [http://www.orafaq.com/wiki | http://www.orafaq.com/wiki]

    PIO or physical i/o refers to the reading and writing from/to the disk.
    LIO or e/s logic refers to the reading and writing to/from memory (for example, / from the SGA buffer Cache)

    Basically, what I've read, the COST is measured in PIOs.

    If we had a query that returns to 20 lines, and:

    2 rows of 20 found in datablock X in the buffer cache
    4 lines of 20 found in datablock Y in the buffer cache

    2 rows of 20 found in datablock has the disk
    2 rows of 20 have been found in datablock B on disk
    2 rows of 20 found in datablock C disk
    2 rows of 20 have been found in datablock D disk
    6 rows of 20 found in datablock E disk

    then it would be correct to say that LIO is 2 and PIO is 5?

    And it looks like the cost of this operation was 5. Is this correct?

    Thank you

    The cost formula that you are citing the book is used to calculate the cost of access to a single table to a path indexed using a b-tree index.

    From the perspective of the optimizer, the cost of a more complex query consists of three components:
    A component of the CPU
    A component based on the number of unique block reads predicted
    A component based on the number of multiple blocks bed predicted.

    In the case of 'single table by index b-tree'-, we can assume that the CPU component is tiny (and it will be nil in any case in 8i or 9i if you have not enabled the CPU cost); and there will be no close readings. So for this path, the only component is the one-piece readings, and it's the formula gives number of Wolfgang Breitling.

    Technically, the cost of a query SO time for the query to execute measured in units strange slighltly. In 10g implementation plan makes this explicit by including a TIME column in the table of the plan; and you can see that this time column is always COST * sreadtim / 1000, where sreadtim is the time for a single block of reading as recorded, or a derivative, sys.aux_stats$.

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking.

  • Some dba and the associated operating system confusion

    Hi all

    I have some doubts related to the database and from the perspective of the OS. Could pelase let someone delete my those doubts and clarify below questions:

    Qus1: Can we have two with the same default port number 1521 listener.ora file?

    Qus2: Why create two groups 'dba' and 'oinstall' during the installation of oracle database?

    Qus3: If my database is using newspaper archive and in case the archiver process is killed and then redo will be archived or not otherwise what will happen?

    Qus4: If I have the catalogue for RMAN metadata database. And in the case of catalogue database broke down. I will be able to use RMAN backupsets to restore the database?

    Qus5: What is needed to run the script "some_path/root.sh" during the installation of the oracle at the last step database?

    Qus6: How can we know what are the database running in my server level operating system itself means if no database is down or crashed, can we get to know on these data base level operating system itself? If Yes, then please specify the command?

    Qus7: How can configure us UDP protocol for my interlocutor?

    Qus: If I update a table and query update happens. Between the two OS gets stop then when he is back my transaction will be rolledback. Please let me know how TI happenes means is there any process to do this or something else?

    Please clarify the issues above.

    Kind regards

    Michel

    fb767351-A660-4b18-9a9f-73bc141f6a0c wrote:

    Hi all

    I have some doubts related to the database and from the perspective of the OS. Could pelase let someone delete my those doubts and clarify below questions:

    Qus1: Can we have two with the same default port number 1521 listener.ora file?

    Qus2: Why create two groups 'dba' and 'oinstall' during the installation of oracle database?

    Qus3: If my database is using newspaper archive and in case the archiver process is killed and then redo will be archived or not otherwise what will happen?

    Qus4: If I have the catalogue for RMAN metadata database. And in the case of catalogue database broke down. I will be able to use RMAN backupsets to restore the database?

    Qus5: What is needed to run the script "some_path/root.sh" during the installation of the oracle at the last step database?

    Qus6: How can we know what are the database running in my server level operating system itself means if no database is down or crashed, can we get to know on these data base level operating system itself? If Yes, then please specify the command?

    Qus7: How can configure us UDP protocol for my interlocutor?

    Qus: If I update a table and query update happens. Between the two OS gets stop then when he is back my transaction will be rolledback. Please let me know how TI happenes means is there any process to do this or something else?

    Please clarify the issues above.

    Kind regards

    Michel

    Michel, you must work on your technique of learning. In the Oracle environment, "If in doubt - try it". This applies to three of your questions:

    1. try to start two listeners, listening on the port and the same address. Then, try different addresses.

    3 kill the archiver process. You'll see the result soon enough.

    4. yet once, test it.

    You have also some questions of documentation:

    2. There is a chapter on this in the installation guide, but I guess that's a little vague on the 'why '. You need to think about the situation where you have multiple databases on a machine with different databases, and you should restrict DBA access to their own DB only.

    7. the Net Services Administrator's guide describes the configuration of the supported protocols.

    8. the Guide of Concepts a chapter describing the background process that will be answered.

    That leaves two:

    5. I don't understand what you're asking.

    6. If I understand correctly it is y no definitive answer on Unix, if you can deduce by looking at files such as oratab or the contents of your directories of dbs. Under Windows, look at the Windows services

Maybe you are looking for