How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AM
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files.
Similar Messages
-
How can display date and time in text item ?
Hello all,
I have placed two text items (named text_item1,text_item2).
I want to place the current date in one text item and place current time in another text item. how can i place this?Hi
This depends on ur needs
WHEN-NEW-FORM-INSTANCE > if u want to appear it on the very begining moment
--=============
u can use
WHEN-VALIDATE-ITEM > on ur date fields
Here is a link that may help u decide where to take off with this code...
http://www.dotnetspider.com/resources/22433-Triggers.aspx
http://www.slideshare.net/magupta26/oracle-forms-tutorial
Hope this helps ,
Regards,
Abdetu... -
Readind Date and Time from a folder.Urgent help please
Folks,
I need some help regd reading of date and time from a folder.
I have a folder which has 5 files.
I need to read these files along with the date and time
The date and time has to be in the format:
mm/dd/yy and the time in 11:55
I am attaching my code below,
The f.lastModified() doesnt display the data in the current format
Can some one please please help me to get the data in the format defined above
private void readFoldert(){
String folder = "/images/";
File f1 = new File(folder);
ArrayList al = new ArrayList();
if(f1.isDirectory()){
String s[] = f1.list();
for(int i=0; i<s.length;i++){
al.add(s[i] + f1.lastModified);
} // End of if.
Here's how to format a time. I hope you can figure out how to format a date:import java.text.*;
import java.util.*;
public class Test {
public static void main (String[] parameters) {
Calendar calendar = new GregorianCalendar ();
calendar.setTimeInMillis (new java.io.File ("c:\\windows").lastModified ());
System.out.println (DateFormat.getTimeInstance (DateFormat.MEDIUM).format (calendar.getTime ()));
}Kind regards,
Levi -
How to load the data from .csv file to oracle table???
Hi,
I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
Thanks in advance981145 wrote:
Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
the command is
sqlldrType it and see if you have it installed.
Have a look also at the FAQ link posted by Marwin.
There are plenty of examples also on the web.
Regards.
Al -
How to read date and time with Oracle_Loader (10g)
ip pc username date time
1.1.1.1 WS1 test 2000/01/01 01:01:01
I am trying to read the date and time from data formatted as above from a .txt file.
create TABLE test (IP char(20), OCID char(15), ID char(30), date_logon date, time_logon date)
ORGANIZATION EXTERNAL (TYPE ORACLE_loader DEFAULT DIRECTORY phonebook
ACCESS PARAMETERS (FIELDS TERMINATED BY WHITESPACE
(IP char(20),
OCID char(15),
ID char(30),
date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd",
time_logon char(30) date_FORMAT date MASK "hh24:mi:ss"))
LOCATION ('test.log'));
However, my external table returns a date (2007-05-01) AND the time for the time_logon column (e.g. 2007-05-01 01:01:01) . I just want the time (e.g. 01:01:01).
What am I doing wrong?
*I tried: date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd hh24:mi:ss", reading both the date and time at the same time, but it doesn't work.
Thanks.Justin, thank you so much for your help.
When I try:
SELECT a.ip, a.ocid, a.id, TO_CHAR( a.date_logon, 'DD-MON-YYYY HH24:MI:SS' )
FROM test a
date_logon entries are all dd-mon-yyyy and 00:00:00 (i.e. no time was stored).
I don't have control over the text file, so I don't think I can make any changes to the formatting.
I tried to declare the column as 'timestamp':
date_logon char(60) DATE_FORMAT timestamp MASK "yyyy/mm/dd hh24:mi:ss",
but time is still displayed as 00:00:00:000.... which leads me to suspect that the culprit is the space between date and time in the text file.
Say if I have 2007/05/25 and 2007/05/01 16:19:23 in two separate date columns. Is it possible to grab the time from the second column and append it to the first column (while still retaining the DATE property, i.e. 2007/05/25 16:19:23).
Thanks! -
Is there a way to remove the date and time from pictures?
Is there a way to remove the date and time from phoos in iPhoto?
Are you referring to the Date and Time some cameras put right on the image? If so there is nothing really good in iPhoto to do this. You could try the Retouch tool and see how that looks but I think you will need something more precise and powerful, like the clone tool in Aperture.
Also something like PhotoShop or GIMP - The GNU Image Manipulation Program (free) should do what you want also.
If your asking about some other date post back.
regards -
How to get last modified date and time of a file which is in apache server.
Hi ,
I need to get last modified date and time of a file in remote machine.
This file is in remote machine which has apache server installed.
I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
URI is got from apache server URL by using toURI method.
when I use lastModified method , its throwing exception , because scheme of URI is not file.
I can't give scheme as file because ftp server is not installed on that server
Is there any other way to get this information .No, unless you can use an FTP client.
-
How do you date and time stamp iCal entries? We share an event calendar and need to know when a new event was entered into iCal.
BKBK,
Thank you for your response. That does adequately cover the
client-originated sessions, but still leaves the ability I am
looking for unavailable.
It did serve to definitively answer my most pressing
question, however, with this statement:
Note: ColdFusion cannot create a session if an initiator
application uses a SendGatewayMessage method to start an
interaction with a client, such as an SMS user. In this case, the
sending code must keep track (for example, in a database) of the
messages it sends and their destinations. When a response event
arrives, it can look up the origniatorID to determine whether it
was in response to an outgoing message.
I will play around with the Application scope to see if there
might be a workable solution there.
RLS -
How to compare date and time together
Hi,
How to compare Date and Time together?
For example in a database table there are two fields rundate and runtime. I want to compare these two with perticular date and time in the program. Like, I want to pull all the records where the records's date and time are less than a perticular date and time in the program.
Hope the question is clear...
Thanks.
KavitaHi Kavita
There is no as such Date and Time Comparision FM in Standard SAP But You can define your own like this
<b>FUNCTION ZAV4_COMPAREDATETIME.
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(DATE1) TYPE DATS
*" REFERENCE(TIME1) TYPE TIMS
*" REFERENCE(DATE2) TYPE DATS
*" REFERENCE(TIME2) TYPE TIMS
*" EXPORTING
*" VALUE(TWOISMORETOPICAL) TYPE C
twoismoretopical = ''.
if date2 > date1.
twoismoretopical = 'X'.
else.
if date2 = date1 and time2 > time1.
twoismoretopical = 'X'.
endif.
endif.
ENDFUNCTION.</b>
Regards
Mithlesh -
How to display date and time on jsf page
Hi,
how to display date and time on jsf page
we are using 11.2.0.0 jdeveloper on windows.
thanks
Edited by: user12187801 on 26-Jul-2012 01:42Your question is certainly lacking some information.
If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
If you meant something else, then it's back to you to explain. -
How to set date and time on apple tv
how to set date and time on apple tv
Assuming this is not the first time you have used your Apple TV
1. You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
2. Also try restarting the router.
3. If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123. -
How to find date and time on iphone's photo taken?
in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
LN -
How to Extract data and reports from the SAP BW warehouse
Hi to All Guru's
I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools. After Extracting the data from SAP BW how can we move all the data to Cognos. It would be kind enough to provide me with any documentation or links. Step by step procedure would be very much helpfull to me.
Thanks
VenuHi Voodi
Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos. Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this. Thanks for your concern.
Venu -
"how to load a text file to oracle table"
hi to all
can anybody help me "how to load a text file to oracle table", this is first time i am doing, plz give me steps.
Regards
MKhaleelUsage: SQLLOAD keyword=value [,keyword=value,...]
Valid Keywords:
userid -- ORACLE username/password
control -- Control file name
log -- Log file name
bad -- Bad file name
data -- Data file name
discard -- Discard file name
discardmax -- Number of discards to allow (Default all)
skip -- Number of logical records to skip (Default 0)
load -- Number of logical records to load (Default all)
errors -- Number of errors to allow (Default 50)
rows -- Number of rows in conventional path bind array or between direct path data saves (Default: Conventional path 64, Direct path all)
bindsize -- Size of conventional path bind array in bytes (Default 256000)
silent -- Suppress messages during run (header, feedback, errors, discards, partitions)
direct -- use direct path (Default FALSE)
parfile -- parameter file: name of file that contains parameter specifications
parallel -- do parallel load (Default FALSE)
file -- File to allocate extents from
skip_unusable_indexes -- disallow/allow unusable indexes or index partitions (Default FALSE)
skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable (Default FALSE)
commit_discontinued -- commit loaded rows when load is discontinued (Default FALSE)
readsize -- Size of Read buffer (Default 1048576)
external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE
(Default NOT_USED)
columnarrayrows -- Number of rows for direct path column array (Default 5000)
streamsize -- Size of direct path stream buffer in bytes (Default 256000)
multithreading -- use multithreading in direct path
resumable -- enable or disable resumable for current session (Default FALSE)
resumable_name -- text string to help identify resumable statement
resumable_timeout -- wait time (in seconds) for RESUMABLE (Default 7200)
PLEASE NOTE: Command-line parameters may be specified either by position or by keywords. An example of the former case is 'sqlldr scott/tiger foo'; an example of the latter is 'sqlldr control=foo userid=scott/tiger'. One may specify parameters by position before but not after parameters specified by keywords. For example, 'sqlldr scott/tiger control=foo logfile=log' is allowed, but 'sqlldr scott/tiger control=foo log' is not, even though the position of the parameter 'log' is correct.
SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\PFS2004.CTL LOG=D:\PFS2004.LOG BAD=D:\PFS2004.BAD DATA=D:\PFS2004.CSV
SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\CLAB2004.CTL LOG=D:\CLAB2004.LOG BAD=D:\CLAB2004.BAD DATA=D:\CLAB2004.CSV
SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CTL LOG=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.LOG BAD=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.BAD DATA=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CSV -
Date and Time in Sender File Adapter Target Directory
Hi there,
is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
For filename you can use "add time stamp" option, but and for target directory?
Thanks and regards,
Henrique.> <i>Do you have further information on how to perform
> this with shell commands?</i>
> >> You need to write a shell script. This script will
> add the date/time stamp into the folder in the target
> system. This shell script is executed from the File
> adapter. So once the file is written into the target
> directory, then it will rename the directory.
Hi there, Moorthy
We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
Is there a way of passing %var1% and %var2% as parameters for the shell script?
Thanks a lot,
Henrique.
Maybe you are looking for
-
Where can i get the report server name in Reports 10g
Where can i get my report server name in 10G ?
-
Is there just a widget or plugin that allows me to add a search bar to my site?
-
Hi all can i know what is the function module to: Downloads internal table and opens it in MS Excel and Uploads an *.xls file to internal table. thks.
-
hello, I would like to know if I need to be extra careful using the Mac pro when occurring storms because of the lightnings on electricity. Someone told me that the Mac already has some kind of lightning protection but I want to be sure. Thanks very
-
Itunes not available in iPhoto for slideshow since Yosemite update
I updated to Yosemite yesterday. Today I can no longer find iTunes when trying to create a slideshow in iPhoto. Mac suggests I open iTunes before continuing but iTunes is open. I have searched and this prompted me to find library.xml file and drag