How to write control file below data
Hi,
Here is my table
create table sample1 (name varchar2(5), num number(2));
sample.txt(Datafile)
vikram12
sharma13
sonu 14
Here is my control file
load data
infile 'C:\sample.txt'
into table sample1
fields terminated by "," optionally enclosed by '"'
( name char(5), num char(2) )
But it rejecting all the records. Just let me know where i went wrong.
Thanks in advance
fields terminated by "," optionally enclosed by
'"' As per your control file, the fields have to be seperated by commas but in your datafile it is seperated by space. Either change the delimiter in your control file or in your datafile
Using Comma Seperated file,
sample.txt(Datafile)
vikram,12
sharma,13
sonu, 14
load data
infile 'C:\sample.txt'
into table sample1
fields terminated by ","
optionally enclosed by '"'
( name char(5),
num char(2)
)Note:
1. You have to increase the length of name column as your datafile has values greater than 5 characters. First and second records will be rejected with NAME VARCHAR2(5)
Similar Messages
-
ORA-01190: control file or data file 1 is from before the last RESETLOGS
hi, experts.
i have oradb 11g and using it for OIM11
after some actions in oim i try to get my db to previous state (many times it was done successfully)
but now i have problem ORA-01190: control file or data file 1 is from before the last RESETLOGS
im runing in noarchivelog mode
i have autobackup of controlfile and i have 2 backups of my db
please help me
maybe some one know how to restore my backup to new db and then change configuration of wls and oim...Hi, Thanks for reply
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 OIMDB 2372279074 PARENT 1 02-APR-10
2 2 OIMDB 2372279074 PARENT 940976 11-JUL-11
3 3 OIMDB 2372279074 PARENT 5590849 09-AUG-11
4 4 OIMDB 2372279074 PARENT 5590850 10-AUG-11
5 5 OIMDB 2372279074 PARENT 5596482 11-AUG-11
7 7 OIMDB 2372279074 PARENT 5596483 11-AUG-11
8 8 OIMDB 2372279074 PARENT 5596484 12-AUG-11
6 6 OIMDB 2372279074 ORPHAN 5622931 11-AUG-11
9 9 OIMDB 2372279074 PARENT 5627526 18-AUG-11
10 10 OIMDB 2372279074 PARENT 5627527 18-AUG-11
11 11 OIMDB 2372279074 ORPHAN 5627528 18-AUG-11
12 12 OIMDB 2372279074 CURRENT 5627528 18-AUG-11
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
9 Full 1.50G DISK 00:00:31 12-AUG-11
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NNNDF_TAG20110812T114515_749PJDCW_.BKP
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
1 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
10 Full 9.36M DISK 00:00:01 12-AUG-11
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NCSNF_TAG20110812T114515_749PKJJS_.BKP
SPFILE Included: Modification time: 12-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 5627525 Ckp time: 12-AUG-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
11 Full 1.33G DISK 00:00:26 16-AUG-11
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NNNDF_TAG20110816T094954_74N183D7_.BKP
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
1 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
12 Full 9.36M DISK 00:00:01 16-AUG-11
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NCSNF_TAG20110816T094954_74N197JO_.BKP
SPFILE Included: Modification time: 16-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 6118204 Ckp time: 16-AUG-11How to reset database to right incarnation.? -
Help needed to write control file.
Hi Guys,
i need to write one control file to upload data from .txt file to oracle table.
.txt file data contains like this
2006041110:40:22
2006041111:30:42
2006041210:40:22
i need to upload this data into date column in oracle table.
please help me to write control file for this requirement.
Thanks for your help and timedata1 "to_date(:data1, 'YYYYMMDDHH24:MI:SS')"
-
Can any one please tell me how to write labview program for data logging in electric motor bike. I am going to use CompactRIO for getting wide range of data from various sensors in bike. I need to write labview program for data logging of temperature, voltage and speed of the bike. Can any one help me?
Yes, we can.
I think the best place for you to start for this is the NI Developer Zone. I recommend beginning with these tutorials I found by searching on "data log rio". There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
NI Compact RIO Setup and Services -> http://zone.ni.com/devzone/cda/tut/p/id/11394
Getting Started with CompactRIO - Logging Data to Disk -> http://zone.ni.com/devzone/cda/tut/p/id/11198
Getting Started with CompactRIO - Performing Basic Control -> http://zone.ni.com/devzone/cda/tut/p/id/11197
These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
Jason
Wire Warrior
Behold the power of LabVIEW as my army of Roomba minions streaks across the floor! -
How do I clear files in data & usage
How do I clear files in data & usage, or is it important and has is not to be removed
I don't beleive you can. It's attached to the app the app that requires it. If you're looking to clear space, you can look for individual files to delete within the app, such as podcasts within the podcast app. Or you would have to delete the app entirely.
-
How to Restore Control file to New Server
I want to test my backup by restoring the full backup of my production database on a separate test server.
I have taken following action for restore to test server:
• Copy full backup to Test Server on same folder where it was in Production Server.
• Copy parameter file to Test Server. (Edit control file location on it)
• Connect Rman
• Set DB with new DBID
• Startup Nomount (from new parameter file)
RUN
ALLOCATE CHANNEL c1 TYPE DISK;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
Then we found following error:
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
Starting restore at 07-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20071107
channel ORA_DISK_1: looking for autobackup on day: 20071106
channel ORA_DISK_1: looking for autobackup on day: 20071105
channel ORA_DISK_1: looking for autobackup on day: 20071104
channel ORA_DISK_1: looking for autobackup on day: 20071103
channel ORA_DISK_1: looking for autobackup on day: 20071102
channel ORA_DISK_1: looking for autobackup on day: 20071101
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2007 16:35:13
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
Can anyone guide me, how to restore control file?
IrfanRMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
Starting restore at 07-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day:
20071107
channel ORA_DISK_1: looking for autobackup on day:
20071106
channel ORA_DISK_1: looking for autobackup on day:
20071105
channel ORA_DISK_1: looking for autobackup on day:
20071104
channel ORA_DISK_1: looking for autobackup on day:
20071103
channel ORA_DISK_1: looking for autobackup on day:
20071102
channel ORA_DISK_1: looking for autobackup on day:
20071101
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571:It seems to me its not finding the contolfile from 7 days before sysdate ,increase the window size using
RMAN>restore controlfile from autobackup maxdays 15;Khurram -
How to write WSDD file to deploy web service
I write a server code,I want to deploy it as service,but I don't know how to write WSDD file?I use AXIS and SOAP
I need help,thanks a lot.
Regards
William
2.24Yes, put your wsdd with your class files. But if you want AdminClient to work correctly, be sure all environement variables are set correctly.
Me, I never use it, I prefer to modify directly the server-config.wsdd -
How to write a file using mod pl/sql
hi,
i am having a submit button in my procedure. which should inturn create .sql file in a file path.
is there any way to create a fileusing htp and htf methods.
Thanks in advance
Hari>
i am having a submit button in my procedure. which should in turn create .sql file in a file path.
is there any way to create a file using htp and htf methods.
>
Why are you wasting your time coding from scratch using the PL/SQL Web Toolkit instead of the APEX framework?
From Re: how to write a file using mod pl/sql it appears that you are not using APEX, so a number of the approaches APEX offers are not relevant. You appear to be looking for a file download solution using the <tt>wpg_docload.download_file</tt> method, such as:
create or replace procedure download_file (
p_filename in varchar2
, p_mimetype in varchar2
, p_content in out nocopy blob)
is
begin
-- Set up HTTP header.
-- Use "application/octet" as default MIME type.
owa_util.mime_header(nvl(p_mimetype, 'application/octet'), false);
-- Set the size so the browser knows how much to download.
htp.p('Content-length: ' || dbms_lob.getlength(p_content));
-- Filename will be used as default by the browser in "Save as..."
htp.p('Content-Disposition: attachment; filename="' || p_filename || '"');
-- Close header.
owa_util.http_header_close();
-- Stream the file content to the browser.
wpg_docload.download_file(p_content);
end download_file; -
How to write text file in Shockwave?
Does anybody know how to write text file in Shockwave to
user's disk?
Thanks in advance.Those Xtras can wreak to much havoc when used with the wrong
intent.
What you can do is write with setpref and store a list of
saves and the
saves itself seperatly. Then you'd have to build your own
save/open
dialog to let the user:
* pick a previously saved file to load or overwrite
* have the user type the name of a new file to save.
Only thing that remains is that the user cannot decide where
the files
are saved.
Manno
SiuLinda wrote:
> Thanks a lot for your reply.
> Yes, cookies is good but I have to write a program to
save the text file in
> where the user wants, user can open these files later if
they like, like using
> Filextra and Fileio, but I found all of these xtras seem
to be not supported in
> shockwave.
>
Manno Bult
[email protected] -
How to convert Flat file(.txt) data to an Idoc format(ORDERS05)
Hi,
How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
thanks in advance,
Chand
Moderator message : Duplicate post locked. Read forum rules before posting.
Edited by: Vinod Kumar on Jul 26, 2011 11:11 AMHi,
For more information, please check this link.
http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
Regards -
How do I transfer files and data from my Samsung Galaxy tab 2 to my Macbook Air?
How do I transfer files and data from my Samsung Galaxy tab 2 to my Macbook Air? The Macbook does not even recognize the device. I get an error message. I follow the instructions on the message, which tells me to install "Kies" and Android file transfer. This does not help. What do I do?
See:
iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device -
How to write certain file On jCD through Java
hi all,
I got big problem in java , would anybody tell me how to write certain file onto CD through java. Is there any API available for this.
Thanks in advance
--HarishYou might check this thread.
http://forum.java.sun.com/thread.jspa?threadID=212748&tstart=90 -
How to write one row of data at a time to "Write to File"
I am trying to write 10 parameters to the LV "Write to File". This is for just one row at a time. This happens evertime I get a failure in my test routine. I am not quite sure how to accomplish this task. If I get another failure I write one row again. I testing 4 DUTS at a time so I write this row of data to each file. I am sure it is very simple.
Thanks
PhilipAssuming your 10 parameters are an numeric array with 10 elements, use "write to spreadsheet" file with append set to true. (... and if they are scalars, built the array first ).
LabVIEW Champion . Do more with less code and in less time . -
How to write custom messages to Data Manager package log from within SSIS?
Just wonder in BPC 7.0/7.5 MS how do you write custom messages to Data Manager package log from within SSIS? I mean I want to log output of specific custom tasks (non-BPC) in SSIS control flow to the resultant BPC package log created when running SSIS package in Data Manager. Can this be done in a Script Task or some other way? Not much documentation out there on this.
Thanks,
BrianHi Brian
In order to achieve what you want, it can get tricky in your package, ultimately It would depend on the task, for example if you had an execute SQL task, you could use a RAISEERROR command in your SQL statement and BPC would return the error message that you specified.
If you had other tasks, then it would be a bit more tricky, you would have to have custom messages based on event handlers.
Please see below links for examples :
[Custom messages for logging|http://msdn.microsoft.com/en-us/library/ms345174.aspx]
[Custom Logging Using Event Handlers |http://consultingblogs.emc.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx]
Hope this helps
Kind Regards
Daniel -
How to generate .txt file from data in internal table
Hi I am using the program below to load .txt file into SAP table.
I am moving the records from a .txt file into internal table final and then into ZOUT_CCFOBS table.
How do I load records from internal table final back to another .txt file with the same layout? Pls advice.
REPORT ZOUP_LOAD_CCF_OBS.
TABLES: ZOUT_CCFOBS.
TYPES: BEGIN OF tline, "structure to store a line of each row
line(1000) TYPE c,
END OF tline.
TYPES: BEGIN OF i_split, "structure to store split record of each row
t_ZOTFACIL(100) TYPE c,
t_ZOTCCF(8) TYPE c,
t_ZOTOBSCAT(100) TYPE c,
END OF i_split.
DATA: itab TYPE TABLE OF tline WITH HEADER LINE.
DATA: idat TYPE TABLE OF i_split WITH HEADER LINE.
DATA: final TYPE STANDARD TABLE OF ZOUT_CCFOBS WITH HEADER LINE.
DATA: file_str TYPE string.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
c_search_dir TYPE dxfields-longpath.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS p_file LIKE rlgrap-filename. "file location
SELECTION-SCREEN END OF BLOCK a1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_dxfilename USING p_file.
START-OF-SELECTION.
Download data from application server
PERFORM download_data.
file_str = p_file.
LOOP AT itab.
CLEAR idat.
this will split the line at every delimeter into single field
SPLIT itab-line AT ',' INTO idat-t_ZOTFACIL
idat-t_ZOTCCF
idat-t_ZOTOBSCAT.
APPEND idat.
ENDLOOP.
copying the internal table into final table which compatible with table tcurr
LOOP AT idat.
final-ZOTFACIL = idat-t_ZOTFACIL.
final-ZOTCCF = idat-t_ZOTCCF.
final-ZOTOBSCAT = idat-t_ZOTOBSCAT.
APPEND final.
ENDLOOP.
LOOP AT final.
MODIFY ZOUT_CCFOBS FROM final.
IF sy-subrc EQ 0.
MESSAGE S001(ZCURR).
ELSE.
MESSAGE A000(ZCURR).
ENDIF.
ENDLOOP.
FORM f4_dxfilename USING p_file.
addition TAICK 15/07/2008.
*maintain application server default search path.
IF sy-sysid = 'BWP'.
c_search_dir = '//rdmsbw/prd/data/output/all'.
ELSEIF sy-sysid = 'BWQ'.
c_search_dir = '//rdmsbw/uat/data/output/all'.
ELSEIF sy-sysid = 'BWD'.
IF sy-mandt = '900'.
c_search_dir = '//rdmsbw/sit/data/output/all'.
ELSE.
c_search_dir = '//rdmsbw/dev/data/output/all'.
ENDIF.
ENDIF.
DATA: wa_file LIKE dxfields-longpath.
CLEAR: wa_file.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = c_search_dir
filemask = c_fnh_mask
fileoperation = 'R'
IMPORTING
o_path = wa_file
EXCEPTIONS
rfc_error = 1
error_with_gui = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_file = wa_file.
ENDIF.
addition end TAICK 15/07/2008.
ENDFORM. " f4_dxfilename
FORM download_data .
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
IF sy-subrc <> 0.
exit.
ENDIF.
READ DATASET p_file INTO itab.
if sy-subrc = 0.
APPEND itab.
clear itab.
endif.
ENDDO.
CLOSE DATASET p_file.
delete itab index 1. "remove column header
ENDFORM. " download_data
Edited by: RebekahMBB on Feb 20, 2012 12:56 PMHi I am using this piece of code to download my internal table into an .xls file on my pc.
FORM Z_CONVERT_EXCEL .
"This part of code to add column name in the downloaded file.
data : begin of int_head occurs 0,
Filed1(20) type c, " Header Data
end of int_head.
int_head-Filed1 = 'ZOTOUS'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'ZOTOUS'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'ZOTOGCUR'.
APPEND int_head.
CLEAR int_head.
Select ZOTOUS ZOTSYORGU ZOTOGCUR from ZOUT_ORG_CURR into CORRESPONDING FIELDS OF TABLE itab.
v_filetype = '.xls'. "I just manipulate the file name using XLS file type.
v_filename = 'C:\Documents and Settings\00088592\Desktop\OUs automation\development'.
CONCATENATE v_filename v_filetype INTO lv_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_filename
filetype = 'ASC'
APPEND = 'X'
write_field_separator = 'X'
CONFIRM_OVERWRITE = 'X'
TABLES
data_tab = itab
FIELDNAMES = int_head
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. "Z_CONVERT_EXCEL
As you can see the code specifies the header row separately and appends it in int_head.
What if I have 76 fields or more? I cant be specifying each like that.
Is there any other way to do this? To move the 76 field headers into int_head?
Pls help.
Thanks!
Maybe you are looking for
-
Restore Time Machine backup on fresh Leopard install without disc.
I just got my iMac back from the Apple Store where they fitted a new hard drive with a fresh installation of Leopard. I've got an external drive with a Time Machine backup of my old HD, but don't know how to restore it. Unfortunately I forgot to ask
-
Keyboard not working after water spill
Ok, so a while back I spilt some water on my MBP and I shut it off immediately and took it in to have it looked at. I was told it was pretty much hopeless and that it'd be cheaper to buy a new one. So I just left it alone and would periodically test
-
Regarding: Oracle Reporting tool
hi all is there any reporting tool in oracle for designing reports for my application. I have already tried reports with crystal report but it is too slow. Thanks Regards S
-
Hello All... My name waqas and I own a HP PAVILION15-e053se Laptop couple of months ago. PLEASE CAN ANYBODY CONFIRM THAT MY HP PAVILION 15-s053se Laptop IS COMPATIBLE FOR THE UP-GRADATION OF BACKLIT KEYBOARD, IF COMPATIBLE, DOES ALL THE KEY STROKES
-
Subscriptions are not userfriendly
Subscriptions became useless due to a recent change earlier i was using 2500 min per month to india subscription & used to go for additional 2500 min same subscription if free min.s completed before a month time. now its not allowed and new subscrip