Create Table of records names

Hello

Can someone help me add/create the Tables folder that can appear in the list of choices while creating a file group ID?

Please let me know if I should explain more.

Thank you

Concerning

RS

Hi all

The solution was a simpler than what we thought. We are all beginners.

After some research, we realized that the Master Data is not completely loaded.

With the help of my administrator, we downloaded and the problem is now resolved.

I thought that I would always post there, a newbie like us might find useful.

Thank you!

Concerning

RS

Tags: Oracle Applications

Similar Questions

  • Create table works, create materialized view only - long column names?

    Hello.

    I have no probs creating a table as well: -.
    CREATE TABLE blah
    (
    DEVICE_ID
    )
    in select
    "Device_ID" AS DEVICE_ID
    "of"sum" Device"@ed_link_3
    where "Device_ID" < 5;


    But when I try to create a materialized view:
    Blah1 CREATE MATERIALIZED VIEW
    (
    DEVICE_ID
    )
    < various materialized view parms >
    in select
    "Device_ID" AS DEVICE_ID
    "of"sum" Device"@ed_link_3
    where "Device_ID" < 5;

    It fails with errors: -.
    ORA-04052: error occurred when searching to the top of the remote object Aggregate.Device@ED_LINK_3
    ORA-01948: length of the name of the identifier (31) exceeds maximum (30)

    Is there a way to get around this?
    Is the problem with the columns of the remote table of device, which I do NOT need to import to have column names that are longer than 30 characters?

    For now, I want only the Device_ID column which is a simple 9 characters long.

    Oh, and the remote database is MySQL.
    I'm uncomfortable with the < parms of materialized view > as they work fine when I choose a different remote table with only short column names.

    Thank you.

    To my knowledge, you have the option
    (a) create view (with shortened column names or only with desired columns if they are already less than 30 char limit) side of mysql
    (b) use dbms_passthrough to force the analysis to be done on mysql (as in the example provided by SY here use dbms_passthrough to create a view )
    However, I prefer to stick to one), because with dbms_passtrhough, you retrieve row by row.

    Best regards

    Maxim

  • Bugs or features of NoSQL create table

    Hi, I used the runadmin CLI command to create a pattern with several tables and child tables (create table), reflecting our logistics OAGIS model BO.

    The following clothe are bugs in runadmin, I think:

    * children tables have a key with the same name as the name of the key of one of their parents? Why?

    adding a few records (add-registration-field) of the same structure (structure to address typical e.g.a) only works for the first, for example postalAddress. When you add an invoiceAddress of the same type, the error "Unknown Exception: class org.apache.avro.SchemaParseException ' appears at the output. Children tables for that aid works. With the help of several records from a same simple structure works, and I think that the error occurs when the records have a field with the same name as the key of the table.

    * In addition, I miss a feature like - AutoNumber to use keys by default. It is available or planned or displaced in the application layer?

    Hello

    Some good questions.

    | * children tables have a key with the same name as the name of the key of one of their parents? Why?

    As you are suggesting this restriction exists only for the fields that are part of the primary key.  A key field in a child table may have the same name as a key field in the parent.  This restriction makes a number of simpler and more efficient internal implementation details.  Do you have a use case where it is annoying?

    | adding a few records (add-registration-field) of the same structure (structure to address typical e.g.a) only works for the first, for example postalAddress. When you add an invoiceAddress of the same type, the error "Unknown Exception: class org.apache.avro.SchemaParseException ' appears at the output. Children tables for that aid works. With the help of several records from a same simple structure works, and I think that the error occurs when the records have a field with the same name as the key of the table.

    A specific example of this behavior would be helpful.  It may be a bug.

    | * In addition, I miss a feature like - AutoNumber to use keys by default. It is available or planned or displaced in the application layer?

    It is the responsibility of the application.

    Kind regards

    George

  • Create table replaces the existing table in mssql

    In a program that allows us to update our sites, we use the function 'create an array' of MS SQL to create missing tables in databases.

    Thousands of time we used it, if a table already exists with the same name of the table in the create table MS SQL survey command an error.

    In fact, MS SQL documentation indicates that only if you include the optional 'replace' command, will be a replaced existing table.

    But today, we used this program on a new host, that we are trying, and the create table command actually did replace an existing table with a new table, delete all the records from the old table.

    I'm trying to understand what this would allow the settings at the server level.

    This is the code we use:

    < CFQUERY NAME = "recipe" DATASOURCE = "recipe" dbtype = "ODBC" username = "" #ruser # "password =" #rPASS #">"
    Create table recipecats)
    RecipecatID int IDENTITY(1, 1) NOT NULL PRIMARY KEY,
    recipecatdescription NVARCHAR (50) NULL)
    < / cfquery >

    Are you sure that this is not just to create another table with the same name, but one
    different owner?

    I saw the strangeness (it's probably just weird for me because I am ignorant)
    of what is happening), I can READ a table owned by another user without
    calling the name of the table with its owner, and when I go to CREATE a table
    of the same name, it is actually created as my current user and subsequently when
    you ask the name of the full table, I get the results of one, is not new
    the former. If I'm right in the name of the table, I can ask both/either. Kind
    way similar CF hunting around different scopes when you aren't eligible one
    reference to a variable.

    Also, your code should probably be testing to see if the table exists
    before you try to create it anyway. "Just try and catch.
    "If it errors" is not considered as 'test' if there is

    --
    Adam

  • How do I create a branch to the form after you have created a new record

    Hello

    I created a master/daetail form with detail on the same page.
    It works very well.
    When you create a new record, on the details of the page, you enter the data, and you click Ok.
    Then you are directed to the main form, a report containing the lines of recordings.
    You must then click on the link in the column to change the record to add details.

    I want to do it is to branch directly on the same page after you create the record. Order to dot Hat I created a branch whith the value equal to CREATE demand.
    And the target is the same page. The problem is to the value of the primary key. This KP is created after sending, and it is not possible to recover because it is created right now. I hope I'm clear.

    To sum up the question: how to create a branch immediately to the same page after creating a new record?

    I have the page on

    [http://apex.oracle.com/pls/otn/f?p=4550 | http://apex.oracle.com/pls/otn/f?p=4550]

    The workspace is ESPACE2008
    Is the user name: guest
    the password is: noproblem

    The long form is page 42.
    The main form is page 41
    Unfoirtunately tables are not available.
    You can see the process of branch No. 50 on page 42.

    Thank you very much for your help.

    Christian

    Christian,

    I couldn't connect to your ws because I don't think that your guest user has developer privileges. But have you tried 'Back in the agenda key' property in the region of origin of your page DML process. This should return the value of the primary key newly generated in a page element when the page is loaded.

    Anthony.

    -----------
    http://anthonyrayner.blogspot.com

  • DB tools create Table

    Hello.. I got this error when trying to create a database

    Conn Execute.vi-> DB tools create Table.vi--> CreateDatabase.viException occurred in the Microsoft Office Access database engine: syntax error in the statement CREATE TABLE in Conn Execute.vi-> DB tools create Table.vi-> CreateDatabase.vi

    I can't open your vi, but in many cases, the syntax error is caused by the invalid table or field names (reserved words, spaces or invalid characters). In this case, you can change the names; Alternatively, you can frame them square brackets: [my_column_name].

    If you open the DB create Table.vi-> Conn Execute.vi block diagram, you can enter the full text of the SQL query and post, so we can take a look.

  • Creating table and use - part 1

    be no difficulty with arrays in C, etc. but creating tables of LabVIEW poisoned me. Unfortunately, the heart I sure table labs start out with a table already in place is not much help either. For example, in the attachment, I have a simple loop generating a series of figures that I want to put in a picture. I place a table on the block diagram and its type sucks and I can't find a good way to change it. The textbook says to drag an object in the table on the front panel. So, how is - a hang out an integer in an array?

    Thank you

    JVH

    jvh75021 wrote:
    Thanks for the post. Where did you get the constant that you drag in the table?

    I'll try to help in this form:

    Darren wrote:

    If you know the name of the object you want, you don't have to look at all the pallets.

    Amazing that NEITHER use YouTube for video hosting, because it is blocked by the firewall of our company.

    Andrey.

  • you need prove the ownership of the domain by creating a DNS record

    I recorded the record MX and TXT on my domain name (name: samcom.co.in). Even now, I get the same error of ' you need prove the ownership of the domain by creating a DNS record '. This is for registration to e-mail customized outlook.com. After recording update MX & the TXT record, I already waited 30 hours. Need more time (e.g. 72 hours) before it can be verified?

    I reconfirmed if the MX record has been updated with the help of http://mxtoolbox.com/... And it has been updated correctly.
    It would be great if someone can help please on even.
    Concerning
    D

    Hi Christophe,

    Since the already educated suggestions do not help, I suggest that you post your question in the TechNet forums because they cater to the audience of it professionals.

    Thank you

  • epengs.dB (ENG) + error CREATE TABLE PS_1099C_CUST_DATA


    PT 8.54.10

    FSCM 9.2 (picture 13)

    SQL Server 2008 (64-bit)

    We get below error when we are in the stages of the creation of the DB via DM scripts.

    Started the: Tue Nov 17 02:10:54 2015
    Release of Data Mover: 8.54.10
    Database: FSDMO92 (ENG)
    Input file: E:\FSDMO92\data\epengs.db (ENG)
    Import 1099C_CUST_DATA
    Create Table 1099C_CUST_DATA
    -SQL error. Position of the error: 0 return: 8601 -.


    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Column, parameter, or variable #4: could not find the PSDATE data type.
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Instructions could not be prepared. (SQLSTATE 37000) 8180

    CREATE TABLE PS_1099C_CUST_DATA (CUST_ID varchar (15) NOT NULL, TIN varchar (20) NOT NULL, TAXPAYER_ID varchar (14) is NOT NULL, ASOF_DATE PSDATE NULL, decimal ENTRY_AMT (26, 3) NOT NULL, decimal INTEREST_EXPENSE (26, 3) NOT NULL, Name1 varchar (40) NOT NULL, NAME2 varchar (40) NOT NULL, NOT NULL of the varchar (55), of ADDR_LN1 ADDR_LN2 varchar (55) NOT NULL) , ADDR_LN3 varchar (55) NOT NULL, ADDR_LN4 varchar (55) NOT NULL, CITY varchar (30) NOT NULL, NOT NULL of the varchar (6) State, POSTAL varchar (12) NOT NULL, TEL varchar (24) is NOT NULL, NAME varchar (50) NOT NULL, Name3 varchar (40) NOT NULL, name4 varchar (40) NOT NULL, CITY3 varchar (30) NOT NULL, Address1 varchar (55) NOT NULL , State3 varchar (6) NOT NULL, POSTAL...
    Error: Unable to process create statement for 1099C_CUST_DATA
    Ending: Tue Nov 17 02:10:56 2015
    Unsuccessful end

    Cannot find the data type PSDATE comes here.  Looks like one of the required scripts has not been executed.  It has been long since I am on a site of SQL Server, but I understand the substance of this issue.  PeopleSoft creates a customized in SQL Server PSDATE data type which is an extension of the date format.

    Rather than to point you to the script, I suggest you go back and find where this prerequisite is necessary and make sure that you are not lacking in any other required component.

  • selection of the missing records between 2 duplicity without worrying about tables of records

    Hi all

    I have received_bills and send_bills of 2 tables.

    The SEND_BILLS table is the source table displaying all records in it.

    I need to compare two tables together and insert all the missing elements in received_items including duplicate records.

    There may be duplicate in 2 tables records.

    I wrote a query, but it does not select the duplicate records if it's all the 2 tables. When the same duplicate records are send_bills and received_bill without worrying because send_bills has 4 of them and received_bill 2, it does not select the other 2 duplicate records. And it's just what I need.

    the query is

    SELECT SEND. POINT OF REFERENCE,

    Send. PAYMENT,

    Send. CODE

    OF SEND_BILLS SEND

    WHERE THERE IS NOT (SELECT REC. DATUM, PAYMENT, REC. REC. CODE

    OF RECEIVED_BILLS REC

    WHERE REC. REFERENCE = SEND. SCRATCH CARDS

    AND REC. PAYMENT = SEND. PAYMENT

    AND REC. CODE = SEND. CODE)

    send_bills records

    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1529A3
    OCTOBER 10, 1547A4
    9 OCTOBER 1519A8
    OCTOBER 10, 1520A1
    OCTOBER 10, 1519A1
    OCTOBER 10, 1525A5
    OCTOBER 10, 1525A5

    received_bills records

    OCTOBER 10, 1519A1
    OCTOBER 10, 1529A3
    OCTOBER 10, 1547A4
    OCTOBER 10, 1519A1

    the result of the query is:

    OCTOBER 10, 1525A5
    OCTOBER 10, 1525A5
    OCTOBER 10, 1520A1
    9 OCTOBER 1519A8

    So he selects all the records

    the result should be

    OCTOBER 10, 1525A5
    OCTOBER 10, 1525A5
    OCTOBER 10, 1520A1
    9 OCTOBER 1519A8
    OCTOBER 10, 1519A1
    OCTOBER 10, 1519A1

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

    -The DOF for Table SEND_BILLS

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

    CREATE TABLE SEND_BILLS

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE)

    )  ;

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

    -The DOF for Table RECEIVED_BILLS

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

    CREATE TABLE 'RECEIVED_BILLS '.

    (DATE OF "DATUM",

    NUMBER OF "PAYMENT."

    'CODE' VARCHAR2 (5 BYTE)

    )  ;

    -Insert the script for send_bills

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 29, 'A3');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('09-OCT-15','DD-MON-RR'), 19, 'A8');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 20, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5')

    Insert into SEND_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 25, 'A5')

    -Insert invoices received from script

    Insert into RECEIVED_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Insert into RECEIVED_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 29, 'A3');

    Insert into RECEIVED_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 47, 'A4');

    Insert into RECEIVED_BILLS (DATUM, CODE) values (to_date('10-OCT-15','DD-MON-RR'), 19, 'A1');

    Can someone please help me with the query so that I can also select all the missing records, including duplicates.

    Thanks in advance.

    Best regards

    Caroline

    If you should by all means use loop and then (send_bills and received_bills contain the same data as your original post):

    Select the reference, payment, code

    of (with

    Duplicator (Datum, Payment, code, CNT) as

    (select the reference, code, payment, cnt - 1).

    from (select datum, payment, code, count (one) - cnt count (two)

    (select date, payment, code, 1 one, to_number (null) two)

    of send_bills

    Union of all the

    Select datum, payment, code, to_number (null), 2 two

    of received_bills

    )

    Reference group, code

    having count (one)! = count (two)

    )

    Union of all the

    Select the reference code, payment, cnt - 1

    The duplicator

    where cnt > 0

    )

    Select the reference, payment, code

    The duplicator

    )

    DATUM PAYMENT CODE
    10/09/2015 19 A8
    10/10/2015 19 A1
    10/10/2015 25 A5
    10/10/2015 20 A1
    10/10/2015 19 A1
    10/10/2015 25 A5

    Concerning

    Etbin

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • using datediff, creating table

    Hi all

    I'm trying to calculate the number of years of a product when a new record is inserted.

    That's what I tried

    CREATE TABLE WaterMeter)

    meterID VARCHAR (25) NOT NULL,

    readingID VARCHAR (25) NOT NULL,

    meterSerialNum VARCHAR (25) NOT NULL,

    installationDate DATE NOT NULL,

    noOfYears AS (DATEDIFF (YEAR, sysdate, installationDate));

    CONSTRAINT watermeter_Pkey PRIMARY KEY (meterID).

    Watermeter_Altkey of UNIQUE CONSTRAINT (meterSerialNum)

    );

    and the following error appeared.

    Error in the command line column: 6:27

    Error report:

    SQL error: ORA-00904: "YEAR": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    so, how can I go around to solve this issue?

    Virtual column is... virtual. It is not stored in the table. Oracle calculates the value of virtual column every time that reference you it. This is why you cannot use functions such as SYSDATE in a virtual column expression. I understand the logic underlying your table, but this is done using views. Simply create the table without column of noOfYears, then

    create or replace view WaterMeter_VW as select t.*, MONTHS_BETWEEN (sysdate, installationDate) / 12 WaterMeter noOfYears t;

    SY.

  • Oracle 12 c: create table

    On oracle 12 c, with sqlplus

    [CODE]

    SQL > CREATE TABLE "minimum")

    2 'iddurata' NUMBER (11) NOT NULL,

    3 "minimum" NVARCHAR2 (40) NOT NULL

    4    )

    5;

    Table created.

    [/ CODE]

    [CODE]

    INSERT INTO 'minimum' VALUES ('1' 1:30 ');

    1 line of creation.

    [/ CODE]

    [CODE]

    SQL > select * from minimum;

    Select * from minimum

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    [/ CODE]

    Why?

    by default, the names of the objects are uppercase.  When you created your table you forced the name to be lowercase by placing the name between quotes.  But when you tried to choose in this one, you have left the name unlisted, then oracle tried to find a table named 'MINIMUM '.    "MINIMUM"! = 'minimum '.

    Bottom line is that you must never create objects with quotation marks around their names, thus leaving oracle create them with the default value of the uppercase names.

    And before you start - no, you don't want them to be lower - or uppercase-lowercase.  It causes simply indescribable sadness that begin you already to experience.

    You can get your results with ' SELECT * FROM 'minimum' ', but you really want to go.

  • CREATE TABLE and INSERT

    Hello

    I am a fairly new user for Oracle and have found this place to be very useful as I'm learning! One of the guidelines is to provide sample CREATE TABLE and INSERT data. I read the FAQ and in other forums to see if I could better understand this process, but I'm still struggeling reflected. Please can someone explain exactly what I do for these data, I want to be sure that I provided as useful information a lot in my posts to get help as soon as possible. I appreciate everything / all the answers!

    Hello

    Daniel Strong wrote:

    So, something like this:

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(220,AB,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(7,BB,SLOW,7);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(221,BC,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(8,BD,SLOW,2);

    INSERT INTO skills (user_id, skill_nm) VALUES (AB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BC, DOWN);

    INSERT INTO skills (user_id, skill_nm) VALUES (BD, SLOW);

    DESIRED RESULTS:
    MU_ID EXTERNAL_ID SKILL_NAME SKILL_LEVEL
    220 AB FAST 1
    221 AV FAST 1

    When you get a response, you want it works or is it OK if the answer causes errors?
    Obviously, you want people to post answers that work.  Make sure that the code of that validation works, too.  Test (and, if necessary, correct) your INSERT statements in your own development before posting on this forum system.

    The literal string values must be in single quotes.  I think you meant:

    INSERT INTO skills (external_id, skill_nm, mu_id, skill_level) VALUES (220, "AB", "QUICK", 1);

    Without the single quotes, AB and FAST are considered as column names or function.

  • Create table with overlapping parallel dates in individual columns

    I try to combine data from two different tables into a single table.

    The data in table 1 contains locations of patients in a hospital where each record represents a single location. Patients can be transferred several times between the different beds resulting from multiple records for a single visit.

    The data in table 2 contains the operative activity of the patient to the Hospital where each record represents either the GOLD of the suspension of the recovery room. A patient may have multiple operations in a single visit.

    I would like to join/merge/mashup data in a single table that contains the data parallel to each other. In other words, dates of the appliance on one side of the table and the activity of GOLD on the other. The difficulty is that the two sets of overlapping of dates of arrival and departure. I wish that the final table to divide the originals in new records when the overlaps do not coincide.

    Example:

    Original in both events (one per table)

    > Unit event has - from 14:00 to 18:00

    > OR event B - from 16:00 to 17:00

    Results in 3 documents (in the final)

    > Event 1 - unit from 14:00 to 16:00, null dates GOLD

    > Event 2 - unit from 16:00 to 17:00 OR 16:00 to 17:00

    > Event 3 - unit from 17:00 to 18:00, null dates GOLD

    Of course overlap can be more complex than the example above and adding code to indicate the 'ghosts' transfers to as well.

    In the code below, the first visit of the GOLD occurs during the first mention of the unit.

    Jason

    Oracle 10g

    [code]

    create the table delme_Unit_dates

    (id varchar2 (20))

    , unit_rcd_id varchar2 (20)

    , Unit_desc varchar2 (20)

    Unit_in_code char (1)

    Date of Unit_in_dttm

    Date of Unit_out_dttm

    Unit_out_code char(1));

    create the table delme_or_dates

    (id varchar2 (20))

    , OR_rcd_id varchar2 (20)

    , OR_desc varchar2 (20)

    OR_in_code char (1)

    Date of OR_in_dttm

    Date of OR_out_dttm

    OR_out_code char(1));

    create the table delme_all_dates

    (id varchar2 (20))

    , Unit_OR_id varchar2 (40)

    , Unit_rcd_id varchar2 (20)

    , Unit_desc varchar2 (20)

    Unit_in_code char (1)

    Date of Unit_in_dttm

    Date of Unit_out_dttm

    Unit_out_code char (1)

    , OR_rcd_id varchar2 (20)

    , OR_Desc varchar2 (20)

    OR_in_code char (1)

    Date of OR_in_dttm

    Date of OR_out_dttm

    OR_out_code char (1));

    insert into delme_unit_dates values ('123456', 'U1111', 'Unit A', 'A', to_date('2013-04-29 5:02:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 1:06:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1112', 'Unit A', 'B', to_date('2013-05-09 1:06:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 4:53:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1113', 'Unit A', 'B', to_date('2013-05-09 4:53:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 't');

    insert into delme_unit_dates values ('123456', 'U1114', ' unity, 't', to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'), 'B' ");

    insert into delme_unit_dates values ('123456', 'U1115', ' unity, ' B', to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-12 4:00:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1116', ' unity, ' B ', to_date('2013-05-12 4:00:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-16 2:14:00 PM', 'yyyy-mm-dd hh:mi:ss am'),' t ');

    insert into delme_unit_dates values ('123456', 'U1117', 'Unit Z', ', to_date('2013-05-16 2:14:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-17 2:26:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456 ', 'U1118', 'Unit Z', 'B', to_date('2013-05-17 2:26:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-20 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'),');

    insert into delme_or_dates values ('123456', 'OR2221', 'or 1', 'O', to_date('2013-05-09 7:35:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'), 'R');

    insert into delme_or_dates values ('123456', 'OR2222', ' 5', 'R', to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 3:20:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'U');

    insert into delme_or_dates values ('123456', 'OR3331', 'or 2', 'O', to_date('2013-05-16 7:59:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'R');

    insert into delme_or_dates values ('123456', 'OR3332', ' 8', 'R', to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-17 11:20:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'U');

    commit;

    -Is far from what we

    Select

    U.*

    , o.*

    Of

    delme_Unit_dates U

    delme_OR_dates O

    where

    U.ID = o.id

    and U.UNIT_IN_DTTM < = O.OR_IN_DTTM

    and U.UNIT_OUT_DTTM > = O.OR_IN_DTTM

    order of U.UNIT_IN_DTTM, O.OR_IN_DTTM

    ;

    [/ code]

    Post edited by: Jason_S (changed a single date ' 2013 - 05 - 16 15:20 ' to ' 2013 - 05 - 09 15:20 ')

    Hi, Jason.

    Jason_S wrote:

    I edited one of the dates in the original post.

    Also although the inpatient unit and OR events are contiguous for a given patient (no overlap and without gaps - after that data are cleaned).

    ...

    The sample data you posted a of gaps in the data of the GOLD.  It is correct that the solution below works or not there are gaps in the two tables.

    WITH got_dttm AS

    (

    SELECT unit_in_dttm AS DTMC

    OF delme_unit_dates

    UNION

    SELECT unit_out_dttm AS DTMC

    OF delme_unit_dates

    UNION

    SELECT or_in_dttm AS DTMC

    OF delme_or_dates

    UNION

    SELECT or_out_dttm AS DTMC

    OF delme_or_dates

    )

    all_periods AS

    (

    SELECT DTMC AS in_dttm

    , (DTMC) ahead OF (ORDER BY DTMC) AS out_dttm

    OF got_dttm

    )

    SELECT NVL (u.id, o.id) as id

    u.unit_rcd_id

    u.unit_desc

    u.unit_in_code

    p.in_dttm

    p.out_dttm

    o.or_rcd_id

    o.or_desc

    Of all_periods p

    LEFT OUTER JOIN delme_unit_dates u WE u.unit_in_dttm<=>

    AND u.unit_out_dttm > = p.out_dttm

    LEFT OUTER JOIN delme_or_dates o WE o.or_in_dttm<=>

    AND o.or_out_dttm > = p.out_dttm

    WHERE p.out_dttm IS NOT NULL

    ORDER BY p.in_dttm

    ;

    You can use the query above to CREATE or a CREATE TABLE... AS command.

    If you have as much data as you say, a table or materialized view would be maybe faster to use.

    You will notice that I do understand not all columns; I would like to know if you have a problem, including them.

    I don't know what id role plays in this problem.  It is difficult to say when all rows have the same value.

Maybe you are looking for

  • Text with the letters No. and TM sometimes display as exhibitor.

    On some web pages, words that begin with the letters NOT or include TM were part of the word displayed as an exhibitor. For example, if the sentence starts with the Word no, the part not of the word has triggered o and stressed that it is an abbrevia

  • Shortcut keys in Qosmio G20 no longer work

    Hello! I have a problem with the access keys (the one at the top of the keyboard - not the FN keys) in my Qosmio G20, it does not work. Sorry for my English ;) Can someone help me?

  • Windows 8.1 No HDMI Audio output

    I connect the HDMI from my laptop to the TV and before the 8.1 update, it worked fine.  Now I have video but no sound. Device Manager shows two things under "Sound, video and game controllers". 1. high definition Audio Devide (with yellow triangle) 2

  • software 'trial' is no longer a trial. I bought then why he says trial is completed before 2012

    Several years ago, I bought the software online directly from Microsoft. Search Collage 2008 called. I have same icon on my page that you come first after signing in. It says 'test period completed purchase produce. Not twice! Also, I used to go to t

  • DAQmx producing many threads of the system

    Hello- I wrote a VI to collect data on a card OR PCI - 6250 DAQmx. VI creates a new task, configure voltage max/min values and the trigger, then collects the N data points and finally closes and deletes the task. In itself this VI works perfectly, an