Help with some PL/SQL triggers

Hello, I'm totally new using PL/SQL, so I need your help with two triggers.
For example
1 compare two dates and check that there are different, you must send an error message

2. when I insert a new record, a trigger must get data from other tables and Add (on a new record)

Maybe not the answers, perhaps the way forward!
Thks!

Insert values into a new record of existing data tables

This thing that you can do with simple sql statements as

insert into table_name1 select column_name from table_name2;

For example: -.

create table test(id number(10));

Table created.

insert into test select empno from emp;

14 row(s) inserted.

select * from test;

ID
7839
7698
7782
7566
7788
7902
7369
7499
7521
7654

Thank you

Mezaber

Tags: Database

Similar Questions

  • help with some floats

    Hello again! Happy birthday Maes.

    Always confused with some floats... Here is a screenshot

    samplepost.jpg

    and the css

    .headingbox {
           clear:both;
           height:26px;
    }
    
    .floatright {
            float:right;
            margin-right:20px;
            color:#ffffff;
    }
    
    .floatleft {
            float:left;
            width:350px;
    }
    

    the headingbox class is the above paragraph and contains the floatleft and floatright. The problem here is that paragraph sticks left .floatleft. I want the point to always be below it. This will work with a greater height, but when there is little text in the .alingleft there is just too much space between the post title and paragraph.

    Is there an easy fix for this?

    http://www.martcol.co.UK/test/floathelp.html

    is this something like what you're trying to do?

    It's a bit awkward and I'm afraid, I used my own code, but if it helps, it's really simple.  Using any other code for me, it's like wearing shoes of someone else...

    Martin

  • Need help with some cluster power shell scripts

    Guys,

    I need help with 2 scripts.

    Text 1.

    I need a power shell script that will get all the virtual machine in a specific cluster.  Virtual machine names as well as the number of processors, output allocated RAM and size of CSV file.

    Text 2.

    I need a script that will get all data warehouses in a specific cluster and store name data as well as the amounf of free space for a CSV output.

    Thanks in advance guys.

    Greetings, @peter79 -.

    For the first part:

    Get-Cluster myClusterName | Get-VM | Select-Object Name, MemoryMB, NumCpu | Export-Csv -NoTypeInformation c:\temp\myVMInfo.csv
    

    And for the second, how about:

    Get-Cluster myClusterName | Get-VMHost | Get-Random | Get-Datastore | Select-Object name, FreeSpaceMB, CapacityMB | Export-Csv -NoTypeInformation c:\temp\myDaterstoreInfo.csv
    

    The first would be quite a bit faster by using Get - view instead of Get - VM.  It would be like:

    ## get an array of VM View objects with just the desired/needed properties
    $arrVMViews = Get-View -ViewType VirtualMachine -SearchRoot (Get-Cluster myClusterName).MoRef -Property Config.Hardware,Name
    ## make the two filters for displaying the desired info
    $hshCPUCountFilter = @{n="NumCPUs"; e={$_.Config.Hardware.NumCPU}}
    $hshMemAmtFilter = @{n="MemoryMB"; e={$_.Config.Hardware.MemoryMB}}
    ## display the info, and export to CSV
    $arrVMViews | Select-Object name, $hshCPUCountFilter, $hshMemAmtFilter | Export-Csv -NoTypeInformation c:\temp\myVMInfo.csv
    

    Enjoy.

  • Need help with some oracle basics

    Hi friends,

    I would like to know if my abt to understand some concepts as described below is just?

    1) active user : when a user issues a command SQL to oracle to perform.

    (2) * user inactive: * when oracle wait for users to issue commands and the user is INACTIVE.


    Please help me to find these answers:

    A user become active when they click submit button/backup/restore?

    I would like to know how much resources a user oracle uses (network traffic, memory, I / O)?

    Is a user uses some resources if it is inactive and sitting idle for long time?



    Thank you

    Oracle marks a session as a session inactive if the user will not do anything with the database for some time. I don't know what is the explanation for the status of the session that you see a toad, since I do not use it. Maybe someone else would have a better explanation then wait for others to participate.

    Aman...

  • I need help with some Applescript for Postbox

    I was wondering if any of you can help me?

    I am writing a very simple script for my Postbox email application. It takes the selected message and turns it into a reminder. Everything works fine, but I want to take the subject assigned to the message and use it as the name of the callback list, and that's where it breaks down (topics are tags, as in Thunderbird and Mail).

    According to the dictionary, a message object counts among its subjects msg properties which is a list of subjects. According to the dictionary, a subject has three properties so, id, name , and color.

    I need only the first topic, so I do something like

    set theTopics to msg topics of theMessage.
    set theTopic to item 1 of theTopics

    no error reported, it returns a list, but when I then try to access the properties of the first article (= first subject), it is clear that something is wrong, and I think it's a bug/bad programming in the mailbox, but I'm not sure.

    When I do something like

    set ReminderList to name of theTopic

    He begins to complain. It is said that name (or id or color) is not available, as I can't get this to other classes, and it does not even return the class type for the element.

    It will return something that looks like this:

    class {show id "some topic"}

    no name for the class.

    And it seems that the text, but it behaves differently.

    How can I know what I'm actually deal with this object "topic"?

    What is - this actually to return?

    I don't know the app, but try to go back to theTopic properties.  That could make things a little clearer.

  • Help with some internal specs on the STORM. May require a person who works at the RIM.

    BB STORM, JDE 4.7.0

    I was usually the champion of the size of the memory, and I thought I got it down pat, but it turns out that I see different values in some disassembly of the hardware of the storm.

    Can someone help me to y and the degradation of persistent memory Vs file in the permanent internal flash storage area.

    OK, here's what I thought, it was internal so far.

    1 internal 128 MB of RAM for running the show, allocation of memory, etc, etc...

    2. 1 g internal Samsung OneNAND flash memory. It is divided into 128M of space of the App and 872 M of storage space.

    The storage space is divided into persistent storage and the rest is an internal file system.

    3. Finally, there is 8GBits of the space of the SD card.

    OK, here's my new questions on memory.

    In 2 above, is the 1 G bytes or Bits. I used to think bytes, but teardowns latest I read all say Bits. If so, it means that we have memory app 16MBytes! So the question is byte or bit?

    The next question is the 872M (bits or bytes)... How is burglarized persistent store file Vs space. Is it preallocated or no change of line based on what he gets used? If it is fixed, can the line be forced to the persistent store. Can it be forced into space from the SD card?

    Finally, is again the SD card in bytes or Bits? I suspect the pieces, but I don't know about you. I don't know what MoviNAND.

    Note that if you are new to this, please don't answer, I'm not new, and I went through all the usual web sites. I just want to hear from those who know with certainty because they actually measured it with a code or they talked to someone on the EDGE. I heard all the 'I think there' and they do me good. I actually send you this email to myself and several other people. Many of us need answers to these questions.

    Thank you

    -Donald

    The BlackBerry Storm has the following:

    • 128 MB of RAM
    • 128 MB of Flash memory for installation of the application (file COD) and store persistent store.
    • 1 GB internal memory for storing files (FileConnection & USB stick as support).
    • Support for micro SD card up to 32 GB * of size for the storage of additional files (FileConnection & USB stick as support).

    All values are in bytes, not horseshoes.  It is not possible to install applications on memory storage of files, nor is it possible to store persistent objects in the file storage space.

  • Need help with ics. SQL return null

    Hi experts WCS.

    I have this ics. SQL statement that returns an IList as null and nothing in the errStr in debugging print.

    IList rsATypes is ics. SQL (, sqlATypes, listName, limit, bCache errStr);

    The code is in one of my jsp. He ran very well in my local JSK (HyperSQL Db), but returns NULL in the case of Test (Oracle DB, if this is another).

    I got the sql statement println during execution and run it directly in Oracle DB (same instance) it returns the expected result set.

    The code snippet:

      System.out.println("## ics.GetSSVar(\"pubid\")          : " + ics.GetSSVar("pubid"));
    
        // Get Attribute Types
        String sqlATypes = "SELECT DISTINCT assetpublication.assettype "
                         + "FROM assetpublication "
                         + "LEFT JOIN approvedassets "
                         + "    ON assetpublication.assetid = approvedassets.assetid "
                         + "WHERE pubid = '" + ics.GetSSVar("pubid") + "' "
                         + "AND (tstate is null OR tstate <> 'A') "
                         + "AND (voided is null OR voided <> 'T') "
                         + "ORDER BY assettype; ";
        System.out.println("##0126 sqlATypes : " + sqlATypes);
        String from = "AssetPublication, ApprovedAssets";
        // String listName = null;
        String listName = "ATypesList";
        int limit = -1;
        // boolean bCache = true;
        boolean bCache = false;
        StringBuffer errStr = new StringBuffer("");
        ics.ClearErrno();
        IList rsATypes = ics.SQL(from, sqlATypes, listName, limit, bCache, errStr);
    
        System.out.println("## rsATypes : " + rsATypes);
        if (rsATypes == null) {
            System.out.println("## NO DATA in rsATypes! errStr : " + errStr.toString());
    

    }

    The journal:

    ## ics.GetSSVar("pubid")          : 1374097570685
    ## sqlATypes : SELECT DISTINCT assetpublication.assettype FROM assetpublication LEFT JOIN approvedassets     ON assetpublication.assetid = approvedassets.assetid WHERE pubid = '1374097570685' AND (tstate is null OR tstate <> 'A') AND (voided is null OR voided <> 'T') ORDER BY assettype;
    ## rsATypes : null
    ## NO DATA in rsATypes! errStr :
    


    I got enclosing try catch block, who did not take any exception.


    The funny thing is, in the same piece of code, an ics. Casea used already worked (which I noticed outside because there was not enough for what I want to do):

            StringBuffer errSB = new StringBuffer("");
            ics.SetVar("assetid", id);
            IList approvedAsset = ics.SelectTo("ApprovedAssets", "state,voided,tstate,locked,reason,treason", "assetid", null, -1, null, true, errSB);
    

    Any help/ideas from anyone would be really appreciated.

    Thanks Guddu1223, I discovered why.

    The SQL statement cannot end with a semicolon (see line 11 of my original above codes). Delete who had back all the records provided for in my resultset in the IList.

    The reason why it works in my local, but not stable instance that I guess is my local JSK + HyperSQL, in WCS + Oracle DB instance trying...

  • I need help with the following sql.

    I'm lost. I'm collecting information for the days of the month.  For days I have not, I would like to query to get these days also.
    The days of return I have with data and all other days where I'm not.

    How can I get the rest of the days of the month of June.  If I execute sql against the following.

    Select * from
    (Select '02' as the double Study_Date
    Union Select '03' as the double Study_Date
    Union Select '04' as the double Study_Date
    Union Select '04' as the double Study_Date
    Union Select '05' as the double Study_Date
    Union Select '06' as the double Study_Date
    Union Select '09' as the double Study_Date
    Union Select '10' as the double Study_Date
    Union Select '11' as the double Study_Date
    Union Select '12' as the double Study_Date
    Union Select '13' as the double Study_Date
    Union Select '16' as the double Study_Date
    Union Select '19' as double Study_Date)

    Thank you

    Howard

    Hello, Howard.

    Thanks for posting the sample data!  Don't forget to post the exact results you want from these data.

    Looks like you want something involving everyday of the month, they have a day corresponding to your table or not.  This looks like a job for an outer join.

    This should give you some ideas:

    WITH days_wanted AS

    (

    SELECT TO_CHAR (LEVEL, 'fm00') n

    OF the double

    CONNECT BY LEVEL<=>

    )

    SELECT d.n

    t.study_date

    NVL2 (t.study_date

    'Yes '.

    'No '.

    ) AS in_table_x

    OF days_wanted d

    LEFT OUTER JOIN table_x t ON t.study_date = d.n

    ORDER BY d.n

    ;

    Output:

    STUDY_DATE N IN_TABLE_X

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

    01 NO.

    02 02 Yes

    03 03 Yes

    04 04 Yes

    05 05 Yes

    Yes 06 06

    07 NO.

    08 NO.

    09 09 Yes

    10 10 Yes

    11 11 Yes

    12 12 Yes

    13 13 Yes

    14 NO.

    15 NO.

    16 16 Yes

    17 NO.

    18 NO.

    19 19 Yes

    20 NO.

    21 NO.

    22 NO.

    23 NO.

    24 NO.

    25 NO.

    26 NO.

    27 NO.

    28 NO.

    29 NO.

    30 NO.

    You must use a DATE for study_date, not a VARCHAR2 column.  What will you do if you have days of different months in the table?

  • Help with anonymus pl/sql layout using javascript

    Hi people.

    I want to display records on a region (using apex 4.2), this anonymous pl/sql script below shows 3 records in database, but the layout only shows me the first album with its data, the other 2 files, only show me the labels.
    I checked this same query creating a report and it shows the 3 files correctly.
    I guess I'm doing something wrong with this javascript routine or certainly miss something,
    in this link you can see the layout I get. (http://sdrv.ms/Xrv0J8).

    Another is the little help I need to display in a line for each record. in fact, I'm getting a line for each label and a line for each data record. I have read and learned something is/div, but I don't know how to change it to get the desired results, any suggestion is welcome.

    Thanks in advance for any help.



    I am completely new in apex and java script, but I have several years of experience in pl/sql.

    -------


    The Script:

    Begin
    Declare
    Anyth cursor is
    Select the item,
    To_char (delivery, ' month DD, YYYY hh24:mi:ss ") delivery.
    Current_date
    Of pending_items;
    Begin
    For a loop Anyth
    Begin
    Sys.Htp.P ("< script type =" text/javascript"> '");
    Sys.Htp.P ('function cdtd() {'});
    Sys.Htp.P ("var Christmas = new Date (" ' | ') ") a.Delivery | '")');
    Sys.Htp.P ("var now = new Date();'");
    Sys.Htp.P ("var timeDiff = xmas.getTime () - now.getTime ();'");
    Sys.Htp.P (' if (timeDiff < = 0) {'});
    Sys.Htp.P ('clearTimeout() (timer)');
    -Sys.Htp.P ("document.write ("of the text here.")");
    Sys.Htp.P (' / / execute all necessary code to the completion of the countdown here ');
    Sys.Htp.P ('} ');
    Sys.Htp.P (' var seconds = Math.floor(timeDiff / 1000);) ") ;
    Sys.Htp.P ("var minutes = Math.floor(seconds / 60) ;");
    Sys.Htp.P (' varhour = Math.floor(minutes / 60);) ") ;
    Sys.Htp.P ("days var Math.floor(hours / 24) = ;"); ")
    Sys.Htp.P (' hours = 24 ;'); %)
    Sys.Htp.P (' minutes % = 60 ;');)
    Sys.Htp.P (' seconds % = 60 ;');)
    Sys.Htp.P (' document.getElementById("daysBox").innerHTML = days ;');)
    Sys.Htp.P (' document.getElementById("hoursBox").innerHTML = hours;) ") ;
    Sys.Htp.P (' document.getElementById("minsBox").innerHTML = minutes ;');)
    Sys.Htp.P (' ;'); seconds = document.getElementById("secsBox").innerHTML)
    Sys.Htp.P (' timer var = setTimeout ("cdtd ()", 1000);');
    Sys.Htp.P ('} ');
    Sys.Htp.P ("< /script >");
    Sys.Htp.P ("days");
    Sys.Htp.P ("< div id ="daysBox"> < / div > '");
    Sys.Htp.P ("hours");
    Sys.Htp.P ("< div id ="hoursBox"> < / div > '");
    Sys.Htp.P ('minute');
    Sys.Htp.P ("< div id ="minsBox"> < / div > '");
    Sys.Htp.P ("seconds");
    Sys.Htp.P ("< div id ="secsBox"> < / div > '");
    Sys.Htp.P ("< script type =" text/javascript"> '");
    Sys.Htp.P ('cdtd() < /script > ');
    End;
    End loop;
    End;
    End;

    For now, let's focus on delivery dates and the javascript.
    Why you would put your javascript in htp.p called in a plsql region is beyond me. When you edit the page there is a region of javascript where you can put global variables and functions, a great spot for it then and much easier to manage than that.
    Now, it is also clear that your query on pending items will return multiple records. Thus, using a report would serve you well in this case. However, using code like this:

    document.getElementById("daysBox").innerHTML = days;
    document.getElementById("hoursBox").innerHTML = hours;
    document.getElementById("minsBox").innerHTML = minutes;
    document.getElementById("secsBox").innerHTML = seconds;
    

    you won't have to. getElementById is supposed to return an element identified by a code. If you have a report that contains multiple lines and elements on each line with the same ID, you're doing something wrong. You should be the date of delivery by rank, and I suppose that you put your code with htp.p because you don't know how to deal with this and passing the procedure of javascript.
    But would it not more oppurtune for you simply create a report with a sql source when you calculate each part of the date and then refresh this region with a certain interval. If you would be refreshed every 5 minutes, not who is more fast enough to keep track of things? Remember, refreshing a region will execute the SQL again.
    It is not that you cannot make a report multi-record with a countdown by rank, but are you sufficiently comfortable with javascript and jquery to encode and maintain that against leverage plsql and dynamic actions (there is even an action timer plugin supplied by oracle dynamic)?

  • Help with simple PL/SQL package

    Hi, I'm creating a package simple PL/SQL to loop over a list of names and do some special fuzzy criteria in an attempt to clean up the data. Unfortunately... I don't know anything about PL/SQL and hitting problems is to work. Could anyone give a hand?

    p. s.
    table TMP_UTL_MATCH_INPUT has a list of names to corresponding in the column called CLEAN_MERCHANT
    TMP_UTL_MATCH_OUTPUT table should contain the original entry of line # and value, a corresponding output line # and value and calculated edit_distance jaro_winkler similaritise
    table TMP_UTL_MATCH_STATUS is simply updated after each value so I can track where in the process it is obtained (I suspect that this algorithm will take a lot of time...)

    Thanks in advance for any help!
    Scott

    create or replace
    PROCEDURE ' PROCESS_UTL_MATCH_DATA "("START_ROW"EN ENTIER PAR DÉFAUT 1) IS" ".
    -initialize variable here

    whole Num_Rows;
    number of edit_distance_similarity;
    number of jaro_distance_similarity;

    -main body
    BEGIN
    Select count (*) in tmp_utl_match_input num_rows;

    declare name_array as varray (num_rows) of varchar2 (40);

    Select clean_merchant in the TMP_UTL_MATCH_INPUT name_array;

    truncate table tmp_utl_match_status;
    insert into tmp_utl_match_status values (0);

    I'm in 1.num_rows - 1 LOOP
    FOR i j + 1.num_rows LOOP
    edit_distance_similarity = utl_match.edit_distance_similarity (name_array (i), (j) name_array);
    jaro_winkler_similarity = utl_match.jaro_winkler_similarity (name_array (i), (j) name_array;)

    If (edit_distance_similarity > 50 or jaro_winkler_similarity > 50)
    then
    insert into values of tmp_utl_match_output (i, name_array (i), j, (j) name_array, edit_distance_similarity, jaro_winkler_similarity);
    END IF;
    END LOOP;

    Update tmp_utl_match_status set current_row_num = i;
    commit;
    END LOOP;



    EXCEPTION
    WHILE OTHERS THEN
    NULL; -Enter any code exception here
    END;

    I'm sorry. Just discovered that my syntax is incorrect. Cannot bulk collect a select statement. You must use a cursor, so here is the revised code

    create or replace
    PROCEDURE "PROCESS_UTL_MATCH_DATA"("START_ROW" IN INTEGER DEFAULT 1) IS
    --initialize variables here
    
      num_rows integer;
      edit_distance_similarity number;
      jaro_distance_similarity number;
      type Vartab is table of varchar2(40);
      name_array  vartab;
      CURSOR tmp_utl_cur IS
        SELECT clean_merchant FROM tmp_utl_match_input
         ORDER BY row_num;
    
    -- main body
    BEGIN
      OPEN tmp_utl_cur;
      FETCH tmp_utl_cur
        bulk collect into name_array;
      num_rows := name_array.COUNT;
    
      execute_immediate 'truncate table tmp_utl_match_status';
      insert into tmp_utl_match_status values (0);
    
      FOR i in 1..num_rows-1 LOOP
        FOR j IN i+1..num_rows LOOP
          edit_distance_similarity = utl_match.edit_distance_similarity(name_array(i), name_array(j));
          jaro_winkler_similarity = utl_match.jaro_winkler_similarity(name_array(i), name_array(j);
    
          if (edit_distance_similarity > 50 or jaro_winkler_similarity > 50)
          then
            insert into tmp_utl_match_output values (i, name_array(i), j, name_array(j)
                                                    ,edit_distance_similarity, jaro_winkler_similarity);
          END IF;
        END LOOP;
    
        update tmp_utl_match_status set current_row_num = i;
        commit;
      END LOOP;
    
    EXCEPTION
      WHEN OTHERS THEN
        NULL; -- enter any exception code here
    END;
    
  • Help with some sort of ridicioulous thing is boring! :(

    Hey guys!

    Recently I tried to downgrade to XP 5 times (I think). Now I've done it! But am using a wireless internet connection. Yes. It does not detect the internet. Which is annoying. It says network cable is not connected. But it says LAN. Well I don't have LAN network. So yes, it is the problem. Help me and I'll give you a Kudos!

    Yes, I have a problem. UH two questions.

    1. what network driver is HP Pavilion dv5-1150eo?

    2. How do you get it working? (I installed it and evreything.)

    -Martin

    ____
    If it helped to say 'Thank you' by clicking on the laurels! button (the star).
    Oh! Do not forget to click on accept as solution if this worked!
    "Help the games HP Forums."
    -Martin (AKA HairyPoteer just a random name!)

    people with disabilities, but I managed to fix it right now! But still I want Bravo you all for helping me!

    Oh Fileth locked!

  • Need help with some files

    Then I opened the Task Manager today only to find 3 things I'd never seen before, they were atieclxx.exe, csrss.exe and winlong.exe. I did a bit of googoling (?) and I'm a bit confused. I see a few similar questions on other forums were people said that they were a form of spyware, while others apparently say it is just a process about my graphics card and normal to run, but I had never seen before.

    I would be grateful if someone could give me some clarification.

    Thank you.

    For peace of mind I suggest you run a malware check

    I recommend that you run Disk Cleanup or cCleaner to remove temporary files as this will reduce the time to scan security software.

    Start the computer in safe mode with network and download and install Malwarebytes (free version for individuals only), updated definitions and run in normal mode. Disable other security software while you do the analyses.
    http://www.computerhope.com/issues/chsafe.htm

    http://www.Malwarebytes.org/products/malwarebytes_free
    http://helpdesk.Malwarebytes.org/entries/21892442-should-I-scan-with-Malwarebytes-anti-malware-in-safe-mode-

    Download and run SuperAntiSpyware (Free Edition)
    http://www.SUPERAntiSpyware.com/download.html

  • Need help with a PL/SQL code

    Hello

    I am trying to execute the following PL/SQL code, which translates errors, obviously I'm not doing things, but it gives you an idea what I'm trying to do:

    DECLARE

    INT var_count;

    SELECT COUNT (*) IN var_count

    FROM sys.all_tables WHERE OWNER = 'SAKILA' AND table_name = "ACTOR";

    If var_count > 0 then

    BEGIN

    DROP TABLE "ACTOR";

    END;

    /

    Erros:

    SELECT COUNT (*) IN var_count

    *

    ERROR at line 3:

    ORA-06550: line 3, column 1:

    PLS-00103: encountered the symbol "SELECT" at the expected in the following way:

    Start function < an ID > pragma procedure subtype type

    < between double quote delimited identifiers > delete the current cursor

    There is before

    The symbol 'start' has been substituted for "SELECT" to continue.

    ORA-06550: line 7, column 1:

    PLS-00103: encountered the symbol "DROP" when expecting one of the following conditions:

    (begin case declare exit for goto if loop mod null pragma

    raise return select update while < ID >

    < between double quote delimited identifiers of > < a variable binding > < <

    continue the narrow current delete fetch locking insert open rollback

    savepoint sql set run commit forall fusion pipe purge

    Your help to create it in a right way will be appreciated.

    Thank you very much.

    Tonya.

    Try the following:

    My = $ora $csr-> prepare (q {}

    DECLARE

    INT var_count;

    BEGIN

    SELECT COUNT (*) IN var_count

    FROM sys.all_tables WHERE OWNER = 'SAKILA' AND table_name =: ts;

    If var_count > 0 then

    RUN IMMEDIATELY 'DROP TABLE' |: ts | "CASCADE CONSTRAINTS;

    end if;

    END;

    });

  • Help with MS Access SQL Developer Import (problem of DateTime field)

    So here's my dilemma...

    I am currently trying to import from MS Access to SQL Developer, by exporting MS Access to MS Excel and then import in my table of the exporting Excel sheet. What happens is that when I import the excel sheet, it is does not keep the format of date/time / I tried several different formats, but everyone seems to exclude the time and the date.

    My field of date/time is currently set up like this on SQL Developer:

    DD/RRRR/MM HH: MM: SS AM/PM

    And the Excel sheet, I'm importing the field corresponding, defined as follows:

    mm/dd/yyyy/hh/mm/ss AM/PM

    The answer (s) I'm importing is as follows:

    Date/time physical_cpu server_id

    01/11/2013-12:01:23 AM scc415 6.03999996

    When the record is imported, it eliminates the time, so the imported data are:

    Date/time physical_cpu server_id

    01/11/2013 6.03999996 scc415

    Any idea on how to get this timestamp to import properly? Many appreciate the ideas in advance!

    Looks like I have found the solution. For some reason, export to leave access to Excel first and then open and save the file as a .csv instead of a .xlsx, date/time information are maintained. This problem has been resolved.

    Found the solution on the following link for anyone interested.

    Import from excel using SQLDeveloper date/time field

  • Need help with this pl/sql code

    Hello
    It is showing an error sql command not properly ended... where FLX_TEXTTRAN802003. SPTEXTINSERT
    is a package... help me please
    BEGIN
       DECLARE
          v_TextID   NUMBER :=0;
          I_LanguageID NUMBER := 1033;
          v_count number;
          e_error EXCEPTION;
    
    BEGIN 
     
    
    
    
            
    --INsert into text
                FLX_TEXTTRAN802003.SPTEXTINSERT
                                               (io_id                => v_TextID,
                                                i_type               => N'',
                                                i_lastupdateon       => cob_f_getutc,
                                                i_lastupdatedby      => 'NGMESSystem',
                                                i_createdon          => cob_f_getutc,
                                                i_createdby          => 'NGMESSystem'
                                               );
            
    
            
            
         
    --    Insert into TEXT_TRANSLATION
                FLX_TEXTTRAN802003.SPTEXTTRANINSERT
                                               (i_TextID             => v_TextID,
                                                I_LanguageID         => I_LanguageID,
                                                i_short              => 'CUSTOMER',
                                                i_medium             => 'CUSTOMER',
                                                i_extended           => 'CUSTOMER',
                                                i_lastupdateon       => cob_f_getutc,
                                                i_lastupdatedby      => 'NGMESSystem',
                                                i_createdon          => cob_f_getutc,
                                                i_createdby          => 'NGMESSystem'
                                               );
                        
                
        select count(*) into v_count from characteristic_class where name='CUSTOMER' 
    if v_count = 0 then
         
    
           
      
            Insert into FLXUSER.characteristic_class
       (ID, NAME, TEXTID, REFERENCEID, LASTUPDATEON, LASTUPDATEDBY, CREATEDON, CREATEDBY, ACTIVE, LASTDELETEON, LASTDELETEDBY, LASTREACTIVATEON, LASTREACTIVATEDBY, ARCHIVEID, LASTARCHIVEON, LASTARCHIVEDBY, LASTRESTOREON, LASTRESTOREDBY, ROWVERSIONSTAMP)
     Values
       (SEQ_CHARACTERISTIC_CLASS.nextval, 'CUSTOMER', v_TextID, NULL, 
        NULL, NULL, TO_DATE('11/05/2012 16:49:05', 'MM/DD/YYYY HH24:MI:SS'), 'SYSTEM', 1, 
        NULL, NULL, NULL, NULL, NULL, 
        NULL, NULL, NULL, NULL, 1);
    commit;
      
    
    ELSE
    Raise e_error;
    END IF;
    EXCEPTION
    when e_error then
    dbms_output.put_line('data already exist');
    end;

    Hello

    next to what Frank says, the following line:

       select count(*) into v_count from characteristic_class where name='CUSTOMER' 
    

    missing semicolon at the end:

       select count(*) into v_count from characteristic_class where name='CUSTOMER' ;
    

    Also the BEGIN initial until the DECLARE is unmatched (no corresponding END).
    You can remove it.

    Kind regards.
    Al

    Published by: Alberto Faenza on November 6, 2012 16:24

Maybe you are looking for

  • AutoFill won't stop fill my sign in info

    When I go into my Comcast email account, the username and password are now always already filled and I want stop from occurring. I tried looking at Firefox and Comcast forums to find answers to my question. I do not check the box "remember me" on the

  • cannot install update KB2481109, error "some updates could not be installed.

    Original title: update Windows XP Pro KB2481109. My computer is constantly requiring an 'important' update and it is still KB2481109, but it's always with: "some updates could not be installed.  I just spent my ware protection to MS Security Essentia

  • Can I re - install Windows XP without media?

    my windows xp computer can be recharged my laptop had the virus before. Windows xp does not work well. I have the windows xp product key, but I don't have cd. How can I get my Windows xp reloaded?

  • BlackBerry Z10 unable to get 10.2 updated my unlocked Z10

    Cannot understand why I get the message that I have the latest version of the software (10.1.0.4181) when I try to update to 10.2. I tried the OTA and by BB on the PC link. My phone is unlocked, but has a contract from Vodafone (United Kingdom) SIM i

  • Problem with default system menu item "Switch Application"

    I used the system menu item in my app screen. If I select 'Application Switch', I noticed that my app icon becomes empty. The problem doesn't stop here. If I go back to the home screen and in all cases, my icon of gets too empty. The system has lost