Identify the weekend and the days of the week a date and update the empty column

Hi, I look at previous posts that are similar to my question, but nothing helps.

I have a column called incident_date that is in this format and comes from the Nov_Final table
01-JUL-2009 20.10
04-NOV-2009 17.00
16-DEC-2009 16.00
In Nov_Final, I created a column called weekend

What I want to do is to perform an update, something like this:
Update Nov_Final

SET Weekend=(case when Incident_date ='WEEKEND' THEN 'Y' ELSE 'N' END)
Banner:
Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production."
AMT for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Weekend would be Saturday or Sunday. 
In short I need to find out if the incident_date falls on a weekend and if it does update the weekend column as 'Y' else 'N' if it's not.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

You can use TO_CHAR function with a format mask as "fmDAY" to your needs:

with t_data
as
(
select sysdate + level as col1 from dual connect by level <= 7
)
SELECT
    col1,
    TO_CHAR(col1,'fmDAY') col_day,
    CASE
        WHEN TO_CHAR(col1,'fmDAY') IN ('SATURDAY','SUNDAY')
        THEN 'Y'
        ELSE 'N'
    END AS weekend_ind
FROM
    t_data;

COL1                      COL_DAY                     WEEKEND_IND
------------------------- --------------------------- -----------
08-NOV-11 07:54:12        TUESDAY                     N
09-NOV-11 07:54:12        WEDNESDAY                   N
10-NOV-11 07:54:12        THURSDAY                    N
11-NOV-11 07:54:12        FRIDAY                      N
12-NOV-11 07:54:12        SATURDAY                    Y
13-NOV-11 07:54:12        SUNDAY                      Y
14-NOV-11 07:54:12        MONDAY                      N           

7 rows selected

Tags: Database

Similar Questions

  • Displays the empty columns instead of data

    I grew up a table from data source in the physical layer. I checked the data in the view, and there are data for all columns.
    I need to create a report of this table (only). All the fields, I need to create the report exist in the same table. I didn't need another table to create this report.
    But just for the sake of creating joins, I joined with a fact table in the physical layer and in the same way, at a table of dimension and/or fact in MDB table.
    I created the report and the data is not displayed for columns 4 and 5. It displays empty for these columns.
    Help, please.

    Hello
    try to purge the cache of the administrator and close all cursors to manage the side sessions answers then try to run the report.
    Also check the properties of the columns in the physical layer to see the length defined for the column.

  • Replace the empty column with ZERO values

    Hi experts,

    I'm building a report to display the number of orders per channel / day / hour.

    Since a few days one or several channels may not all orders placed against them in which case my report shows empty values in the report.

    Ideally, I would have zero in these columns rather than an empty cell.

    Sample Qry: -.

    Select
    Channel,
    Count (order_num) County
    Of
    SALES_ORDER

    Pls help!


    Thanks in advance.

    Count always returns 0 if no line found or the actual number based on the found rows. You don't even have to NVL them. I think so
    the problem is in your report layout, in my opinion.

    You run query sqlplus, or Toad or sqldevloper and you can see for yourself that the count is 0.

    See you soon.
    VIN.

  • SQLLDR: How to fill the empty columns with specific data by default?

    Hello

    We are 11G

    Here is a complete example:

    (1) the definition of the table:
    create table IMPORT_PRJ_TIMESHEETS
    (
      RESSOURCE_CODE VARCHAR2(20),
      REFERENCE_DATE VARCHAR2(20),
      STATUS         VARCHAR2(20),
      PROJET_CODE    VARCHAR2(50),
      TACHE_ID       VARCHAR2(100),
      TACHE_DESC     VARCHAR2(250),
      RAF            NUMBER,
      JOUR1          NUMBER,
      JOUR2          NUMBER,
      JOUR3          NUMBER,
      JOUR4          NUMBER,
      JOUR5          NUMBER,
      JOUR6          NUMBER,
      JOUR7          NUMBER,
      IMPORT_DATE    DATE
    );
    (2) the CTL:
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
       APPEND INTO TABLE IMPORT_PRJ_TIMESHEETS
    -- Pour eliminer la ligne d'en-tete
    WHEN PROJET_CODE != 'ID projet'
       FIELDS TERMINATED BY '*-*' OPTIONALLY ENCLOSED BY '"'
    ( RESSOURCE_CODE       CONSTANT '!RESSOURCE_CODE!'
    , REFERENCE_DATE       CONSTANT '!REFERENCE_DATE!'
    , STATUS               CONSTANT '!STATUS!'
    , PROJET_CODE          CHAR
    , TACHE_ID             CHAR
    , TACHE_DESC           CHAR
    , RAF                  CHAR "TO_NUMBER( :RAF, '999G999D99')"
    , JOUR1                CHAR
    , JOUR2                CHAR
    , JOUR3                CHAR
    , JOUR4                CHAR
    , JOUR5                CHAR
    , JOUR6                CHAR
    , JOUR7                CHAR
    , IMPORT_DATE          SYSDATE
    )
    {code}
    
    
    3) the datafile :
    {code}
    ID projet*-*ID tâche*-*Tâche/Description*-*RàF*-*lun. 13/07*-*mar. 14/07*-*mer. 15/07*-*jeu. 16/07*-*ven. 17/07*-*sam. 18/07*-*dim. 19/07*-*
    FR-FR-NT2300135*-* *-*GAMMAWEB - Coordination*-*0,00*-* *-* *-* *-*8,00*-*8,00*-* *-* *-*
     *-* *-*Holiday*-* *-* *-*8,00*-* *-* *-* *-* *-* *-*
     *-* *-*Special leave*-* *-*8,00*-* *-* *-* *-* *-* *-* *-*
     *-* *-*Vacation*-* *-* *-* *-*8,00*-* *-* *-* *-* *-*
    
    {code}
    
    - As you can see, the datafile delimiter is "*-*" .... there's no pb about this.
    
    - Also, there are 5 lines in the datafile. Currently, the _*load status*_ is :
       - Line 1 is the header  >>> not loaded, and that's fine with me.
       - Line 2 is successfully loaded
       - Line 3 / Line 4 / Line 5 : are not loaded .. but I need these lines ...
    
    *What I'd like to get is to successfully load lines 3 to 5 with a default values for the first 3 columns (project/task ID/ task desc)*
    
    I hope it's clear enough and that you will be able to provide a good answer ..
    
    Thanks in advance,
      Olivier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    In your example, the only ranked with value on all lines is TACHE_DESC.
    If this field is always filled, try this:
    WHEN TACHE_DESC! = "Task/Description".

    Concerning

  • MS Windows XP Update KB 286 2330 has installed every day - last 2 weeks - guard reappear to update again! Why?

    keep to receive the update of ms KB for 286 2330, have removed this piece and re-installed. However, he returned for the last 2 weeks? Why and how do stop this repeated Ms. Update!

    Finally, here is what worked for me:
    Go to: Start-Settings-Control Panel - Add or remove programs.
    Once the list fills, scroll to the bottom of the list a KB2862330 discovery.
    Remove this update, as well as all this that followed and that just before KB2862339.  Some of the pop up windows will have a small check box asking if you want to do not restart the computer after you remove the update.  Check the box so that the computer does not restart until you are done to remove these updates.
    After you remove the, shut down the computer, wait 20 seconds, and then restart.
    After this restart, go to: start Windows Update and let it pick up and reload the updates.

    If this does not work, try again but this time not to restart the computer.  Just remove the updates and then go to Windows Update.

    Good luck.
    JDD06

  • HP Photosmart Prem 310a went offline suddenly and will not identify the SSID to run the Network Setup Wizard.

    All of a sudden the printer has gone offline a few days ago.  Went through all the diagnostics, etc. but nothing fixed.  A solution-Assistant will not work cause it will not identify the SSID of the network that he has done since it was installed (long ago).  Have tried everything I can find online, unless I don't understand or is not quite apply and still nothing.  Wireless network works with everything except the printer. I am not very computer so I do not understand most of the letter & numbers abbreviations used here.  Help.

    It may be a heat problem - radio from the printer gets flakey when it's hot.

    Finding 5 wireless networks should - Yes you have one, but your neighbors also have.

  • Eliminating the weekends and the user defined holidays.

    Hi, this is my query so far:

    WITH cla_case AS
    (SELECT 1 event_no, to_date('01/10/2011','dd/mm/yyyy') discover_date, to_date (' 02/10/2011 ',' dd/mm/yyyy') notification_date of all the double union)
    Select double union all 2 event_no, to_date('02/10/2011','dd/mm/yyyy') discover_date, to_date('03/10/2011','dd/mm/yyyy') notification_date
    SELECT 3 event_no, to_date('03/10/2011','dd/mm/yyyy') discover_date, to_date('04/10/2011','dd/mm/yyyy') notification_date double
    ),
    cla_event AS
    (SELECT 1 event_no, to_date (' 02/10/2011 ',' dd/mm/yyyy') incident_date of all the double union)
    SELECT event_no 2, to_date (' 02/10/2011 ',' dd/mm/yyyy') incident_date of all the double union
    SELECT 3 event_no, to_date('03/10/2011','dd/mm/yyyy') incident_date of the double
    )

    SELECT

    round (cc.notification_date - GREATEST (cc.discover_date, ce.incident_date)) Days_To_Report
    Of
    cla_case cc,
    cla_event this
    WHERE
    CC.cla_event_no = ce.cla_event_no

    Problem is that I must first eliminate the weekends and holidays then. I read on creating a calendar where you list the holidays, but I have no idea how to do this.

    Here is the link for the South African holidays: http://www.blaauwberg.net/public_holidays.php it's for 2010-2012. I'm going to need in 2008, but I find this info at a later stage.

    Thank you!

    Banner:
    Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Hello

    So, if you have already run the insert

    INSERT
    INTO
         non_working_days
         (     day,
              day_type
         )
    SELECT
         NEXT_DAY(TO_DATE('01/01/2008','DD/MM/YYYY') + 7 * (rownum -1),'SATURDAY') day,
         'WEEKEND' day_type
    FROM
         dual
    connect by
         level <=500
    UNION ALL
    SELECT
         NEXT_DAY(TO_DATE('01/01/2008','DD/MM/YYYY') + 7 * (rownum -1),'SUNDAY') day,
         'WEEKEND' day_type
    FROM
         dual
    connect by
         level <=500 
    
    /
    1000 rows created.
    

    all you need to do is remove this bit of the query

    non_working_days AS
    (     SELECT NEXT_DAY(TO_DATE('01/01/2008','DD/MM/YYYY') + 7 * (rownum -1),'SATURDAY') day, 'WEEKEND' day_type FROM dual connect by level <=500 UNION ALL
         SELECT NEXT_DAY(TO_DATE('01/01/2008','DD/MM/YYYY') + 7 * (rownum -1),'SUNDAY') day,'WEEKEND' day_type FROM dual connect by level <=500
    )
    

    Everything that was done was to create a table on the fly for the purpose of showing the issue. If your query can be simply

    WITH cla_case AS
    ( SELECT 1 cla_event_no, to_date('01/10/2011','dd/mm/yyyy') discover_date, to_date('10/10/2011','dd/mm/yyyy') notification_date from dual union all
    SELECT 2 cla_event_no, to_date('02/10/2011','dd/mm/yyyy') discover_date, to_date('13/10/2011','dd/mm/yyyy') notification_date from dual union all
    SELECT 3 cla_event_no, to_date('03/10/2011','dd/mm/yyyy') discover_date, to_date('14/10/2011','dd/mm/yyyy') notification_date from dual
    ),
    cla_event AS
    ( SELECT 1 cla_event_no, to_date('02/10/2011','dd/mm/yyyy') incident_date from dual union all
    SELECT 2 cla_event_no, to_date('03/10/2011','dd/mm/yyyy') incident_date from dual union all
    SELECT 3 cla_event_no, to_date('04/10/2011','dd/mm/yyyy') incident_date from dual
    )
    SELECT
         e.cla_event_no,
         e.days_to_report,
         e.days_to_report - COUNT(nwd.day) working_days_to_report
    FROM
         (
              SELECT
                   cc.cla_event_no,
                   GREATEST(cc.discover_date,ce.incident_date) start_date,
                   cc.notification_date end_date,
                   round(cc.notification_date - GREATEST(cc.discover_date,ce.incident_date)) Days_To_Report
              FROM
              cla_case cc,
              cla_event ce
              WHERE
              cc.cla_event_no = ce.cla_event_no
         ) e
         LEFT OUTER JOIN non_working_days nwd
         ON( nwd.day BETWEEN TRUNC(e.start_date) AND TRUNC(e.end_date))
    GROUP BY
         e.cla_event_no,
         e.days_to_report
    / 
    
  • How can I identify the correct wireless and ethernet on my computer card hp pavilion dv7-6b32us laptop?

    No software is identify them correctly and I can't not all drivers on the support page to work.

    Hello:

    These drivers are for Windows 7 64 bit Home Premium OS that is installed on your PC:

    First install the Intel chipset driver and reboot:

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-100315-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    You have the Broadcom WLAN 4313.

    It is the latest version of the driver for him:

    http://h20000.www2.HP.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=321957&prodSeriesId=3688868&swItem=ob-100089-1&mode=5

    The second is your Realtek card reader driver

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-100221-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    The next one is the driver of your IMEI:

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-100239-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    Then is your USB 3.0 controller:

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-99763-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    The first unknown device is your fingerprint sensor.

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-100260-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    The second, in my view, is your HARD drive protection sensor: there is no driver for this on the support page, so try this one.

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-76187-1&cc=us&DLC=en&LC=en

    In addition, if you use the shortcut keys on your laptop, you must also install the quick launch buttons.

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=ob-100465-1&CC=US&DLC=en&LC=en&os=4063&Product=5189524&sw_lang=

    Paul

  • How to identify the source file and edit reports in Oracle Sales R12.1.3

    We use R12.1.3 with Database 11g.

    I would like to know - how to change the report.

    --------------------------------------------------------------------

    For example if I want to edit a report in the module INVENTORY existing any report.

    • After the name of the report identify the concurrent program
    • The program contributing to identify the name of the executable file
    • In the executable file name identify the
      • Method of execution: Oracle report
      • Running file: name of the source file for the report
      • Take backup and edit the report and replace the report in the TOP >

    But in the sales module (it is not form based Oracle - I think it is developed on OAF)

    I would like to know how to identify and modify the report.

    According to standard - module sales Oracle provides three report and according to our Advisor to use these three reports, we need to install BI

    So we must find the solution through internal developments

    Hello

    Set the option to profile ' FND: Diagnostics ' to 'Yes' at the level of the user and you will be able to get 'on this Page' link at the bottom of the page.

    Kind regards

    Zahid

  • How can I identify the corresponding lines when lead and trolling can be used for several similar values in their?

    I use:

    Oracle SQL Developer (3.0.04) build hand - 04.34 Oracle Database 11 g Enterprise Edition 11.2.0.1.0 - 64 bit Production


    Examples of data

    Table

    with t as)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 0, 101, 103, 'destination', 85, 100 of all the double union

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 106, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 0, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 75, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 112, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 109, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 108, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 from all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125'., 108, 0, 109, 'destination', 60, 900 double

    )

    Is there a way to check date of consolidation for correspondence ticket_origin and ticket_destination when there are two or more lines of difference between them, which does not allow me to use result delay or function. It is also possible do it without using the amount column?

    I also want to identify if they are in the same region, when it is associated with (that I believe works after getting sorted table like so below then use lead lag after having de facto order)

    I'm trying to get something like this table

    with results like)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 double

    )

    You need to research rules business more to clarify and apply the mapping one.  The main secret is probably to match the values of ticket.

    Under use a t_view of view with the addition of PK (RID) to the table.  Some discrepancy could be solved by adding more rules for mapping and correcting the expected result entry errors

    SQL > desc t_view

    Name

    ------------------------

    RID

    DT

    TICKET_ORIGIN

    TICKET_DESTINATION

    STARTID

    ORIGIN

    DESTINATION

    OBJECTTYPE

    AMOUNT

    AREA

    with

    T1 as (select * from t_view where OBJECTTYPE = 'origin'),

    T2 as (select * from t_view where OBJECTTYPE = 'destination').

    map as (t1.rid select origin_id, t2.rid from t1 DESTINATION_id, t2)

    where t1. TICKET_ORIGIN = t2. TICKET_DESTINATION

    and t1. TICKET_DESTINATION = t2. TICKET_ORIGIN

    -Add rules to apply the one-to-one mapping

    and t1.amount = t2.amount

    and t1. STARTID = t1. ORIGIN

    and t2. STARTID = t2. ORIGIN),

    like map2)

    Select origin_id gid, origin_id rid of card

    Union of all the

    Select origin_id gid, DESTINATION_id rid of card)

    Select t_view.* card2, t_view where map2.rid = t_view.rid

    order of map2.gid, map2.rid

    /

       GET RID OF THE DT TICKE TICKE STARTID ORIGIN DESTINATION OBJECTTYPE AMOUNT AREA

    ---------- --------- ----- ----- ---------- ---------- ----------- ----------- ---------- ----------

         1 18 AUGUST 13 123_ 123 101 101 0 origin 85 100
         3 18 AUGUST 13 123 123_ 0 0 destination of 103 85 100
         4 17 AUGUST 13 124. _ 124. 105 105 0 origin 150 200
         6-17 AUGUST 13 124.  124 _ 0 0 destination of 106 150 300
         8 17 AUGUST 13 127_ 127 108 108 0 origin 50 600
         AUGUST 9-17 13 127 127_ 0 0 destination of 110 50 600
        11-17 AUGUST 13 125. _ 125. 108 108 0 origin 60 800
        15-17 AUGUST 13 125.  125 _ 0 0 destination of 112 60 700
        13-17 AUGUST 13 125.  125 108 108 0 origin 60 800
        17 17 AUGUST 13 125 125. 0 0 destination of 109 60 900

    10 selected lines.

  • How to identify the primary key relationship, key and forien

    Hello

    I wanted to know for a given table, how to identify if there is no child table. I could get details of the constraint in ALL_CONSTRAINTS or DBA_CONSTRAINTS, but I will not be able to determine who his children tables.
    If there is no other available table, it's possible to identify the parent and child tables so please please let me know.

    I know that we can check through creation of Table (DDL) script, but I need to understand programmatically. Is sort available?

    Thanks in advance.

    Kind regards
    SK

    SK says:
    Hello

    I wanted to know for a given table, how to identify if there is no child table. I could get details of the constraint in ALL_CONSTRAINTS or DBA_CONSTRAINTS, but I will not be able to determine who his children tables.
    If there is no other available table, it's possible to identify the parent and child tables so please please let me know.

    I know that we can check through creation of Table (DDL) script, but I need to understand programmatically. Is sort available?

    use

    query using R_CONSTRAINT_NAME where CONSTRAINT_TYPE = 'R '.

    SQL> desc user_constraints
     Name                            Null?    Type
     ----------------------------------------- -------- ----------------------------
     OWNER                                  VARCHAR2(30)
     CONSTRAINT_NAME                  NOT NULL VARCHAR2(30)
     CONSTRAINT_TYPE                        VARCHAR2(1)
     TABLE_NAME                       NOT NULL VARCHAR2(30)
     SEARCH_CONDITION                        LONG
     R_OWNER                             VARCHAR2(30)
     R_CONSTRAINT_NAME                        VARCHAR2(30)
     DELETE_RULE                             VARCHAR2(9)
     STATUS                              VARCHAR2(8)
     DEFERRABLE                             VARCHAR2(14)
     DEFERRED                             VARCHAR2(9)
     VALIDATED                             VARCHAR2(13)
     GENERATED                             VARCHAR2(14)
     BAD                                  VARCHAR2(3)
     RELY                                  VARCHAR2(4)
     LAST_CHANGE                             DATE
     INDEX_OWNER                             VARCHAR2(30)
     INDEX_NAME                             VARCHAR2(30)
     INVALID                             VARCHAR2(7)
     VIEW_RELATED                             VARCHAR2(14)
    
    SQL> 
    
  • What is the most efficient SQL to identify the best 5 count indictment and the rest of the Group?

    Hi all

    I expect advice about the best way to solve the following (without use of subqueries and decode etc.):

    We have a person table that includes the nationality column... we want to identify the top 5 (County) nationalities and the remaining sum is considered to be "the other". We would then use this result to create a pie for the organization chart.

    Thanks in advance for your time.

    Kind regards
    Yahya

    Or for example

    SQL> select   object_type, sum (cnt) cnt
        from   (select   case when rownum <= 5 then object_type else 'OTHER' end object_type,
                         cnt
                  from   (  select   count ( * ) cnt, object_type
                              from   all_objects
                          group by   object_type
                          order by   count ( * ) desc))
    group by   object_type
    order by   2 desc
    /
    OBJECT_TYPE                CNT
    ------------------- ----------
    SYNONYM                  26932
    JAVA CLASS               22203
    OTHER                    10357
    VIEW                      5064
    INDEX                     4826
    TABLE                     3232
    
    6 rows selected.
    

    Published by: michaels2 on July 1st, 2009 19:49

  • How to identify the client and server versions

    Hi all

    OK, this may sound silly, but I have to write an application to access an Oracle database. Prior development in other languages used ODBC and works very well. VS.NET using OLE DB works as well.

    However, I installed ODT with ODAC 11.10.6.21 and tried. I get an error while trying to access the data.

    When I run the conn.open (), I get:
    ORA-12154: TNS: could not resolve the connect identifier specified

    I opened the TNSNames.ora file and allows to create the just in case connection string. But I still get the error.

    My guess is that the client on my system is too old, or maybe the Oracle server still running an older version.

    Is there an easy way for me to identify the latest version of the client and the version of Oracle running on the server, I installed?

    No, I can't just ask the people who manage the server or I would have done it already. I am a contractor here and it is very difficult for me to get through to those who know it.

    Thank you

    JustMe

    http://www.Oracle.com/technology/tech/dotnet/Col/odt_faq.html#ora-12154:_TNS:could_not_resolve_the

  • Command or a script required for the data store, the identifier of NAA and multipath

    The following script/command gets me politics multichannel on a csv file, however, I need to also identify the "Datastore" name with the number of naa.

    Get-cluster 'windows 01' | Get-vmhost | Get-scsilun - luntype disc | Export-csv c:\lun_multipath.csv

    any help would be appreciated.

    Try something like this

    $datastore = get-datastore
    
    $disks = get-cluster 'windows 01' | get-vmhost | get-scsilun -luntype disk$entry = @()$output = @()ForEach ($disk in $disks){  $entry = "" | Select DataStorename, HostName, Canonicalname, Multipathing  $entry.datastorename= $datastore | Where-Object {($_.extensiondata.info.vmfs.extent | %{$_.diskname}) -contains $disk.canonicalname}|select -expand name  $entry.HostName = $disk.VMHost.Name  $entry.canonicalname=$disk.canonicalname  $entry.multipathing=$disk.multipathpolicy  $output += $entry}$output | Export-csv c:\lun_multipath.csv
    
  • can watch it identify the user?

    Hey,.

    I'm curious to know if the Apple Watch is able to identify the user who wears.

    I try to explain what I mean

    Scenario would be: I bought and use the watch, everything is set up and works great. Then for example my sister puts the watch.

    The device includes is not carry me over (e.g. a sensor or whatever it is)?

    I hope that you understand what my question is

    Good day

    Sarah

    Hi Sarah

    Your watch can be protected by a password, you should keep private.

    You may want to try these settings:

    -On your iPhone, in the application of Eve, go to: My Watch (low left tab) > General > wrist Detection - this turns on.

    -On your iPhone, in the application of Eve, go to: Watch My > Passcode > Passcode turn on (choose a password Simple or more complex).

    -If you wish: also on the password settings screen, select Unlock with iPhone.

    Your watch will be defined when it was placed on your wrist - or someone else.

    After putting on it, it will only be then unlock if you unlock your watch manually (by entering the access code) or unlock your iPhone. Then, it will remain unlocked until you remove it from your wrist, when that it locks automatically.

    If someone else puts your watch on, they will not be able to unlock or use it unless they also know the access code (or, if you have enabled the unlock iPhone option with code, you are in the Bluetooth range and unlock your iPhone).

Maybe you are looking for

  • CE260A - black 1 / 2 / 3: Composition of Toner

    One of the suppliers that we provide products for us to provide a list if the substances / ingrediants in following tonics: CE260A CE261A CE262A CE263A They need this information to see if the migration of the inks in the products would cause harm et

  • Delete user for unknown accounts profiles in XP Pro SP3

    I've got profiles user for unknown accounts in XP Pro SP3.  In the past, I've deleted then recreated with the same account name administrator accounts.  I have observed that no active administrator accounts have the same size and modification date us

  • How do I see what I burn on my aloan stand home dvd player.

    I burned a dvd. But I can watch the dvd on my computer, but not on my reader dvd standaloan. It gets more complicated all the time. the closest I can fill a dvd successfully, it seems to be that I'm missing. I have read the guide dvdflick and attempt

  • use of extra recovery disk

    I have mine but never asked for it. What is this for?  I have lost my documents and it says "refer to the printed instructions.  I have a system of SR5410F

  • help XP Windows (.exe, .lnk)

    Problem: cannot open all of the files on my computer and tried to the low fixed charge, restorations of registry, but they do not work because I can't open anything with an extention. Is anyway to solve this problem, or a site online where to read an