SQL*Loader: Can one use '||' as delimiter...?
Hi,
Our data contains '|' and all other special characters available on keyboard.
So we decided to use '||' as delimiter - when we do so, the SQL*Loader puts an extra '|' at the end of line.
Could correct it by putting delimiter ('||') at the end of line.... Well, we can change the extract program - but is there a way to (some option somewhere) avoid such '|' without changing our extract program.
As of now, in .ctl file, we use trailing nullcols option and do not have delimiter at the end of line.
Thanks,
Sachin
Thanks - on that basis I think I'll just reconstruct the record during the procedure because for several million rows daily that is a lot of wastage, in my opinion.
Thanks for your time anyway.
Similar Messages
-
Upload Multiple files in SQL * Loader in one session
Dear all,
I want to upload multiple files using SQL*Loader in one go. In Unix its very easy as I have a quite experience of that. Could any body tell what is a way in Windows to upload multiple files in one go while using SQL * Loader. I want to run that using DOS's Batch file.
Thanks
GhulamIn Unix its very easy like we are putting $ sign.
sqlldr userid=?????/?????
control="/u12/cad_delta.ctl",log="/u12/full_extract/$1",data="/u12/$1",bad="/u12//full_extract/$1",errors=500,silent=feedback
Suggest for Windows? It should read all .DAT files of the Windows Folder.
Thanks -
How can one use Mission Control with two monitors? Please bring Spaces back
How can one use Mission Control with two monitors. With Spaces I could treat each space as a single desktop.
SyBBI use two monitors at work and have no issue. I have my mail set to use Desktop 1 and iTunes set to the second monitor of Desktop 1. I have browsers set to Desktop 2 and Fusion and RDC set to Desktop 3.
Two things that may help you. In System Preferences > Mission Control, disable the setting "Automatically rearrange spaces...". This screwed with assigning applications to certain spaces. And the other thing is don't use full screen on apps that support it. This just makes your second monitor superfluous. -
Can one use a iPod classic to restore all the songs from a crashed pc onto an iMac '12?
Can one use a iPod classic to restore all the songs from a crashed pc onto an iMac '12?
Yes
Put all the music on one computer, make sure it is authorized for all accounts, sync. -
Can one use iPhone as a dictation/recording device?
How can one use the iPhone as a dictation/recording device?
Well, the Voice Memo app will do recording of voice memos, or you can download the Dragon Dictation app. That one you can copy the text that it creates to other apps.
-
SQL*Loader: How to use Sequence and REF together?
Hi,
I'm getting the following error:
SQL*Loader-418: Bad datafile datatype for column AREA_ID.
I attempt to upload one datafile into 4 different tables.
When executing sqlldr scott/tiger control=sqlldr_aj_new.ctl
1) Here is my Control file (sqlldr_aj_new.ctl):
load data
infile 'TST_MAIN_NEW.csv'
-- Loads table "TST_AREAS"
into table TST_AREAS
REPLACE
FIELDS TERMINATED by ','
(AREA_ID SEQUENCE,
AREA_NAME,
PRODUCT_ID,
PRIORITY_ID,
PLAN_ID,
CREATED_BY_ID,
AREA_DESC)
-- Loads table "TST_TEMPLATE_SCENS"
into table TST_TEMPLATE_SCENS
REPLACE
FIELDS TERMINATED by ','
(TEMPLATE_SCEN_ID SEQUENCE,
SCENARIO_NAME,
MODIFIED_BY_ID,
SCEN_TYPE_ID,
OWNER_ID,
PRIORITY_ID,
SCOPE_ID,
SCENARIO_DESC,
AREA_ID REF(CONSTANT 'TST_AREAS', AREA_ID))
2) Here is my data file(TST_MAIN_NEW.csv)
B/S,105,1,plan_id_1,2222,area_desc1,CCEMC_PR_001,1111,1,2222,2,1,scenario_desc_1
B/S,105,1,plan_id_2,2222,area_desc2,CCEMC_PR_002,1111,2,2222,2,2,scenario_desc_2
3) Here are the tables:
TST_AREAS
Name Null? Type
AREA_ID NOT NULL NUMBER(35)
AREA_NAME CHAR(64)
PRODUCT_ID NUMBER(35)
PRIORITY_ID NUMBER(35)
PLAN_ID NUMBER(35)
CREATED_BY_ID NUMBER(35)
AREA_DESC CHAR(1000)
TST_TEMPLATE_SCENS
Name Null? Type
TEMPLATE_SCEN_ID NOT NULL NUMBER(35)
SCENARIO_NAME CHAR(500)
MODIFIED_BY_ID NUMBER(35)
SCEN_TYPE_ID NUMBER(35)
OWNER_ID NUMBER(35)
PRIORITY_ID NUMBER(35)
SCOPE_ID NUMBER(35)
SCENARIO_DESC CHAR(1000)
AREA_ID NOT NULL NUMBER(35)
Please advise what is the reason for an error.
Thank you very much!
AndreyI don't think so.
SQL> create table t (
2 rowid number);
rowid number)
ERROR at line 2:
ORA-00904: : invalid identifierPlease post your version number and the DDL for the table.
Best practice in Oracle is to NEVER, EVER, store a ROWID: They can change.
After you have solved the first problem, that you've never actually built the table, the solution to the sequence use is to make the call in your DML.
INSERT INTO t (testcol) VALUES (<sequence_name>.NEXTVAL); -
SQL-Loader Control file for Tab-delimited fields
i want to import a text-file with TAB-DELIMITED fields and a line-break + return at the end of each record.
a want to do this by sql-loader and a control file.
please, can someone give me the statement:
e.g.
load data
infile 'exaple.txt' .......
(...field1, field2,....)
thank you very muchCase Study 3: Loading a Delimited, Free-Format File
http://otn.oracle.com/pls/db92/db92.to_URL?urlname=http:%2F%2Fdownload-west.oracle.com%2Fdocs%2Fcd%2FB10501_01%2Fserver.920%2Fa96652%2Fch10.htm%231006907
Modify the example and use 'terminated by whitespace' instead
For more information on TERMINATED Fields see
http://otn.oracle.com/pls/db92/db92.to_URL?remark=drilldown&urlname=http:%2F%2Fdownload-west.oracle.com%2Fdocs%2Fcd%2FB10501_01%2Fserver.920%2Fa96652%2Fch06.htm%231013838 -
Regarding sql loader --- can we have control file to do a check on csv?
Hi,
I normally get a csv having data as
column1 ;columnb;columnc;
13 ; 12 ; 13 ;
11 ;13 ;33;
as the table where it needs to go is say table
xys( a number, b number , c number).
so the control file is fairly simple ...
But from now I need to restrict data entry if the change in format happens in the csv
say if it is like
column2;column1;column3,
12,13;12;
11;13;14;
or say the csv like
column1;column2;column3;column4;
11;13;14;15;
111;134;14;12;
in both cases sql loader should not run and throw the error saying the reason in the log.
how do i manage it in the control file `???
any ideas???
it is urgent pls help !!!
regards
SHUBH
Message was edited by:
SHUBHTry changing the following properties:
autosubmit = true;
immediate = true;
Here is a link where the user uses a transient attribute for the rows in his table:
Technology on my way...:): ADF 11g : CheckBox Demo (Select one checkbox in table, Select all/Deselect all)
Hope that helps.
Regards,
Frederico. -
SQL Loader Control File use of integer(n)
Dear Gentlemen,
I have an "ascii" file where some fields are binary of 2, 4 and 8 bytes. This file has to be loaded to oracle (8.1.7) Table using SQL Loader. According to SQL Loader documentation, for this case I must use as a field type: integer(n), where in my particular environment (Intel Windows), n may be 2, 4 or 8 according to the length of the field. Although I do not need to specify for integer(4); but, for integer(2) and integer(8), I need to specify it to get the rigth values. In the case of integer(2), it can be replaced by smallint; however for integer(8), I have to specify the number (8), and this form is not accepted as a sintactically correct statement by SQL Loader. Therefore I cannot load the correct data.
Could you please give some advice?.
Best regards,
Julio Porcel.Hi!
If it's not possible to implement through control file, load your data into some temporary table and then use power of SQL to do whatever you want with them.
Regards,
Andrew Velitchko
BrainBench MVP for Developer/2000
http://www.brainbench.com -
Inventory cube load: can I use full load?
hi,
I have an inventory cube with non-cumolative chars. Can I use full load option or I thave to load with delta for non-cumulative KFs?
Regards,
AndrzejHi Aksik,
The load will not matter in the Addregation option.You can load by full or delta.
Now the reports creation has to be done with this in mind that the figures has to come correctly.Specify the aggregation required in the properties of the keyfigure in the query.If required use a ODS in the data flow.
regards
Happy Tony -
Can one use the iPad outside the U.S. - using.....
Can I use the iPad(Wi-Fi + Cellular version) in Nigeria; using one of the GSM operators?
Thank you so very much, for anticipated replies.
Joshua.The AT&T model has a microSIM card that can be changed for the microSIM card of other 3G carriers in other countries. You cannot do this with the Verizon model.
-
SQL Developer can be used for database design
can I use SQL Developer to design the database?
It really depends on what you mean by "can," how complex the schema design is going to be, and your comfort level.
AB is quite right to point out Oracle Designer-- that's a very powerful, very visual tool for creating physical and logical schema designs. It also has a relatively steep learning curve and a relatively large installation footprint. If you need to generate highly complex schema designs, to allow multiple modelers to work together, and you will use the tool frequently enough to justify the training time, Designer is a wonderful tool.
On the other end of the spectrum, however, it's perfectly possible to generate a schema design using SQL*Plus or SQL Developer with a white board or scratch paper nearby to help think through various issues. The tools aren't presenting you with pretty ERDs, they're not automatically translating visual representations of designs to physical implementations, etc. but it's quite possible for a human using those tools to do the translation.
Either way will work-- the constraints of your particular project and your comfort level with various risks will determine which approach is more appropriate.
Justin -
HT1461 Can one use boot camp to play computer games normally only found for PCs?
I have some older computer games, specifically Warhammer 40k rts games, that I woud still like to play and was curious if boot camp would allow me to play those on my mac? Also, if it is possible am I putting my computer at risk in any way? I'd like to play them but not so badly that I would be damaging my mac pro or shortening its lifespan. There dont appear to be any emulators out there currently so I'm checking here to see if anyone knows anything.
Yes. There are several ways to run Windows on the Mac:
Windows on Intel Macs
There are presently several alternatives for running Windows on Intel Macs.
1. Install the Apple Boot Camp software. Purchase Windows
XP w/Service Pak2, Vista, or Windows 7. For Boot Camp
4.0 and above you can only use Windows 7 or later. Follow
instructions in the Boot Camp documentation on
installation of Boot Camp, creating Driver CD, and
installing Windows. Boot Camp enables you to boot the
computer into OS X or Windows.
2. Parallels Desktop for Mac and Windows XP, Vista Business,
Vista Ultimate, or Windows 7. Parallels is software
virtualization that enables running Windows concurrently
with OS X.
3. VM Fusion and Windows XP, Vista Business, Vista Ultimate,
or Windows 7. VM Fusion is software virtualization that
enables running Windows concurrently with OS X.
4. CrossOver which enables running many Windows
applications without having to install Windows. The
Windows applications can run concurrently with OS X.
5. VirtualBox is an Open Source freeware virtual machine such
as VM Fusion and Parallels that was developed by Solaris.
It is not as fully developed for the Mac as Parallels and VM
Fusion.
Note that VirtualBox, Parallels, and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc. There are performance differences between dual-boot systems and virtualization. The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech Labs- Virtualization Benchmarks, January 2013 | MacTech for comparisons of Boot Camp, Parallels, and VM Fusion. Benchmarks of all of the above except Crossover can be found in Benchmarking Parallels, Fusion, and VirtualBox Against Boot Camp - The Mac Observer. Boot Camp is only available with Leopard or later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive. -
Can one use a samson USB condensor in a 1/4" plug in?
can i use my samson usb mic with some kind of USB to 1/4" connector so that i can use the mic as if it were a shure with 1/4
or is it just for computer use with usb in?Probably not, since a condenser needs power to work, and a 1/4 inch plug is for a dynamic mic which does not.
-
Preventing SQL injection - can't use cfqueryparam in this case
Hello. I have a form with a checkbox next to each row. If the user checks some boxes, then clicks the "Delete" button, I want to execute the following query, but I want to protect it from sql injection attacks:
<cfquery datasource="#application.mainDS#">
delete userMessages
where messageID in (#form.messageID#)
</cfquery>
As written above, it works fine. But if I try to protect this code with <cfqueryparam value="#form.messageID#" cfsqltype="cf_sql_varchar">, I get this error: "Conversion failed when converting the varchar value '7,21' to data type int" (7 and 21 are the messageID's to be deleted). Obviously the comma prevents conversion to an integer.
If I use cfsqltype="cf_sql_integer", then the string gets converted to a single integer (in this case 40015, which is nonsense).
I tried passing form.messageID to a stored procedure, but I seemed to have the same problem there. I could run the query in a loop where I just delete one row at a time, but I'd like to run just one query if I can do it safely. Any ideas?
Thanks.
PKI agree that you should not do an SQL "DELETE" from a web page. Instead, use "soft deletes," where you contrive for there to be a deleted_flag (boolean), and maybe deleted_by (varchar) and deleted_timestamp. Then create an SQL "VIEW" which automagically omits the "deleted" records.
It is also a very good idea to refer to the records using a nonsensical, made-up "moniker" instead of actual record-IDs. You see, "if I am a nasty person and I know that there is a record #123456, then I'll bet I know the record-IDs of 123,455 other records, too." But if you refer to the record as "QZB0E9S" and the next record-id in the list is "4Q_9RJPEM2" then it won't take me long to realize that I can't get too far, not even by brute-force. (And if I see that the record-IDs seem to have verification tags, like "QZB0E9S:4E396", then I know that I am really scroo'd in my hacking-attempt because even if I did somehow million-monkeys my way into a valid record-ID, I've got no earthly idea how to come up with the tag.
It pays to code defensively, like this. And it doesn't really take more time. Without question, always use <cfqueryparam> !!
Maybe you are looking for
-
Internal table with an internal table
Hi, I have following definition: TYPES: BEGIN OF ty_pos, numbertype(29) TYPE c, number(29) TYPE c, END OF ty_pos. DATA: gt_pos TYPE STANDARD TABLE OF ty_pos, gs_pos LIKE LINE OF
-
F.27(Statement should be emailed if customer master contains email address)
Hi All, I am working for the tcode f.27. A standard form F140_ACC_STAT_01 is assigned to tcode. Here my requirement is i need to do some changes in the form and output should be in pdf format and statement should be emailed if customer master contain
-
Issue using JSON.stringify on object
I have the following code, which attempts to stringify the member1 object try { var member1:Object = { mediaId: meterEvent.mediaId, publisherId: meterEvent.publisherId var val:String = JSON.stringify(member1); } catch (err:Error) {
-
Is a BlackBerry ID required for a BlackBerry 10 device?
I've been a BlackBerry user since the first text pager, and got my BlackBerry ID when it first became available. However, I support both legacy and BlackBerry 10 devices, and although I know you can use a legacy BlackBerry device without having a Bl
-
Adobe Air HelloWord Application Problem
I build a app by referring the devappshtml.pdf instructions. The problem is when i use command "adt helloworld-app.xml", the cmd prompt says app:/HelloWorld.html:5 HTML ERROR: Unmatched </head> encountered. Ignoring tag. app:/HelloWorld.html:6 HTML