a relationship much

Hi, I have two tables with point geometry and another table without any geometry.

SQL > select Idnumber, geometry of arp;

IDNUMBER GEOMETRY (SDO_GTYPE, SDO_SRID, SDO_POINT_TYPE (X, Y, Z), ANSDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL)

SQL > select Idnumber, temp, month of temperature;

IDNUM MONTH TEMP

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

5cOx 32 Jan

5cOx 28 Feb

5cOx 29 March

5cOx 31 April

5cOx 34 may

35 5cOx June

SQL > select a.idnumber, a.geometry, b.temp, arp b.month a, b of temperature where a.idnumber = b.idnumber;

IDNUMBER GEOMETRY (SDO_GTYPE, SDO_SRID, SDO_POINT_TYPE (X, Y, Z), ANSDO_ELEM_INFO, SDO_ORDINATES) MONTH TEMP

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 32 Jan

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 28 Feb

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 29 March

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 31 April

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 34 may

5cOx SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL) 35 June

Please note that the geometry also selected six times.

When I try to show to the map in sql developer, he has six slot geometries at the same place.

How to handle this? Is there any problem in the design?

Thank you

You can use PIVOT, as shown below.

Scott@orcl12c > select Idnumber, geometry of arp

2.

IDNUMBER

--------

GEOMETRY (SDO_GTYPE, SDO_SRID, SDO_POINT_TYPE (X, Y, Z), ANSDO_ELEM_INFO, SDO_ORDINATES)

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

5cOx

SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL)

1 selected line.

Scott@orcl12c > select idnumber, temp, months of temperature

2.

IDNUMBER MONTH TEMP

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

5cOx 32 Jan

5cOx 28 Feb

5cOx 29 March

5cOx 31 April

5cOx 34 may

35 5cOx June

6 selected lines.

Scott@orcl12c > SELECT *.

2 the temperature OF

3 PIVOT (SUM (temp)

4. FOR months IN

5 ('January', 'February', 'March', 'April', 'May', 'June'))

6.

IDNUMBER 'Jan', 'February', 'March', 'April' 'can' "June".

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

32 28 29 31 34 35 5cOx

1 selected line.

Scott@orcl12c > SELECT b.*, a.geometry

2A from arp,

3 (SELECT *)

4 the temperature OF

5 PIVOT (SUM (temp)

6. FOR months IN

7 (' January', 'February', 'March', 'April', 'May', 'June'))) b

8 WHERE a.idnumber = b.idnumber

9.

IDNUMBER 'Jan', 'February', 'March', 'April' 'can' "June".

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

GEOMETRY (SDO_GTYPE, SDO_SRID, SDO_POINT_TYPE (X, Y, Z), ANSDO_ELEM_INFO, SDO_ORDINATES)

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

32 28 29 31 34 35 5cOx

SDO_GEOMETRY (2001, 8307, SDO_POINT (-87.907389, 41.9793333, NULL), NULL, NULL)

1 selected line.

Tags: Database

Similar Questions

  • SQLldr insert

    Hello
    I have a requirement where I need to import data from MSSQL Server in Oracle on a daily basis. This will be setup as an automated job.
    The data in MS SQl is stored in two tables that have a relationship much. So tableA 1 of many relationships with tableB. Export data to a text file. each record in the file contains data from both tables and looks like:
    .....
    TableA.col1,TableA.col2, TableB.col2
    The Oracle tables are configured with the same relationship, kind of tableB has a foreign key that needs to be filled with PK. of the tableA two tables have triggers in the sequence.
    So, the two tables must be populated in a SQlldr insert. But has the tableB to tableA PK when filling. I thought create a trigger where tableA is asked about its Pk values and is inserted in the FK to tableB.
    What is the best approach.

    Thank you.

    you will need an intermediate table that will be used at a breakpoint where you load your data in SQL * loader run. then create a procedure that will deal with the lines on the staging table and insert the data of your main table and details, which in this case the partTable and the machineTable.

    +------------+      +--------------+      +--------------------+
    | SQL*Loader |----->| stagingTable |----->| Procedure PartLoad |
    +------------+      +--------------+      +--------------------+
                                                 |             |
                                                 |             |
                                                 |             |
                                                 |             |
                                                 |             |
                                                 V             V
                                           +-----------+ +---------------+
                                           | partTable | | machinceTable |
                                           +-----------+ +---------------+
    
    when processed your tables should have these following rows
    
    stagingTable:
    -------------
    part_number part_desc machine_number
    ----------  --------- --------------
    234         xyz       0098
    234         xyz       0076
    234         xyz       0543
    345         abc       9987
    345         abc       1289
    345         abc       0467
    
    partTable:
    ----------
    itemId part_number part_desc
    ------ ----------- ---------
    1      234         xyz
    2      345         abc
    
    machinceTable:
    --------------
    machineId item_id machine_number
    --------- ------- --------------
    1         1       0098
    2         1       0076
    3         1       0543
    4         2       9987
    5         2       1289
    6         2       0467
    
  • What is the relationship between the library of Photos and the iPhoto library?

    I'm asking this question here because I can't find all the relevant information online.

    I was dealing with imac a client recently who had a full boot drive. I noticed that his old iPhoto library used 126GB while she had already made the transition to the Photos. His photo library said that he was using a lot more (200 + if I remember correctly). I copied the iPhoto on an external drive library and deleted. Then, I opened the contents of the package and imported pictures remains in program pictures to make sure that I wasn't actually remove all of his memories. Once the work is finished, I was surprised to see that there are more than 6 GB of free space on his computer. What gives? Is there a relationship between the old iPhoto library and new photo library? If so, what is it? Is what I did without danger? I understand at the time that she will not be able to return to iPhoto. But what I'm missing?

    Thanks in advance for your comments.

    No - they are totally separate - connection or relationship of any kind is not

    or the other can be deleted without any effect on the other - but it won't save much space at all and is not recommended - which is exactly what you have seen- Photos saves disk space to share images with your iPhoto or Aperture - Apple Support libraries

    LN

  • Inaccessible customer for compliants written relationship

    2 years ago, I bought a Sony KDL - 40 S 4100 LCD TV for 1 700 USD. Now, the screen shows a black vertical bar. The technician of the store came to the conclusion that the screen must be replayced. The cost will be very high and is not profitable to be repaired. I think that such a product must be durable and should last a lot more then 2 years.
    I send the information by e-mail to the Sony Support, because I live in Suriname (outide U.S.). But they said that this Department another team of relationship client Sony is responsible for this case. I ask them to send my email. They responded that this Department has no (strange?) email address. I ask them to send a print to the Department. Then they sent me a link to fill out a form, so customer can remember. This link does not work.
    Now after a week, I couldn't connect with Sony on my broken TV. Why is it impossible to send a written in line with the company. How I have to reach Sony on this case. The TV was bought by a shop in Suriname, who bought at Bestbuy.usa.

    I come back from them and they ask that you please email [email protected] with all your contact information and the number. Quote reference E49029963 number - thank you very much.

  • I keep getting "the trust relationship between this workstation and the primary domain failed" error windows 2008R2

    Hi all

    I appreciate your help. And I hope that this issue has been addressed previously, although I couldn't find any solution there.

    I manage a domain windows 2008 with 3 domain controllers. Recently my workstations continue to fall out of the field. I get "the trust relationship between this workstation and the primary domain failed" to many workstations.

    I know how to fix properly, use netdom.exe. But the mistakes keep coming back. I don't know where to look for the source of this error. A possible problem might be the time in any field is out of sync. But all my workstations synchronize with the domain controller with the primary domain controller role and seems to work correctly.

    Are there other sources, that I need to check? This is getting frustrating.

    Thank you much for the help.

    Sincerely,

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • «Caching of connections from domain to Vista laptop fault for * some * users, which gives the message "failure of the trust relationship «»

    Greetings!

    I have a laptop wireless problem Vista Ultimate on a domain that has a strange behavior when taken off site. Of course, I'd appreciate some thoughts on what could be the problem.

    When the laptop is used internally, it works normally and is used by two people. Person "A" is the main user, person "B" is a secondary user who connects is rare. Domain authentication works normally and thankfully.

    Sometimes, however, when the laptop is taken off site and brought in a different wireless network do not have access to the field, strange behavior of logon follows.

    When the person 'A' tries to connect, they receive two messages:

    "The system event Notification Service failed to logon"

    "The trust relationship between this computer and the primary domain failed."

    Yet moments later, what person 'B' opens a session on the same laptop in the same place, the logon succeeds and the laptop runs normally.

    Presumably, the two openings of session would be finished via the credentials cached, so there is no reason at all to imagine that each account should be treated differently. However, it is precisely the situation that I see. Something is apparently originally person 'A' logon to be handled in an unusual way, I can't explain or stop.

    When this laptop is returned to its primary location, resumed normal operation, all users can perform normal logons domain-based, and no errors occur.

    If it was simply a problem of not being on the same wireless network and by far the field, I expect to see something in the sense of a message «could not domain controller be contacted...» ", but this is never; and he would likely by all users, no not one. It behaves almost as if caching credentials for the person 'A' are corrupt or non-existent, neither of which is logical.

    Other portable computers used by many people (using various combinations of XP, Vista and Windows 7) and taken offsite have * never * experienced this problem. They operated with credentials cached just like you would expect.

    I suppose that a complete reconstruction could solve the problem, but I prefer not to go nuclear on this particular area if it is not necessary. There must be an if explainable, eccentric, the mechanism at work here cause this problem.

    Thank you very much in advance for the help.

    -David

    Hello Soonerdave,

    I apologize for the lack of communication. The appropriate forum for post you in is listed below:

    http://social.technet.Microsoft.com/forums/en-us/itprovistanetworking/threads

    Hope this helps J

    Adam
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Should we leave how much free space on the C drive before affecting the performance and speed?

    Hello!

    Hard drive of my new PC (C) is 1 TB (processor Samsung 7i, Windows 8.1). It doesn't have any other disk/partition. How this space is safe to use to store large files (videos, esp., stored in the native video library file) without harming the performance and speed?

    And if I create another partition (D) and just use it for storage, it will make much difference compared to the above?

    Thank you!

    Anna

    Sunday, March 1, 2015 10:59 + 0000, AnaFilipaLopes wrote:

    And if I create another partition (D) and just use it for storage, it will make much difference compared to the above?

    Planning your Partitions

    The Question

    Partitions, how much should I have on my hard drive, what do I use
    each of them for, and what size should each one be?

    It s a common question, but unfortunately this doesn t have a
    only simple, just answer to all the world. A lot of people will respond with
    the way they do, but their response isn't necessarily best for the
    person seeking (in many cases it isn't right even for the person)
    response).

    Terminology

    First, let's rethinking the terminology. Some people ask "should I".
    partition my drive? That s the wrong question, because the
    the terminology is a little strange. Some people think that the word
    "partition" means divide the drive into two or more partitions.
    That s not correct: to partition a drive is to create one or several
    partitions on it. You must have at least one partition to use
    He who think they have an unpartitioned disk actually
    have a player with only one partition on it and it s normally
    Called C:. The choice you have is to have more than one
    partition, not that it's the partition at all.

    A bit of history

    Back before Windows 95 OEM Service Release 2 (also known as Windows
    95 (b) was published in 1996, all MS-DOS and Windows hard drives have been set
    using the file system FAT16 (except for very tiny to aid
    FAT12). That 16-bit only because were used for addressing, FAT16 has a
    maximum 2 GB partition size.

    More than 2 GB of hard disks were rare at the time, but if you had
    one, you must have multiple partitions to use all the available
    space. But even if your drive was not larger than 2GB, FAT16 created
    Another serious problem for many people - the size of the cluster has been
    more great if you had a larger partition. Cluster sizes increased from 512
    bytes for a partition to no greater than32Mb all the way up to 32 KB for a
    partition of 1 GB or more.

    More the cluster size, the space more is wasted on a hard drive.
    That s as space for all the files is allocated in whole clusters
    only. If you have 32 KB clusters, a 1 byte file takes 32 KB, a file, a
    greater than 32 k byte takes 64 k and so on. On average, each file
    about half of his last group waste.

    If large partitions create a lot of waste (called "soft"). With a 2 GB
    FAT16 drive in a single cluster, if you have 10,000 files, each
    lose half a cluster of 32 KB, you lose about 160 MB for relationships. This s
    back in an important part of a player that probably cost more than $400
    1996 - around $ 32.

    So what did the people? They divided their 2 GB drive in two,
    three or more logical drives. Each of these logical drives has been
    smaller the real physical disk, had smaller clusters, and
    so less waste. If, for example, she was able to keep all the partitions
    less than 512 MB, cluster size was only 8 KB, and the loss was reduced to a
    a quarter of what it would be otherwise.

    People partitioned for other reasons also, but back in the days of
    FAT16, it was the main reason to do so.

    The present

    Three things have changed radically since 1996:

    1. the FAT32 and NTFS file systems came along, allowing a larger
    partitions with smaller clusters and so much less waste. In
    with NTFS, cluster sizes are 4 K, regardless of the size of the partition.

    2 hard drives have become much larger, often more than 1 TB (1000 GB) in
    size.

    3 hard drives have become much cheaper. For example, a 500 GB drive
    can be bought today for about $50. That s 250 times the size of this
    Player 2Gb typical 1996, about one-eighth of the price.

    What these things mean together which is the reason to be old to have
    multiple partitions to avoid the considerable wastage of disk space left.
    The amount of waste is much less than it used to be and the cost of
    that waste is much less. For all practical purposes, almost nobody does
    should no longer be concerned about slack, and it should no longer be
    has examined when planning your partition structure.

    What Partitions are used for today

    There are a variety of different ways people put in place several
    scores of these days. Some of these uses are reasonable, some are
    debatable, some are downright bad. I'll discuss a number of Commons
    partition types in the following:

    1. a partition for Windows only

    Most of the people who create such a partition are because they believe
    If they never have to reinstall Windows properly, at least they
    He won t lose their data and he won t have to reinstall their applications.
    because both are safe on other partitions.

    The first of these thoughts is a false comfort and the second
    is downright bad. See the analysis of the types of partition 2 and 4
    below to find out why.

    Also note that over the years, a lot of people who find their windows
    partition that has begun to be the right size proves to be too
    small. For example, if you have such a partition for Windows and later
    upgrade to a newer version of Windows, you may find that your Windows
    partition is too small.

    2. a partition for installed programs

    This normally goes hand in hand with the partition type 1, a partition for
    just Windows. The thought that if you reinstall Windows, your
    installed application programs are safe if they are in another
    partitions is simply not true. That s because all programs installed
    (with the exception of an occasional trivial) have pointers to the inside
    Windows, in the registry and elsewhere, as well as associated files
    buried in the Windows folder. So if Windows, pointers and
    the files go with it. Given that the programs need to be reinstalled if Windows
    the fact, this reasoning to a separate partition for programs not
    work. In fact, there is almost never a good reason to separate
    Windows of the software application into separate partitions.

    3. a partition for the pagefile.

    Some people think mistakenly that the pagefile on another
    score will improve performance. It is also false; It doesn t
    help and often I hurt, performance, because it increases the movement of the head
    to get back to the page to another file frequently used
    data on the disk. For best performance, the paging file should normally
    be on the most widely used score of less used physical player. For
    almost everyone with a single physical disk than the same drive s
    Windows is on C:.

    4. a partition for backup for other partitions.

    Some people make a separate partition to store backups of their other
    or partitions. People who rely on a "backup" are a joke
    themselves. It is only very slightly better than no backup at all.
    because it leaves you likely to be simultaneously the original losses
    and backup for many of the most common dangers: the head crashes and other
    types of drive, serious glitches to power failure, near lightning
    strikes, virus attack, even stolen computer.  In my opinion,.
    secure backup must be on a media removable and not stored in the
    computer.

    5. a partition for data files

    Above, when I discussed separate Windows on a clean partition,
    I pointed out that separate data from Windows is a false comfort if
    He of done with the idea that data will be safe if Windows ever
    must be reinstalled. I call it a false comfort that's because
    I'm afraid many people will rely on this separation, think that their
    data are safe there and so do not take measures to
    Back it up. In truth the data is not safe there. Having to reinstall
    Windows is just one of the dangers to someone a s hard disk and not
    probably even one. This kind of "backup" falls into the same
    category, as a backup to other partitions partition; It lets you
    sensitive to the simultaneous loss of the original and the backup on many of
    the most common dangers that affect the entire physical disk, not
    just the particular partition. Security comes from a solid backup
    diet, not how partition you.

    However, for some people, it may be a good idea to separate Windows and
    programs on the one hand of the data on the other, putting each of the
    two types into separate partitions. I think that most people
    partitioning scheme must be based on their backup system and backup
    plans are generally of two types: whole hard disk imaging
    or data only backup. If you back up data, backup is
    usually facilitated by the presence of a separate with data only partition;
    to save just the score easily, without having to
    collect pieces from here and elsewhere. However, for
    those who backup by creating an image of the entire disk, there is
    usually little, if any, benefit the separation of data in a partition of
    its own.

    Furthermore, in all honesty, I must point out that there are many
    very respected people who recommend a separate partition for Windows,
    Whatever your backup plan.  Their arguments haven t convinced
    me, but there are clearly two views different here.

    6. a partition to image files

    Some people like to deal with the images and videos as something separate
    other data files and create a separate partition for them. To my
    the spirit, an image is simply another type of data and there is no
    the advantage in doing so.

    7. a partition for music files.

    The comments above related to the image files also apply to music
    files. They are just another type of data and must be dealt with the
    just like the other data.

    8. a partition for a second operating system to dual-boot to.

    For those who manage several operating systems (Windows Vista, Windows
    XP, Windows 98, Linux, etc.), a separate partition for each operating
    system is essential. The problems here are beyond the scope of this
    discussion, but simply to note that I have no objection to s
    all these partitions

    Performance

    Some people have several partitions because they believe that it
    somehow improves performance. That s not correct. The effect is
    probably low on modern computers with modern hard disks, but if
    whatever it is, the opposite is true: more music mean poorer
    performance. That's because normally no partition is full and it
    so are gaps between them. It takes time for the drive s
    read/write heads to cross these gaps. Close all files
    are, faster access to them will be.

    Organization

    I think a lot of people overpartition because they use scores as a
    organizational structure. They have a keen sense of order and you want to
    to separate the apples from the oranges on their readers.

    Yes, separating the different types of files on partitions is a
    technical organization, but then is to separate different types of
    files in folders. The difference is that the walls are static and
    fixed in size, while the files are dynamic, changing size automatically
    as needed to meet your changing needs. This usually done records
    a much better way to organize, in my opinion.

    Certainly, partitions can be resized when necessary, but except with the latter
    versions of Windows, which requires a third-party software (the and the
    possibility to do so in Windows is primitive compared to the third-party
    solutions). These third party software normally costs money and not
    any point and how stable it is, affects the entire disk.
    with the risk of losing everything. Plan your partitions in
    first place and repartitioning, none will be necessary.  The need
    to repartition usually occurs as a result of overpartitioning in
    the first place.

    What often happens when people organize with partitions instead
    records are that they make a miscalculation of how much room they need on each
    This partition, and then when they run out of space on the partition
    When a file is logically, while having plenty of space
    on the other hand, they simply saving the file in the score of "poor".
    Paradoxically, therefore, results in this kind of score structure
    less organization rather than more.

    So how should I partition my drive

    If you read what came before, my findings will not come as a
    surprise:

    1. If your backup set is the image of the entire disk, have just one
    single (usually c partition :));

    2. If you backups just data, have two partitions one for Windows and
    application programs installed (usually c :)), the other for data
    (normally D :).)

    With the exception of multiple operating systems, it is rarely
    any advantage to have more than two partitions.

  • deduct the entity combined with a relationship

    Hello

    I have a list of countries and a much larger list of cities, each containing a reference to the country that it is. Both lists are available in Excel.

    In an interview, I need the user to select a country, after which I want to reason based on the information of all the cities in that country.

    Because I don't want seeds before the interview with all this information, I would like to deduct from the country, as well as all the cities inside.

    My datamodel looks like:

    Global

    all instances of the country (= relationship)

    the country (= entity)

    all instances of the city in the country (= relationship)

    the city

    As a general rule, I would need:

    InferInstance (all instances of the country selected)

    All the properties in the country could come from the Excel sheet, which works very well. However, now I need to deduce an instance of 'city' for every city in the country that is inferred. Is there a way to do this?

    Any help is very appreciated!

    Thank you!

    Unfortunately it is not possible to deduce the entity instances in the Excel rules. Several entities must be created in MS Word table rules.

  • How to create the column of the table for long-form Master detail relationship

    Apex 4.1

    Oracle 11g

    I created a form master detail and see the main table hotel_list and table hotel_mapping as detailed below.

    Hotel_list

    ID HOTEL_NAME

    1 Holiday Inn

    Hotel Hilton 2

    Hotel_mapping

    ID HOTEL_NAME MAPPING_NAME

    1 Inn Holiday Inn Select hotel

    2 holiday hotel Holiday Inn Select

    3 hotel Holiday Inn Holiday Inn Hotel

    4 Hilton Hotel Hilton Hotel chain

    Hotel Hilton 5 HiltonHotel

    Table Hotel_name Hotel_list is a linked table Hotel_mapping

    When I add a line to the Hotel_mapping table for the selected row in the hotel_list table, mapping_name of column is null, therefore impossible to create the relationship between the main table and the secondary table.

    I would like to know, how to create the relationship?

    Thank you very much

    Best regards

    Yong Huang,

    simple step see creating a form detailed master with APEX - Assistant Master retail

    and check how to maintain the relationship between two tables,

    simple return the packaged application «Sample of Masters details»

    and try to understand this concept...

    In your example, use Hotel_list.ID as a foreign key in the table Hotel_mapping

    and maintain the relationship with the column ID...

    and choose the display type of the column Hotel_list.ID in table Hotel_mapping as List(Query Based LOV) select.

    otherwise the best way is to create sample on oracle.apex.com

    I hope this helps...

    Leave.

  • How to implement many of many relationships?

    I've been google searching for articles on the implementation of many-to-many relationships and find as many hits I'm swamped.
    Someone at - he preferred an article on this topic?

    In my example, I have a number to-many between the table 'user' and 'project' of the table.
    Why do some articles indicate that the primary key of the table of links 'UserProject' contains two foreign keys for 'user' and 'project '? If we want to find all projects for a given "user.id", we not specifying the "project.id". It will not be reduced in a linear search then?

    I thought we should receive the 'fk_user' foreign key as the primary key and create an index of the "fk_project" (or vice versa). So if we specify the "user.id" we can quickly find all the corresponding values of 'project.id '.

    There are oracle-specific issues I should know about?

    Thank you
    Siegfried

    As you guessed, a primary key is intended to preserve the unique character.
    If you have a composite primary key, so if you provide columns in the predicate (where clause) that are the primary key columns, then they can help you with an effective search.

    If you have a requirement that you have aquery that always uses the 2nd and 3rd in the columns of the primary key, but never the first column, then you might want to add a composite index on these two columns.

    Remove the referential integrity of a production database is pretty much one of the worst things you can do.
    Think about the consequences: you'll have records of children who do not have a parent record or worse have the incorrect parent record. It is best to not leave a record get in the database to allow incorrect data.

    Incorrect data are a nightmare to fix, as its very difficult to find the source, and worse still, it can remain unnoticed for years.

    Your mantra should be to avoid bad data in the database. This by applying constraints at the level of the database.
    This means that all data entered with conform to these rules.

  • API calls for relationships ' point, manufacturer part number...

    Hi all

    We create elements of EBS by using EGO_ITEM_PUB. PROCESS_ITEM from outside the EBS. Now, we want to maintain the following data for positions:

    -Article relationships
    -Manufacturer part number
    -Corss reference

    All these are available under 'Tools' in the menu of the form main element.

    Do you know if there are ready to use of the available API calls?

    Thank you very much

    Konrad

    Hi Konrad;

    Please see the bulletin:
    FAQ: Planning of the details in the relationship of the Item [ID 1428310.1]
    Is there an open Interface or an API to import and maintain point relations [296300.1 ID]
    A public list of API for Master Item [ID 395493.1]

    Respect of
    HELIOS

  • With a many to many relationship data in a table - recursive sql?

    Hello
    I'm trying to group data associated with a many to many relationships in a number of unique group using SQL only. The table looks like this.

    AMOUNT OF THE CHECK PLAN

    1 10
    A 15 2
    2 11 B
    3 12 B
    4 13 B
    4 16 C
    5 17 D

    The result should look like this. Since A is linked to 2, 1 and 2 correspond to the B and B are related to 3 and 4, 4 is related to C, these lines should be considered as a group. Any direction on where I should start looking for or if there is no function of Oracle that will be much appreciated. The version of oracle's 10g.

    CHECK THE PLAN AMOUNT GROUPID

    1-10-1
    2-15-1
    2 11 1 B
    3 12 1 B
    1 13 4 B
    4-16-1 C
    5 17 2 D



    CREATE THE TABLE PAS_DBA. GRPDEL
    (
    CHECKID VARCHAR2 (5 BYTE),
    PLAN OF INTEGER,
    AMOUNT NUMBER (6.2)
    );

    TOGETHER TO DEFINE
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ('A', 1, 10);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ('A', 2, 15);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ("B", 2, 11);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ("B", 3, 12);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ("B", 4, 13);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    ("C", 4, 16);
    Insert into PAS_DBA. GRPDEL
    (CHECKID, PLAN, SUM)
    Values
    (A ', 5, 17);
    COMMIT;

    Hello

    Good thing you're uisng Oracle 10. I don't think you could do this in pure SQL using any earlier version, but the CONNECT BY NOCYCLE feature, introduced in Oracle 10, makes this possible.

    WITH     got_groupname     AS
    (
         SELECT     checkid, plan, amount
         ,     MIN (CONNECT_BY_ROOT checkid)     AS groupname
         FROM     grpdel
         CONNECT BY NOCYCLE     (     checkid     =  PRIOR checkid
                           AND     plan     != PRIOR plan
                        )
                   OR     (     checkid != PRIOR checkid
                        AND     plan     =  PRIOR plan
                        )
         GROUP BY  checkid, plan, amount
    )
    SELECT       g.*
    ,       DENSE_RANK () OVER (ORDER BY groupname)     groupid
    FROM       got_groupname      g
    ORDER BY  checkid
    ,            plan
    ;
    

    Output:

    CHECK PLAN AMOUNT GROUPNAME GROUPID
    ----- ---- ------ --------- -------
    A        1     10 A               1
    A        2     15 A               1
    B        2     11 A               1
    B        3     12 A               1
    B        4     13 A               1
    C        4     16 A               1
    D        5     17 D               2
    

    You did not ask the groupname column, but I realized just to help show how it works. The subquery got_groupname associates each checkid with each other the checkid, regardless how many not deleted the two lines are. MIN finds the lowest checkid that each is bound, which generates a unique group identifier. Personally, I sould like usage of groupname as identifier. It tells you in the blink of an eye that B is a member of the same group has. However, it is not the same as that of a certain number, so if you need a number, you can derive from groupname with the analytical DENSE_RANK function.
    In many versions of Oracle, CONNECT BY queries do not work properly if they contain functions analyric. I don't know if this is the case in your version, but I don't think it's worth taking a chance. By CONNECT BY in a subquery no analytical function and then by the analytical function in a super-requete, we eliminate any chance of such a conflict.

    Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.
    You want to be more useful? Do not publish the name of schema, PAS_DBA. Not many people who want to help you have a schema called PAS_DBA, and they probably won't create a. He probably doesn't. ' t help, either; probably, you connect PAS_DBA to create the table in any case.

  • Best structure for a master/detail relationship?

    Hello

    I would like to get some expert advice on the best architecture Oracle 11 g for a fairly simple storage situation: I have a table in a data warehouse with millions of records added every day. Each record can be associated with a (99.9% of the cases) or, more rarely, many under folders (up to 3 or 4).

    (1) the natural relational approach would require a relationship of the master / detail, with a key shared between the two tables. Some questions in the case:
    -Here, what would be the best structure? Because its lines are going to be quite small, the child table should probably be a table index. But consider a cluster?
    -Also what key will be used in the relationship? Master records are never accessible using full table scan, so that they have no primary key or an index. Is it possible to avoid creating a surrogate key only for reasons to join the master and detail tables, for example, by using a rowid any?

    (2) another reasonable approach, it seems, would be to use a nested table structure to store the detail records.
    -Is an interesting solution? It seems that he avoids the need for a surrogate key and looks "natural way" of doing things. But generally people seem not very keen on this feature, perhaps because of the lack of knowledge?
    -In this case, would it still possible to scan detailed records using pure SQL, as you would with a join in case 1?

    (3) although I have not yet studied the pb in detail, it seems that the right tools to populate two tables at the same time external tables would be to use PIPELINE and PL/SQL FORALL constructs, can anyone confirm?

    Thanks for your help,
    Chris

    In an environment of DW, things are generally modeled according to the fact dimension. The fact table would hold everything 'measurable' is a fact (in your case a call). It would be things like the date and time of the call, duration, charges total, possibly local/long distance/overseas etc. The dimension tables would provide additional information to the call and solve research etc. For example, you might have a date dimension which had every day, the year, month, day of the year, quarter, fiscal quarter (in my organization, they differ and we report both for different reasons) etc. You have also a time dimension indicating if the time if the call was during the day, evening, night, etc., depending on how you define them.

    Of course, all of this really depends on the types of questions you want to ask questions about the data you have.

    I'd be inclined to model along the lines of (note I guess anum and bnum are something like departure and destination phone numbers):

    CREATE TABLE calls (
       Call_Id      INTEGER PRIMARY KEY, -- this comes from a sequence
       Anum_key     NUMBER REFERENCES call_numbers,
       Bnum_key     NUMBER REFERENCES call_numbers,
       charging_key NUMBER REFERENCES charging
       Duration     NUMBER,
       charge       NUMBER,
       call_count   NUMBER);
    
    CREATE TABLE call_numbers (
       number_key    INTEGER PRIMARY KEY,
       phone_number  VARCHAR2(50),
       area_code?    VARCHAR2(50),
       country_code? VARCHAR2(50));
    
    CREATE TABLE charging (
       charging_key         INTEGER NOT NULL CHECK (counter BETWEEN 1 AND 19 or counter = -1),
       counter_description  VARCHAR2(50));
    

    with a line of calls for each combination of meter that must be loaded. The ETL code would assing a call unloaded (i.e. your first scenario a charge_key-1), and depending on how you want to count calls, 1 or 0 for call_count. For your second scenario, County of appeal would be 1 for the single record for this call. For the third scenario I would, more or less arbitrarily (i.e., max or min amount/meter) assign 1 in one of the recordings and 0 for the rest (which implies that even if the cost of a call to several counters, it's still only 1 call).
    Thus, in light of your three specimen he would look like:

    calls
    ID   Anum   Bnum   chg   Dur   amount   count
     1      1      2    -1     0        0       1
     2      3      2     1     2      610       1
     3      4      5     1     3      240       1
     4      5      6     6     3      520       0
    
    call_number
    key   number
    1     123456
    2     234567
    3     987655
    4     545678
    5     435467
    6     986234
    
    charging
    key   descr
    -1    Unanswered
     1    Counter 1
     2    Counter 2
     ...
    19    counter 19
    

    So, how many call where there?

    SELECT SUM(call_count) FROM calls WHERE ... 
    

    How much do we chanrge?

    SELECT SUM(charge_amt) FROM calls WHERE ... 
    

    How long they spoke?

    SELECT SUM(duration) FROM calls WHERE call_count = 1 and ... 
    

    How much we took in counter 6:

    SELECT SUM(charge_amt) FROM calls WHERE charging_key = 6 and... 
    

    How long was the 6 meter?

    SELECT SUM(duration) FROM calls WHERE charging_key = 6 and ... 
    

    As I said before, I'm not really fan of tables nested in the columns. :-)

    John

  • Relationship between these tables 3 interface

    Hi guys am new to EBS and m trying to get /API knlowledge Tables Interface of the inventory.
    Please told me

    1 MTL_TRANSACTION_INTERFACE
    2 MTL_TRANSACTION_LOTS_INTERFACE
    3 MTL_TRANSACTON_NUMBERS_INTERFACE

    What is the relationship of these 3 tables?
    What is the use of table 2.3 and why they made 1 correspondence?
    What are the base tables on the 1 interface tables. ?

    Kind regards
    Shakeel khan

    For all transactions you're trying to interface, you enter one record mtl_transactions_interface.

    If the item you are trying to interface is controlled series, you must enter records in the mtl_serial_numbers interface. If there are several related series that operations (If quantity > 1) then you will have multiple records.
    Similarly, if the item is very much controlled, you will enter records in the mtl_lot_numbers_interface.

    You attach all by the transaction_interface_id column.

    Hope that answers your question
    Sandeep Gandhi
    Independent consultant
    513-325-9026.

  • Maker of SQL data - how to create the foreign key in the relationship 1 to 1?

    Hi guys...

    I had 2 tables...

    Table 1 - CFR
    -----------------------
    CFR_ID = primary key


    Table 2 - USER_PLAN
    ----------------------------
    User_id = primary key
    PLAN_ID ARGUMENT,
    CFR_ID = reference foreign key (table 1)


    Business flow go like this...
    table insdie CFR, it contains all the documents / transactions of a particular plan user. each time a new transaction occurs for a plan/user, a new CFR_ID / row will be generated.
    After that, the newly generated for the new line, CFR_ID will be updated to the CFR_ID in USER_PLAN


    Thus, there is always a 1 to 1 relationship between table 2, no matter how much CFR_ID is generated for a particular USER_PLAN. as the CFR_ID in the USEr_plan table will always be the last being produced within the table of the CFR.


    However, in the Data Modeler, I am unable to create this foreign key relationship... NO idea how create a 1 on 1 relationship of foreign key? or there is no way...


    Thank you and best regards,
    Noob

    Hey Noob,

    Yes, that's correct.

    Best regards
    Philippe

Maybe you are looking for