Import csv into Apex with the only time data.

Hello

I tried to understand this question for awhile now and have been on several forums without success.

IM learning SQL and PL/SQL, so please be gentle

I am in charge of a csv file, where the data is time in the "KO_TIME" column for example 13:30 'or 18:00 ' 24 hours just hours and minutes.

I am aware of the TO_CHAR function to convert a date to a string in an insert statement, but I want to be part of the creation of the table syntax, so I'm able to use the Import CSV APEX tool and it will include the time format data 00:00.

The creation of the table is so far, but with syntax errors;

CREATE TABLE  "FOOT_BALL_VENUES" 
   (     "ID" NUMBER,
     "DESCRIPTION" VARCHAR2(30),
     "DAY" VARCHAR2(30),
     "DATE_FIX" DATE,
     "KO_TIME" DATE AS (TO_CHAR('HH24:MM')
                "FIXTURE" VARCHAR2(255),
     CONSTRAINT "FOOT_BALL_VENUES_PK" PRIMARY KEY ("ID") ENABLE
   )
/

CREATE OR REPLACE TRIGGER  "bi_FOOT_BALL_VENUES"

  before insert on "

 

FOOT_BALL_VENUES"       

  for each row

begin 

  if :new."ID" is null then

    select "FOOT_BALL_VENUES_SEQ".nextval into :new."ID" from dual;

  end if;

end;

 

/

ALTER TRIGGER  "bi_FOOT_BALL_VENUES" ENABLE

/

Thanks for your time guys.

Rarebazza

Hello

If your KO_TIME csv column have alone time, then use the data type VARCHAR2 to your column of table KO_TIME.

If KO_TIME csv column have the date and time, and then use the DATE format and for example create the virtual column that shows the only time.

CREATE TABLE  "FOOT_BALL_VENUES"
   (     "ID" NUMBER,
     "DESCRIPTION" VARCHAR2(30),
     "DAY" VARCHAR2(30),
     "DATE_FIX" DATE,
     "KO_TIME" DATE,
     "KO_ONLY_TIME" VARCHAR2(255) GENERATED ALWAYS AS (TRIM(TO_CHAR(KO_TIME,'HH24:MI'))) VIRTUAL,
     "FIXTURE" VARCHAR2(255),
     CONSTRAINT "FOOT_BALL_VENUES_PK" PRIMARY KEY ("ID") ENABLE
   )
/

Kind regards

Jari

Tags: Database

Similar Questions

  • Had an accident and I want to import my favorites into Firefox but the only option in the Import Wizard is that is my B/brands are saved on a memory stick. Any solution please. ?

    Had an accident and I want to import my favorites into Firefox but the only option in the Import Wizard is that is my B/brands are saved on a memory stick. Any solution please. ?

    How bookmarks are stored? If they are in an HTML file, you can go to bookmarks > organize bookmarks > import and backup > import HTML, select "in a HTML file" and go from there.

    If you have not currently saved favorites and b / m to import is already in a FF bookmarks file you could just more copy to your profile.

  • Need help get data with the most recent date of entry into

    Hey guys;

    I need help with fine tuning a query to get the one with the most recent implementation.

    Here's my current query:

    /**********************************************
    Select sge.seal_group_id,
    SGE.equipment_id,
    SGE.effective_date
    of seal_group_equipment EMS.
    seal_group sg
    where equipment_id = 48801
    AND EMS. SEAL_GROUP_ID = SG. SEAL_GROUP_ID
    and sge.end_date is null
    Group of sge.equipment_id, sge.seal_group_id, sge.effective_date
    After having sge.effective_date = max (sge.effective_date)

    ******************************************************/

    Which produces the following results:
    SEAL_GROUP_ID - EQUIPMENT_ID - EFFECTIVE_DATE
    25-48801 - 01/01/1993-00: 00:00
    11730-48801 - 22/08/2003 08:42:11


    What I really need, is to show only the line with the most recent date of entry into
    I hope someone can help
    Thank you

    MAX will not work because the SEAL_GROUP_ID could depart. I would say analytical:

    select seal_group_id,
    equipment_id,
    effective_date
    from (
    select sge.seal_group_id,
    sge.equipment_id,
    sge.effective_date,
    RANK() over (partition by equipment_id order by effective_date desc) r
    from seal_group_equipment sge,
    seal_group sg
    where equipment_id = 48801
    AND SGE.SEAL_GROUP_ID = SG.SEAL_GROUP_ID
    and sge.end_date is null)
    where r = 1;
    

    Keep in mind if two records have the same effective_date, they would both appear.

    Note: query above has not been tested, since there is no script provided.

  • Since the last system upgraded my menu bar top with wifi and time, date etc etc is hidden unless I have sulk my cursor on it. Same thing with apps from shingles. How can I restore it is always there?

    Since the last system upgraded my menu bar top with wifi and time, date etc etc is hidden unless I have sulk my cursor on it. Same thing with apps from shingles. How can I restore it is always there? bar menus hidden-how do I restore?

    SystemPreferences-> Dock: automatically hide / show Dock

    SystemPreferences-> general: automatically hide / show menu bar

  • Why my pc is not snychronize with the internet time server /Keeps saying the peer is unreachable

    My pc will not snychronize with the internet time server, how can I fix this problem, also says peer are an affordable is a firewall block perhaps?

    I would like to ask what time servers, but the following links see the/you tell how to change as you point to the servers time NIST.

    http://www.nist.gov/PML/div688/grp40/its.cfm

    http://TF.nist.gov/TF-CGI/servers.cgi

    HTH,
    John

  • Windows 7 - date/clock will not automatically be synchronized with the internet time

    Windows 7 - date/clock will not automatically be synchronized with the internet time

    Please help me solve this problem...

    every time I can't manually change the date and time...

    If the time server internet will not synchronize the clock, select 'Change settings' and choose a different time server from the drop-down list.

  • Firefox Version 27 Action Menu error in Reporting Services. An error has occurred with the extraction of data.

    Hello, since I've updated for Firefox 27.0.1 on Windows 7, I have a problem with Reporting Services on a Sharepoint site. It is a site of Sharepoint 2010 with SQL Server Reporting Services 2012 Sharepoint integrated mode. I was already on Firefox version 26 and didn't meet with this problem.

    When a report is opened and you use the Actions link on the Reporting Services toolbar, I get the following error messages.

    An error has occurred with the extraction of data. Please, refresh the page and try again.

    I tried updating to the beta version of Firefox 28 but the same error occurs. I see that someone else is having the same problem here. http://SharePoint-community.NET/forum/topics/reporting-service-and-Firefox-27

    Any help would be appreciated. Thank you!

    Ryan

    Firefox version 28.0 has corrected this problem. Thank you!

  • When I import TIF and JPG with the same metadata files, only the TIF files are imported. How can I change this?

    I imported and renamed TIF and JPG files with the same metadata about the date and time of the recording. Only TIF files are imported, the JPG files remain unimproved. So I in 13 Finder e. g. image files in the same folder where Lightroom is only 10 files. Ideas for the resolution of welcome!

    Thank you

    Disable the option Preferences > General > process files Next To Raw files as separate Photos JPEG.  Then again an import.  It appears that, in this case, LR consider a TIFF image to a file "gross".

  • column with the only format of loading time

    My DB, 11 2 on OEL 5.5 GR
    Hi all
    I have a problem with the loading of the external table. I have a txt file with a format of columns HH24:MI:SS
    START_TIME
    00:10:20
    01:15:11
    02:11:10
    And I don't know which data type use in external table because in the future, I'll have to do some calculations on this column, so I should load as a DATE, but miss me "mm/dd/yy" to the front. Any suggestion how to do properly?

    You could use a data type CHAR or date for the outer table and do your math with this column correctly.

    The key is that convert a time string to a date data type will add the current date to it. For example:

    SQL> alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
    
    Session altered.
    
    SQL> select to_date('00:10:20', 'hh24:mi:ss') from dual;
    
    TO_DATE('00:10:20',
    -------------------
    01/02/2011 00:10:20
    

    Some examples of code for both cases, by using the DATE and CHAR data type. I tested it on 11.2.0.1:

    CREATE OR REPLACE DIRECTORY ext_tab_dir AS '/tmp';
    
    -- /tmp/info.txt
    1,00:10:20
    2,01:15:11
    3,02:11:10
    
    alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
    

    (1) using the DATE data type

    drop table tab_time_date;
    
    CREATE TABLE tab_time_date (
      key VARCHAR2(5),
      start_time date)
      ORGANIZATION EXTERNAL (
         TYPE ORACLE_LOADER
         DEFAULT DIRECTORY ext_tab_dir
         ACCESS PARAMETERS
          (FIELDS TERMINATED BY ','
           (key char(5),
            start_time CHAR(8) DATE_FORMAT DATE MASK "HH24:MI:SS"
           )
          )
          LOCATION ('info.txt'));
    
    select * from tab_time_date;
    
    KEY   START_TIME
    ----- -------------------
    1     01/02/2011 00:10:20
    2     01/02/2011 01:15:11
    3     01/02/2011 02:11:10
    

    (2) using the CHAR data type

    CREATE TABLE tab_time_char (
      key VARCHAR2(5),
      start_time char(8))
      ORGANIZATION EXTERNAL (
         TYPE ORACLE_LOADER
         DEFAULT DIRECTORY ext_tab_dir
         ACCESS PARAMETERS
          (FIELDS TERMINATED BY ','
          )
          LOCATION ('info.txt'));
    
    select key, to_date(start_time, 'hh24:mi:ss') from tab_time_char;
    
    KEY   TO_DATE(START_TIME,
    ----- -------------------
    1     01/02/2011 00:10:20
    2     01/02/2011 01:15:11
    3     01/02/2011 02:11:10
    

    Kind regards.

  • Merge two csv files both with the same columns

    Hi all

    I have two csv files (attached) both with the same DS column headings that I seek to merge into a csv file. I am struggling to find a way to do it.

    The two files are already sorted by DS but have additional info not required in the column of the DS. What I need is a cmdlet that will read each column DS each csv, correspond to lines and combine in a csv file.

    Any help, advice, much appreciated.

    Best,

    Rob.

    Save the script in the current folder as join - Collections.ps1, then do

    $csv1 = Import-Csv LunUUIDtoDS.csv -UseCulture $csv2 = Import-Csv VMtoDS.csv -UseCulture
    .\Join-Collections.ps1 $csv1 "DS" $csv2 |
    Export-Csv mergedCSV.csv -NoTypeInformation -UseCulture
    
  • TOC import does not work with the split topic

    Hello

    I am importing FrameMaker documents in RoboHelp project. I also import the table of contents of the FrameMaker TOC file.

    The problem I have is this:
    * If I do not divide the FrameMaker files imported into separate topics (by mapping the FrameMaker heading style to a style in CSS RoboHelp), then the FrameMaker TOC seem to import correctly - the hierarchy (structure) corresponds to the original FrameMaker TOC. However, I find myself with a topic by FrameMaker file, when what I really want, it is each division of FrameMaker files up in separate topics.

    * If I split files, FrameMaker imported into separate headings, then the FrameMaker TOC not imported correctly. Instead of having the same hierarchy in the FrameMaker TOC, table of imported materials are only one level (flat structure), without any of the 'books' that organize the TOC.

    I looked at
    http://blogs.Adobe.com/TECHCOMM/2007/11/how_to_convert_framemaker_toc.html
    .. but the import of the FrameMaker TOC in a new table of contents and RoboHelp has not fixed the problem.

    How to import a set of FrameMaker files so that I get two separate topics (split on the paragraph styles) and a table of contents with the appropriate hierarchy?

    Thank you
    John B.

    Sorry to be so slow to respond.

    It turns out that I did not understand how to get imported and divide topics. In my FrameMaker documents, I have three levels of headings: chapter, Heading1, Title2. After importing, I want all three titles level to become

    . So I traced all three titles in the style Heading1 Style Mapping dialog box. What I did not understand, is that RoboHelp seems to build the table of contents on the styles after splitting topics. In other words, apparently not be using FrameMaker TOC. Maybe I don't understand how it works, but I must say that the HR documentation is not much help.

    So what I do now is to map three levels of positions of FrameMaker on three levels of headings (title 1-3) HR, then divide the subjects on these three level headings. Then as part of my own upward, I change these three levels)

    -

    ) to

    . I am already a bunch of conversion after cleaning because I previously tag the FrameMaker documents for things like the pop ups of glossary, menu drop-down text and image maps; so it's just one more step in this process.

    Thank you
    John B.

  • Imported contacts have SMTP with the name of the recipient after the email address and cannot be sent.

    I imported my contacts from Outlook, from a CSV file. In the e-mail section, I get the name, sometimes with "and after the email address, I get SMTP and the email again. Of course, it cannot be sent. What I have to go through all my addresses and change each of them, or is there a better way?
    Example: My e-mail address appears as follows: [email protected] SMTP Hoogeveen,.
    In some I get quotes here and there, or.

    I would suggest to edit the CSV file and import again. Much easier than the use of the address book to do. Have a look herewhere I discuss editing CSV in a spreadsheet.

  • I can't import bookmarks to Seamonkey being the only option shown on the screen "Import" in Firefox for Internet Explorer.

    On my XP, the option screen 'import' shows IE and Netscape/Mozilla as choice; on this Windows 7 computer, the only option is IE. Back on does not help, and the Firefox installation went well.

    You can export bookmarks in SeaMonkey to a HTML file and import this file into Firefox.

    What version of SeaMonkey you referring?

    • Export Favorites to SeaMonkey to a file (bookmarks.html) HTML:
     Bookmarks > Manage Bookmarks > Tools > Export
    
    • Import HTML file in Firefox:
     Bookmarks > Organize Bookmarks > Import & Backup > Import HTML: From File
    

    See also http://kb.mozillazine.org/Import_bookmarks ("Import from another browser" and "Import from file")

  • Probems with the record time on the TDS3014C

    Hello

    I use a tektronic TDS3014C brought to acquire data from an AC supply.  I played with the single channel waveform acquire VI examples and added a "wirte to file the measure" puck.  "I would like to record a stream of waveform for 5 seconds and write this file, but if I try to enter a ' times a record" greater than 100 ms data is beginning to break down.  I know that I can acquire only given 10000 point using this material, but is there a limit to the length of a continuous acquisition?

    Trent

    Hi ErgonTW,

    After reviewing your chart I think that the configuration is correct. However, your chart is only show four milliseconds of data. You need to change the x-axis of your chart to show the entire waveform. Do double-click le.004 on the x axis and the abandoned.2 then click anywhere on the front panel. This will change the values.

    Perry S.

  • Software AIO with the only USB 3.0 systems problems

    I just had problems with the installation of PSC 1510 and J5780 to be connected systems USB 3.0 only as a Fujitsu Lifebook A544 under W7 - 64.

    In both cases, download the latest package and stopped installation:

    http://www.Club-PAC.de/download/HPj5780-error.PDF%C2%A0

    W7-64 systems are fully patched, a "naked" before first Installation HP look so no HP software - lay before.

    Note: alle USB3.0 ports are in good condition!

    Reference:

    http://h30492.www3.HP.com/T5/Drucker-und-all-in-one-GER%C3%A4te-installation-und/installation-Softwa...

    http://h30492.www3.HP.com/T5/Drucker-und-all-in-one-GER%C3%A4te-installation-und/HP-J5780-keine-Inst...

    Solution (at least for Fujitsu of A544):

    If possible, use BIOS routines disable the functionality of USB 3.0 and USB 2.0 only instead.

    Windows will then take some time to install drivers for USB for USB 2.0 devices, but after that, the HP AIO software installation will succeed.

    Now, you can reactivate the USB 3.0 feature in the BIOS. Believe it or not, software, printer, scanner still doesn't work.

    Add on: evidence for quality control: using scanner in German will have Dutch expression on the button "Cancel"...

Maybe you are looking for

  • Tumblr dashboard load much too new pages

    When I am on Tumblr, scroll to my dashboard, I noticed that after a while it becomes very slow. The reason why is that whenever I scroll down a bit or press the 'j' - button (to go to the next post), firefox/tumblr already charging a next page of my

  • Just added new credit card at our shows. It says map not available

    Add new credit card at Apple Watch. It keeps saying card available?

  • ThinkPad tablet 2 "means onenote gal?

    Hey guys! I was thinking of buying a thinkpad Tablet 2 for use in classes, but I'm not too sure about the performance of the TPT2. I want to use only OneNote and let my office of all the heavy lifting. How he handles the onenote on it? I want to prin

  • T420s startup time

    I installed a drive mSata and used Lenovo provided restore disks and the system was extremely fast, starting THEN... During a restart I thought I would check BIOS option and pressed the blue thinkvantage, needless to say (and very disappointed, he di

  • RS232 slow bed

    Hello I'm reading the information on a sensor RS232 [M.F. meter]. Everything works fine, but I think that my reading is slower than what the manufacturer says I should get. They said that the standard data frame is 43 characters in length and in the