Question from beginner on the fusion of the Recrords in the Table

This question is about question 10-b of merger on page 3-41, it says:
(page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")

Merge the data into the EMP_DATA table that is created in the lab last in the data in the table emp_hist. assume
EMP_DATA external table data corresponds to the EMP_HIST of table, update the email column
table EMP_HIST to match the row in the EMP_DATA table. If a row in the EMP_DATA table is not
match, to be inserted in the tables of EMP_HIST lines are considered as corresponding whenever his first and
family name are the same.

For me, this issue is built wrong. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
Thirdly, this question asks us to merge into the table EMP_HIST while EMP_DATA is empty.

Table EMP_HIST currently copied data from the employees table. Structure EMP_HIST:

FIRST NAME VARCHAR2 (20)
LAST_NAME NOT NULL VARCHAR2 (25)
EMAIL NOT NULL VARCHAR2 (45)

EMP_DATA table is empty. I created it as follows:

create or replace directory emp_dir
like 'F:\emp_dir ';

drop table emp_data;

CREATE TABLE emp_data
(first name VARCHAR2 (20))
, last_name VARCHAR2 (20)
, email VARCHAR2 (30)
)
EXTERNAL ORGANIZATION
(
TYPE oracle_loader
Emp_dir default DIRECTORY
ACCESS SETTINGS
(
RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
NOBADFILE
NOLOGFILE
FIELDS
(first name POSITION (01:20) TANK)
, last_name POSITION (22:41) TANK
CHAR POSITION (43:72) by email)
)
LOCATION ('emp.dat'));

Back to our question, I've done the merger as follows:

merge into e emp_hist
with the help of emp_data d
on (e.first_name = d.first_name)
When matched then
game update
Select = d.last_name,
e.email = d.email
When not matched then
Insert values (d.first_name, d.last_name, d.email);

I get this error:

Error report:
SQL error: ORA-29913: error in executing ODCIEXTTABLEOPEN legend
ORA-29400: data cartridge error
KUP-04040: file emp.dat in EMP_DIR not found
ORA-06512: at "SYS." ORACLE_LOADER', line 19
29913 00000 - "error in the execution of %s legend".
* Cause: The execution of the specified legend caused an error.
* Action: Examine the error messages take appropriate measures.

On the other hand, I said I'm going to try this:

merge into emp_data d
using e emp_hist
on (d.first_name = e.first_name)
When matched then
game update
d.last_name = select,
d.email = e.email
When not matched then
Insert values (e.first_name, select, e.email);

I get this error because the external table's final after its creation (no update, insert, delete authorized) as far as I know:

Error report:
SQL error: ORA-30657: operation not supported on external organized table
30657.0000 - "operation not supported on external-organized table".
* Cause: User attempted on the operation on an external table which is
not supported.
* Action: Don't do that!

**********************************

I don't know what to do. I did my best, please help.

What happens if I want to import large data set in the external table?

Hmm, external table is just a definition on how you want to watch a file as a table in the database. Think of it as a tool to import data.

1. first of all, have a ready file (with data).

2. create an external table using the format of the file.

3. now you should be able to see the data when you do this. Select * from my_external_table.

4. now, create an ordinary table where you want the data to insert permanently.

5 insert into permanent_table select * from my_external_table.

I hope this helps.

Tags: Database

Similar Questions

  • Question from beginner on the installation of 1.5 on the new machine

    I signed up for an account of creative cloud when Edge animate 1.0 came out and installed it on my laptop.  I finally set aside some time to learn the software, but now I have a laptop better, new.

    It was my understanding at the time, and I read about this recently too, Adobe was kind enough to offer versions 1.0 and 1.5 indefinitely for free.

    My problem is that I can't install the software on my new laptop.  I found links for the Adobe Application Manager and the people who say that you can get there.  But when I opened MAO there is no option to download the software.  I also installed the Creative Cloud software, but can't download 1.5 there either, only the 30-day trial version (not what I was looking for).

    I was hoping to get one that will work indefinitely to version 1.5 as I had already, on my new computer (except that I actually 1.0 on my old computer).

    Any tips?

    I apologize if this has already been covered, I searched extensively through the forums to see if there was already an answer to my question.

    Hi, Jason.

    I want to clarify that we do not offer 1.0 and 1.5 indefinitely for free; We offer 1.x in a perpetual license for a promotional price of free.  The first statement implies that we will always offer 1.5, no matter what happens with the HTML world.  The means of this last once you download 1.x, we expire not the version you download.  I just wanted to clarify your statement.

    Thank you

    -Elaine

  • Question from beginner on the fields

    I just get in Java and make while working on my own Blackberry App.  I have intermediate experience with PHP/MySQL, so I'm not new to coding in general.  Just the specific Java/Blackberry and API.

    I have try this looking for an API reference, but could not find.  Mainly because I'm not used to look at the Java API, nor have I never really worked with a prior API.

    I need to create a field that allows the user to select a folder on the SD card.  How to do this?  Does not have the correct code (but would be great).  Just point me to the right methods.

    I guess I'll need to have an empty text field.  Then, have a button that calls a file browser that will fill my text field?  Don't I have that right?

    Any help would be great.  Feel free to talk to me like I'm 5.

    If you take a look at the sample of Blackberry (which are supplied with the JDE) progams you will find a demo called FileExplorerDemo program. It does exactly what you ask, and should make a fine starting point.

  • Question from beginner on the involuntary noise reduction

    Hello.

    I noticed that when I export a multitrack mix in an mp3 file, the new mp3 file are a little quieter than the original sound files, I used. I did a simple experiment and little confirmed this, so I know that's not just my ears playing tricks on me.

    sound_example.jpg

    What I did I took a random mp3 file of the song, he fell into the track 1, has absolutely no editing on it and it has exported (file > export > multitrack mixer > entire Session) as another mp3 with a different name. Then, I took this newly exported mp3 and it fell in track 2. If you look at their waveform, route 2A 'short lines' in his wave form throughout all the song, which, for me, means that the sound is "less strong."

    Seriously, I have no editing before exporting it. I don't turn down the dB on each track. When I exported, I adapted the same sample rate/Bit depth/kb/s as the original mp3. The only difference I see is that the format of the original mp3 source said 'mp3 320 Kbps CBR', and the newly exported mp3 said "MP3 320 Kbps CBR OFL.

    I don't know if that's the reason, but I guess that's not.

    So why does this happen? Could it be "fixed" if I simply go to the dB on the channel 2? Or have I really lost audio quality after exporting?

    Help, please

    StormCloudSeven wrote:

    So why does this happen? Could it be "fixed" if I simply go to the dB on the channel 2? Or have I really lost audio quality after exporting?

    It is caused by the right multitrack pan setting (go to Preferences > multitrack). If you choose the left/logarithmic parameter instead of - 3dB Center, your file will export to a level identical to one you already have.

  • Three Questions from beginner to Captivate 3

    Adobe Captivate 3.

    I have three questions from beginner to Adobe Captivate 3.

    1. I noticed that CP3 only creates SWF files.  Why not offer the possibility to create an FLV file in the final product?  What is the difference between a SWF file and a FLV?

    2. I want my finished product for a single slide with a picture in the background and some areas of reversal.  It seems that no matter what I do, the blade is not fixed, but faints and disappears after the default time of 3.3 seconds.  How can I achieve making the slide remains in place, not disappear, and behave as I want?

    3. I want to do a slide that has a video autoplay Flash on it (this part I know how to do), but I want the slide to move to another slide specified when the video ends, without user action.  How can I do?

    Thanks to anyone who can help me on these issues.

    Hello

    Doug chaplain wrote:

    Adobe Captivate 3.

    I have three questions from beginner to Adobe Captivate 3.

    1. I noticed that CP3 only creates SWF files.  Why not offer the possibility to create an FLV file in the final product?  What is the difference between a SWF file and a FLV?

    CP3 does not FLV because it was not part of the specification for CP3. I don't know why it is like that. Maybe the Captivate development team knows for sure. In any case, Captivate 5 was recently released. If the point is little questionable, right?

    Regarding the second part of this question, SWF can have interactivity such as bearings or clickable areas or buttons that perform different actions. FLV is usually just a video, just like a DVD movie that you watch passively, and you do not participate.

    2. I want my finished product for a single slide with a picture in the background and some areas of reversal.  It seems that no matter what I do, the blade is not fixed, but faints and disappears after the default time of 3.3 seconds.  How can I achieve making the slide remains in place, not disappear, and behave as I want.

    You can get there. Just insert a click box and time it so it suspends the slide at the right time.

    3. I want to do a slide that has a video autoplay Flash on it (this part I know how to do), but I want the slide to move to another slide specified when the video ends, without user action.  How can I do?

    So now you change course on us? You said to question 2 you want the finished product is a single slide! This is perhaps another project, you're talking about.

    If you examine the properties of the slide, you will discover a labeled area of Navigation. Using this box, you can choose to navigate to another slide when it finishes playing.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcererStone blog

    Captivate eBooks

  • How to insert image from mysql into the table using php and create the checkbox in the table?

    How can I insert image from mysql into the table using php and create the checkbox for each data as a vote? Here is my code...

    WELCOME

    connect_error) {die ("connection failed:".)} $conn-> connect_error); } $sql = "SELECT no, Calon, ID, of course, the Image OF THE candidates." $result = $conn-> Query; If ($resultat-> num_rows > 0) {echo ' '; export data of each line while ($row = $result-> fetch_assoc()) {"echo"}}
    NO Candidate INFO Vote
    " . $row ["no"]. "-" . $row ["Calon"]. "
    -" . $row ['ID']. "
    -" . $row ['class']. "
    "; } ECHO ' ' ;} else {echo '0 results' ;} $conn-> close();?} >

    hope someone can help me because I am a newbie in this program... need to finish this project... Thank you.

    If you have saved the file name in the database, it's pretty simple.

    echo '' . $row['description'] . '';
    

    Is the same for the box:

    echo '';
    

    If you have saved the image file in the database, it is much more complicated. I recommend you store only the file name in the database.

  • LOV opened from column in the table always showing only 25 records

    Hello. I'm on Jdev 11 g R1.

    I have main VO with an attribute with LOV (entry LOV). The LOV VO defined in tuning as 'all lines' and range is set to-1

    Main LOV fell into the page and column is made in the form of entry-level LOV as expected. Everything works ok.

    But when I opened the LOV is showing 25 records. I have to scroll to the end and click on the button "Search" once again to see the rest of the records (total 48). It shows not all records and scrolls automatically when I start to scroll down, but stops at 25 records.

    I can't change the size of the beach of LOV since it is located in the table, so there is no access to the iterator LOV.

    How can I force LOV to see all records?

    As far as I KNOW, there is a bug in 11.1.2.x (and if you have a support contract, you can request the fix for it)

    Also associated with R1: list of input values does not fetch all records of documents only 25 are read

    Dario

  • Question: adding prefixes to the table of contents chapter entries?

    Hello I would like to know if anyone can help understand me how to format Table of contents entries to include a prefix.

    I want to each chapter entry in my table of contents to include the prefixes of words Chapter 1, Chapter 2... etc.

    For example. Just to say that my first chapter is called "aseptic".

    Currently the aseptic 'A technical' chapter title is formatted with a paragraph style called "chapter title", and this paragraph style is included in the "Styles of Table of contents.

    So for the moment my OCD simply shows the words "One Technique aseptic" followed by the page number.

    I want that entry of table of contents to say: "Chapter 1 asepsis.

    But I don't want the words "Chapter 1" to appear on the title page of actual chapter. "»

    Also, I want to be able to add unique style to the prefixes (I guess with character styles). So that I can make the "Chapter 1"style a little differently to "Aseptic", while both appear on the same line.

    Is it possible to do? I know that I can just click on the table of contents, and then make the changes directly, but it's not ideal because if I click on "update the Table of contents" then all changes are lost. I want the added prefixes dynamically so that they remain in place even if chapter headings are changed in the future.

    Thanks for any help.

    Of course, I see no problem:

  • Find/change the question numbers and create the Table of contents

    Hello! I need help to find all my item numbers and apply a paragraph style so I can use them to create a Table of contents page.

    The sample numbers

    #12345

    #12345-5

    #12345-20

    #12345-ABC

    #12345/N

    I tried to enter #^? ^ ? ^ ? ^ ? ^ ? in the search/replace and but it is exactly 5 characters after the sign #. I wonder if you can find all characters starting by # and up until the last characters.

    Once I found all item numbers, how can I apply the paragraph style to have these characters after the sign #? Because I only want to show item numbers without the # sign on the Table of contents/Index page.

    In addition, I have InDesign CS2, which have no function GREP maybe I can do this without the GREP?

    I really appreciate any help. Thank you very much.

    Are your numbers by themselves in a separate paragraph? OTHERWISE you can not USE the table of contents feature to list all the numbers.

    If are, then just look at # in find/replace, then set it to change formatting a new paragraph style (you must create this style in CS2) that you want to include in the table of contents, then as you say, you can use find/replace once more on the history of the TOC to remove the # of all numbers.

  • Help with script from beginner to the data store and hard drives

    Hello

    I am quite new to scripting, and recently, I created a monstrosity below.

    The problem is with the results. I have no idea why in the results I get the name of the virtual machine and its data store over and over again until all disks are highlighted.

    Any help will be very very much appreciated.

    The script:

    $raport = @)

    Foreach ($i in (Get-Content "Y:\vms.txt"))

    {

    $rekord = «»

    $vm = get-vm-name '$i '.

    $dysk1 = $vm | Get-hard drive | where {$_.} Name - eq 'Disk 1'}

    $datastore1 = $dysk1.filename.split("]") [0].split("[") [1]

    $disks = $vm | Get-hard drive

    {foreach ($disk in $disks)

    $hd = «»

    $disksize = ($disk. CapacityGB)

    $hd += $disksize

    {$rekord += $vm.name + ";" + $datastore1 + ";" + $hd}

    $raport += $rekord

    }

    $raport | out-file 'Y:\dyski.csv '.

    The results in csv:

    VM1Name; datastoreName; 60; VM1Name:datastoreName; 50; VM1Name; datastoreName; 40

    VM2Name; datastoreName; 45; VM2Name; datastoreName; 40

    The results of dream in csv:

    VM1Name; datastoreName; 60; 50 40

    VM2Name; datastoreName; 45 40

    etc.

    Try like this

    $raport = @)

    Foreach ($i in (Get-Content "Y:\vms.txt"))

    {

    $rekord = «»

    $vm = get-vm-name '$i '.

    $disk = $vm | Get-hard drive

    $datastore = ($disk | where {$_.}) Name - eq "disk 1" hard}).filename.split ("]") [0].split("[") [1].

    $rekord = "$($vm.)". The name); $($datastore); $(($disk | sélectionnez-ExpandProperty CapacityGB)-join ' |') »

    $raport += $rekord

    }

    $raport | out-file 'Y:\dyski.csv '.

  • question from control_file_record_keep_time in the standby database

    Hello

    We used to recreate a database waiting for backup to cold after a PROD failover to STANDBY mode. (on a weekly basis)

    During the synchronization of the day before with a production that we get under WARNING
    -------------------------------------------------------------------------------------------------------
    FAL [client]: you cannot request the gap sequence
    GAP - thread 1 sequence 45217-45225
    FAL [client]: all defined FAL servers have been tried.
    -------------------------------------------------------------
    Check that the initialization of CONTROL_FILE_RECORD_KEEP_TIME
    parameter is set to a value large enough
    enough to keep adequate record switch information to solve
    ARCHIVELOG gaps.
    -------------------------------------------------------------
    In my opinion why this happens because
    ----------------------------------------------------------
    During synchronization ARCH process detects that gap archive logs are present in the side watching or we can say that the archive requested connects
    [Customer] [SERVER] FAL FAL are already transferred on transferred before failover.
    So after showning this warning, it replaces the archive logs that are ever-present in the side watching.


    Please me corret I if am wrong...
    CONTROL_FILE_RECORD_KEEP_TIME = 7


    Please help me on this so that I will no more get the warning above...



    Thank you

    user9085814 wrote:
    Hello

    We used to recreate a database waiting for backup to cold after a PROD failover to STANDBY mode. (on a weekly basis)

    During the synchronization of the day before with a production that we get under WARNING
    -------------------------------------------------------------------------------------------------------
    FAL [client]: you cannot request the gap sequence
    GAP - thread 1 sequence 45217-45225
    FAL [client]: all defined FAL servers have been tried.
    -------------------------------------------------------------
    Check that the initialization of CONTROL_FILE_RECORD_KEEP_TIME
    parameter is set to a value large enough
    enough to keep adequate record switch information to solve
    ARCHIVELOG gaps.
    -------------------------------------------------------------
    In my opinion why this happens because
    ----------------------------------------------------------
    During synchronization ARCH process detects that gap archive logs are present in the side watching or we can say that the archive requested connects
    [Customer] [SERVER] FAL FAL are already transferred on transferred before failover.
    So after showning this warning, it replaces the archive logs that are ever-present in the side watching.

    Please me corret I if am wrong...
    CONTROL_FILE_RECORD_KEEP_TIME = 7

    Please help me on this so that I will no more get the warning above...

    Thank you

    If you think that the problem with "CONTROL_FILE_RECORD_KEEP_TIME", it means that wrong you ;)
    Oracle offering to check if the archives are out of detention, his don't say no not any problems with the parameter. If this parameter too low value and the archives are not applied within that time, then you need to adjust the value.

    Now coming to the point, Archives of * 45217-45225 * Miss waiting,.

    (1) check whether exist on primary or not
    (2) if it is deleted, restore these backups sauvegardΘ
    (3) if not accessible to the general public of these backup archives, you must perform the rollforward differential to recover your database pending, using the link below
    http://www.Oracle-CKPT.com/RMAN-incremental-backups-to-roll-forward-a-physical-standby-database-2/

  • Question from numbers in the stored procedure

    Hi all

    I have a problem to store numbers in oracle 11 g. I need the numbers without decimals and with decimal in my data table, I see this:

    1.1 (OK)

    1.2000000000000002 (instead of 1.2)

    1.3000000000000003 (instead of 1.3)

    1.4000000000000004 (instead of 1.4)

    1.5000000000000004 (instead of 1.5)

    1.6000000000000005 (instead of 1.6)

    1.7000000000000006 (instead of 1.7)

    1.8000000000000007 (instead of 1.8)

    1.9000000000000008 (instead of 1.9)

    2.000000000000001 (instead of 2.0)

    I am using this cfc:

    < procedure = "myDB.myPackage.updateTableA cfstoredproc" datasource = "mySource" > "

    < cfprocparam value = "" #arguments.myNumberValue # "cfsqltype ="cf_SQL_FLOAT">"

    < / cfstoredproc >

    In oracle, I have the myNumberValue parameter as a number data type.

    I try CF_SQL_DECIMAL and cf_SQL_NUMERIC, it does not pass anything.

    What type of sql are used in my stored procedure?

    Thank you

    Johnny

    I would use CF_SQL_DECIMAL, make sure just that you set the SCALE = "" attribute to dictate the number of decimal places to send. "

  • Question from beginner on 'get - vm.

    Hello

    I have a beginners question since I've just immersed in the world of PowerCli

    Whenever I give a ' get-vm-name "I get a result that shows me the: name, PowerState, Num CPU and memory.".

    No, I created a very simple script:

    Param ($VMHost, $VMName)

    SE connect-VIServer $VMHost

    Get-VM-name $VMName

    Whenever this is executed:./script.ps1 it gives me much more information on this specific virtual machine.

    I forgot something given that IMHO the 'get - vm"phrases are the same.

    Thanks for clearing this out for me!

    Kenneth

    Which is caused by the PS1XML file in the directory PowerCLI, called VMware.VimAutomation.Format.ps1xml.

    This XML file contains definitions how items are displayed on the console.

    When you run the other script formatting rules come into play.

    Rest assured data is here.

    You can add a Select-Object or Format-List cmdlet to display all of the properties available.

    Something like that

    Get-Vm -Name  | Select *
    

    or

    Get-Vm -Name  | fl
    
  • Question from beginner on flicker

    OK, I'm new to ActionScript, but I can adapt easily, so I started a project, it loads an XML file with data after it is loaded it adds a bar for each node, can be found in the xml file. The bar is converted to a symbol and acts as a button. Now, I want to add a label as a child to the bar. And here comes the problem, when I add the label to the bar and compile the .fla that etiquette is blinking all the time. I also extract data from each node to add text to the label, but it's not beeing displayed either. Could someone me, why label flashes and the bar does not explain it please?

    Here is the code for adding so far the bars and labels

    var btn:Standing; // Symbol
                                  var lbl:XmlLabel;
                                  for (var i:int = 0; i < len; i++) {
                                            btn = new Standing();
                                            btn.x = 287;
                                            btn.y = 190 + i * 46;
                                            addChild(btn);
                                            btn.name = "btn" + i;
                                            btn.buttonMode = true;
                                            btn.addEventListener(MouseEvent.CLICK, onButtonClick);
      
                                            var teamElement:XML = teamElements[i];
                                            var nameString:String = teamElement.@name;
                                            var winString:String = teamElement.@wins;
                                            var lossesString:String = teamElement.@losses;
                                            var id:int = parseInt(nameString);
                                            for (var o:int = 0; o < 4; o++) {
                                                      lbl = new XmlLabel();
                                                      lbl.x = 20 + o * 70;
                                                      lbl.y = 10;
                                                      lbl.text = nameString.toString();
                                                      btn.addChild(lbl);
                                                      lbl.name = "lbl" + i + o;
                                            }
    
    

    Thanks for the help

    What is XmlLabel?  a textfield?  a movieclip?  something else?

  • Question from beginner to a TUNE...

    Hello

    I plan on building an app for iOS and Android and Mac and PC.  My question is this:

    Can I build an app for Android and iOS using AIR that connects to a central program on a PC or a Mac made on AIR via a wireless connection?

    What would be the easiest way to do this?  Is it still possible?  Thank you!

    -DigitalAce7

    Sockets.

    Mobile AIR provides the socket (flash.net.Socket) class to implement the functionality of client. Desktop computers more provide flash.net.ServerSockets, your project should be possible in the AIR. I've never tried, but...

    Best regards

    LLD

Maybe you are looking for