File Content Loading to Oracle Error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File Content Loading to Oracle Error
# 1  
Old 04-18-2013
File Content Loading to Oracle Error

I habe a UNIX Variablw with content as below:

Code:
 WHOLE_REC_TXT="$record"

where $record contains contents of file

Sample contents of file:

Code:
topic_id|1624|AIDS-HIV||
topic_id|1625|Allergies||
topic_id|1626|Alzheimer s||
topic_id|1627|Knee Pain||
topic_id|1628|Autism||
topic_id|1629|Atrial Fibrillation||
topic_id|1630|Acne Care||
topic_id|1632|Urinary Tract Infection||
topic_id|1633|Children's Vaccines||
topic_id|1634|HPV / Genital Warts||

i want to load the WHOLE_REC_TXT to a column in oracle table.
But it throws me error:

Code:
ERROR:
ORA-01756: quoted string not properly terminated

Let me know if i am doing something worng.
# 2  
Old 04-18-2013
Please show your code.
# 3  
Old 04-18-2013
The problem is most likely the single quote in this line (hard to say without seeing your code):
Code:
topic_id|1633|Children's Vaccines||

Use two single quotes to insert a single quote when working with string literals:
Code:
topic_id|1633|Children''s Vaccines||

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Getting an error while loading class.

Hello Team, java -cp "./RIPError.jar; ./RIP31.jar; ./RIP31msg_en_US.jar" ResubmitErrors -Ahost -P18505 Getting an error like: Error: Could not find or load main class ResubmitErrors What does this mean? Please make NOTE of 3 things here: 1- Kindly DO NOT hijack posts from... (1 Reply)
Discussion started by: xgringo
1 Replies

2. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

hi all, i had the below script x=`cat input.txt |wc -1` awk 'NR>1 && NR<'$x' ' input.txt > output.txt by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

3. Shell Programming and Scripting

Loading data in oracle using shell scripts

Hi , I have a scenario, i have a directory where i receive around 14-15 files at a interval of 20-40 min not fixed, i want to write a unix scripts which invoke sqlldr command to load files into oracle automatically as soon as the file hit the directory. Any help will be appreciated. ... (4 Replies)
Discussion started by: guddu_12
4 Replies

4. Shell Programming and Scripting

Excution Problems with loading huge data content and convert it

Hi, I got long list of referred file content: CGTGCFTGCGTFREDG PEOGDKGJDGKLJGKL DFGDSFIODUFIODSUF FSDOFJSODIFJSIODFJ DSFSDFDFSDOFJFOSF SDFOSDJFOJFPPIPIOP . . . Input file content: >sample_1 SDFDSKLFKDSLSDFSDFDFGDSFIODUFIODSUFSDDSFDSSDFDSFAS (14 Replies)
Discussion started by: patrick87
14 Replies

5. Red Hat

Error loading operating system

i do not know much about linux, but i have a machine running ONLY red hat enterprise linux AS (or at least that is what i used to see when i start my machine). i was doing something on my machine and there was a power cut. my system went off and now when i restart the machine the first thing it... (2 Replies)
Discussion started by: esibobo
2 Replies

6. Shell Programming and Scripting

Loading Oracle data to unix in flat file

Hi I would like to know how to load oracle data to unix flat file using a shell script. Can we use sqlldr to import data from oracle, if so can anyone help me with it. (2 Replies)
Discussion started by: raghav288
2 Replies

7. Shell Programming and Scripting

Function loading in a shell scripting like class loading in java

Like class loader in java, can we make a function loader in shell script, for this can someone throw some light on how internally bash runs a shell script , what happenes in runtime ... thanks in advance.. (1 Reply)
Discussion started by: mpsc_sela
1 Replies

8. SuSE

Error when loading

Hi all, I'm trying to install Open SUSE and after the installation it will not boot. At first I thought it could be something wrong with the setup so I re-installed. Then it would still fail on the boot. When trying to boot in safe mode these are the last few lines just before it just sits... (7 Replies)
Discussion started by: woofie
7 Replies

9. Shell Programming and Scripting

{Urgent very need help} script for conn oracle and get the content

hi experts, very need help about script how to login into oracle database and select a table and append the query into a file. i have oracle database and have a table named omc_ip with fields like host_id(varchar2(20)),ip(varchar2(10)) and update_date(date). i want to build a script that... (15 Replies)
Discussion started by: bucci
15 Replies

10. Shell Programming and Scripting

Shell Script for Data loading in Oracle

Hi All I am new to unix. I need a shell script to load a datafile in to oracle. I already have a control file, and data file. all I need is if i execute the shell it must load the data using the ctl file to table. Control file : PAY0001.ctl Datafile : mon_grs_det.dat log file :... (3 Replies)
Discussion started by: raghuraja_r
3 Replies
Login or Register to Ask a Question