SQL & PL/SQL :: Empty Text File With Data In UNIX

Apr 14, 2010

I have text file with data in UNIX. I want to clear only records(make empty the file) using UTL_FILE..

I know we can remove the text file from UNIX and create file again with same name...

Is there any other way??

View 5 Replies


ADVERTISEMENT

Forms :: Checking To See If A Text Item Is Empty

Aug 8, 2010

I was wondering can i check if a text item in another block is empty when a user try to create a record using a button in another block.

/*creating a program that will check to see if the customer id in the customer block is null it will then display the the stop alert and tell the user that he/she cant create a new order without having a selected a customer*/

--this is the block_item im checking to see if it null
IF (:customer.c_id) = NULL THEN
DISPLAY_ORD_STOP_ALERT;
GO_ITEM('CUSTOMER.C_ID');
[code]....

View 5 Replies View Related

Forms :: Export Text File With Same File As Imported Text File?

May 30, 2011

Is it possible to get the same name of file name from imported text file?

What i've is, I import the text file then I exported it.

can I get the same name of the imported text file?

View 2 Replies View Related

SQL & PL/SQL :: Copy Bulk Data In Text File?

Oct 9, 2013

i want table data exported to txt file, data is around 3200000,

View 14 Replies View Related

Receiving Data From Upstream Through Text File

Feb 9, 2011

We are receiving data from our upstream through text file, they are extracting that text file from their oracle table.In the table in ename colmn some names are having the special character like

Chng
OReilly

We are loading the data from that text file into our oracle tables and the names are loading as it is.Now we are extracting data as text file from our tables which is loaded from or upstream,then the special character is changing as the names are changing as Chng OReilly. We are loading the data from the text file into our tables and the names are loading as

Chng OReilly and i tried to replace the special character with while loading but it is loading as .If I try to change the character with '(Apostrophe) while loading it is changing.

The data type of the column is VARCHAR2(20)

NLS_CHARACTERSET is UTF8

Version Oracle 9i

View 6 Replies View Related

SQL & PL/SQL :: Load Data From Oracle To Text File?

Jun 18, 2013

I want to load data from oracle table to flat file(csv/text file). Is there SQL query to do this?

View 14 Replies View Related

SQL & PL/SQL :: Receiving Data From Upstream Through Text File

Feb 9, 2011

We are receiving data from our upstream through text file, they are extracting that text file from their oracle table.In the table in ename colmn some names are having the special character like '

Ch'ng
O'Reilly

We are loading the data from that text file into our oracle tables and the names are loading as it is.Now we are extracting data as text file from our tables which is loaded from or upstream,then the special character ' is changing as ¿the names are changing as Chang Reilly.

We are loading the data from the text file into our tables and the names are loading as Chang O¿Reilly and i tried to replace the special character ¿ with ' while loading but it is loading as ¿.

If I try to change the character ¿ with '(Apostrophe) while loading it is changing.

The data type of the column is VARCHAR2(20)

NLS_CHARACTERSET is UTF8

View 27 Replies View Related

Exporting Data From Tables To External Text File?

Apr 29, 2008

Actually what i am trying to do is to extract data form tables and place them in an external text file....i wrote the following code

FUNCTION

create or replace
FUNCTION dump_data ( p_query in varchar2,
p_separator in varchar2 ,

[Code].....

View 3 Replies View Related

Server Utilities :: Porting Data From Text File?

Jun 8, 2011

I have a data in text file which has around 7 laks lines. I need to import those data into a table in oracle then do some process.

Since this job is done by end user, i have created a form with the following process.

Create a single text file from multiple flat files in client system. Run the application from the application server [ which is unix based ] once the text file is uploaded to the server, read the text file line by line and insert into the table.

The above process works perfectly in test eniviroment which I have as stand alone system. When I move this to application server and execute it, the session got killed after an hour and I got network inturpted error.

I would like to know is there any other method instead of reading line by line and insert into a table. I do not want to use the tools like sql Loader etc since I do not want my user to do lot of things.

View 6 Replies View Related

Forms :: Reading And Writing Data In A Text File

Mar 8, 2011

I need to read data from text file(located on application or db server or on some other server, however path is known to me.) and then append some data in it.

Data will be read and written on daily basis so i want to clear all data on date change.

View 3 Replies View Related

SQL & PL/SQL :: Extract Data From Local Database Table To Text File?

Jun 27, 2013

i want to extract data from my local database table to text file using plsql

View 4 Replies View Related

SQL & PL/SQL :: Export Table Data Into Text File Through Procedure / Package

Oct 8, 2012

I want to get all the column values in a table and save them into a text file.Beside UTL_FILE, is there any other method which will result better performance in writing to text file?

noted that the data does exist 32k.

View 39 Replies View Related

Server Utilities :: Unload Data From Oracle To Text File?

Jun 14, 2012

We have around 30 million rows in a table which we are extracting through UTIL_FILE and sending this file to somewhere to other systems.

But this extraction taking too much time.

Is there any way out to optimize this process or any new stuff.

View 3 Replies View Related

Forms :: Text Box To Accommodate Large External File Text

Dec 30, 2010

I have a requirement in one of my forms screen.I have a text box(large text area) which should display a help text file when i move my cursor on the topics displayed on the screen.know the code and the properties to be changed in the text box to accommodate large external file text.

View 1 Replies View Related

PL/SQL :: External Table With Empty File

Oct 9, 2013

My db version: Oracle 11g I have an empty csv file.I created a external table for the empty csv file.When I run:select count(*) from externaltblname;It returns 1. It should return 0 right. In the definition, I specified "SKIP 1"But still it returns 1. When I use this external table to load into a target table. It loads a single row with null values.How to fix this.

View 2 Replies View Related

Drop Index Tablespace - File Is Non-empty

Oct 15, 2012

db 10.2.0.4
AIX 5.2

I am trying to drop a index tablespace I moved all indexes to new tablespace there is no indexes in that tablespace even any objects but still it is not dropping.it is giving error as below.

SQL> drop tablespace ret_index including contents;
drop tablespace ret_index including contents
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key

SQL> alter tablespace ret_index drop datafile '/path/index3.dbf';
alter tablespace ret_index drop datafile '/path/ret_index3.dbf'
*
ERROR at line 1:
ORA-03262: the file is non-empty

try to resize

SQL> alter database datafile 4 resize 100m;
alter database datafile 4 resize 100m
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value

Tablespace size is 280gb

View 32 Replies View Related

Zip A File In Unix Server Using PL/SQL

Oct 12, 2010

I have to pick a text file created in UNIX server directory and send it as an mail attachment.The problem here is, when the file size exceeding more than 10 MB. I think there is a way to zip a file in UNIX with some .gz extension or something like that.

how to zip a file in unix server using PL/SQL code. So that I will pick the zipped file and send it as an attachment.

View 4 Replies View Related

Client Tools :: How To Get Rid Of First EMPTY Line Of Spooled File

May 30, 2011

how to get rid of the first EMPTY line generated by SQL*Plus when spool'ing to a file.

I tried using set pagesize 0 and while that get rid of the empty blank line, it also disabled the heading ...

Currently using sed as a work around. But unfortunately, can't use sed on Windows?

set pagesize 200
set heading on
set trimspool on
set lines 200
set verify off
set echo off
set feedback off

[code].......

As mentioned, using pagesize 0 remove the blank line but I also lost the heading.

View 4 Replies View Related

PL/SQL :: Spool File Output From Unix To Windows

May 22, 2013

I'm running a sql file in Unix (using SQLPLUS command) and i want the file output to be sent to local windows directory. I specified the windows directory name in my Spool command (Spool C:/<Directory Name> ) , But it is not working

Our Unix server is a FTP server but i don't want to FTP the spool file from unix to Windows as the spool file is Huge and it takes hours for the transfer to complete (and we have to run the script multiple times).

Is there a way i can have the spool file created in Local windows directory when i run my sql script in Unix?

View 5 Replies View Related

Forms :: Read File From Unix (Database Server)?

Apr 15, 2010

I need to develop a form which has to read and display the contents of a text file that is stored in the Unix system where the Oracle data base is installed. So basically its the database server and not the forms application server.

1. Create an external table for the file everytime when the form is loaded by dropping and re creating the table and base the data block in the form on that table and execute_query and display the contents.

2. I am confused whether to use webutil or utlfile packages to read from the file and display on the screen as the file resides in the database or Oracle server and not forms application server or client machine.

View 5 Replies View Related

SQL & PL/SQL :: Attaching A File Residing On Unix And Emailing It Through Oracle?

Nov 11, 2011

I have a file which is placed on a certain location on unix server. I want to write a code which picks up that file and emails it to certain recipients.

View 3 Replies View Related

Unix Command Run Successfully Through PL/SQL But Showing No Impact In UNIX?

May 19, 2007

I am using Oracle 9i and Unix on my system and trying to execute a UNIX shell command through external procedure in C.I created a shared lib (libextproc.so) for the following function.

int sysrun(char *command)
{
return system(command);
}

This function runs fine when caled through a driver function in C, meaning that the shared lib is fine.In PL/SQL, I have used the following method to invoke a UNIX command:-
create or replace library shell_lib as '/home/ECETRAonsite/oracle/OraHome1/lib/libextproc.so';
/
create or replace function sysrun (syscomm in varchar2)
return binary_integer
as language C
name "sysrun"
library shell_lib
parameters(syscomm string);
/

Now when I call this PL/SQL function to invoke the command, it is run succesfully but does not create the file.

SQL>
1 declare
2 rc number;
3 begin
4 rc := sysrun('/bin/touch /home/ECETRAonsite/oracle/OraHome1/test/sach');
5 dbms_output.put_line('Return Code='||rc);
6* end;
SQL> /
Return Code=0

PL/SQL procedure successfully completed.I have verified that the path for 'touch' is correct.Following are my configuration files.
listener.ora
-------------
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =

[code]...

View 1 Replies View Related

Forms :: Replica Of Windows Explorer - Read UNIX File System

Jun 14, 2011

I would like to develop a form which will be replica of windows explorer.It should be able to read all files or files from a specific folder from an unix platform.

if yes can i have a template. I do not want to start from the scratch since I do not have much time.

View 5 Replies View Related

SQL & PL/SQL :: Load Data Into Empty Table?

Jul 25, 2011

There is one table with data in ORCL1 database.I have created the table using create table statement in ORCL2 database.Now i want to insert only the data into table.

I know one method ... drop the table i created using drop table statement and then create the table with data using export/import.

Is there any other way we can load data into empty table?

View 29 Replies View Related

Backup & Recovery :: ORACLE Dump File To Text File

Apr 9, 2011

Oracle10g to Sybase12.5 Migration:- How a Oracle dump file can be converted to any text file/xls file which will be loaded in sybase database later through BCP.

means
1.Exporting objects as dump file from Oracle.
2.Is there any tool/process available that can convert this into csv/txt/xls file.
3.This files can be loaded in sybase.

View 2 Replies View Related

Security :: Network Data Encryption Between Oracle Client And Server On Unix?

Jun 4, 2010

We have an application that fetches and writes data into oracle database through pro c. oracle datyabase is on another server.

We are storing some secure information into oracle database so we want to encrypt the data sent by our aplication into oracle database.We do not want to use SSL(i.e certificates) and also do not want to make use of Advance Security Option available in oracle and also do not want to make any changes in sqlnet.ora file on server side.

achieve encryption of traffic between our application and Oracle database?

View 13 Replies View Related

Generate A Text File

Apr 28, 2008

i have be requested to create a .txt file. Its for a program that will read the txt file i create to produce a letter i.e I will be extracting, TITLE, FORENAME, SURNAME etc

MR
JOE
BLOGGS

Here is the my code so far,

SELECT
LPA_INPUT.INPUT_TITLE,
LPA_INPUT.INPUT_SURNAME,
LPA_HISTORY.LPA_AMT,
LPA_HISTORY.ELIG_RATE,
LPA_HISTORY.RATE_REBATE,
LPA_HISTORY.RR_AMT,
LPA_HISTORY.LPA_APPLIC,
LPA_HISTORY.LPA_AMT
FROM LPA_HISTORY, LPA_INPUT
WHERE LPA_HISTORY.CLAIM_NO = LPA_INPUT.CLAIM_NO
----------------------------------------------------
Iv been asked to have these eight fields looping over and over for all the records in the database, So im not sure how to do that and how to generate it in a txt file?! I have to produce it in a script and not by a Export/Import wizard in sql server mangement studio!!!

View 11 Replies View Related

SQL & PL/SQL :: Convert PLB To Text File?

Feb 11, 2011

is there anyway to convert plb file to sql file or text file

View 20 Replies View Related

Import From Text File To Table

Dec 14, 2006

I want to load data to a table and from a simple file text, using a Vb.net application which will connect to a oracle 10g , or a SqlServer or a MySql database, depending the params.

When i connect to a SqlServer Database i use the sql command "BULK INSERT CODPOSTAL2 FROM file.txt with( DATAFILETYPE = 'char',FIELDTERMINATOR = ';', ROWTERMINATOR = '
')"m" and it works fine.

With a DB Mysql i use "LOAD DATA INFILE file.txt INTO TABLE CODPOSTAL2 FIELDS TERMINATED BY ';''" and also works.

My problem is with Oracle. I tried the same example as MySql, but it gaves the error "wrong" ou "unknown command". I also tried in Sql*Plus but it seems to not recognised the command "LOAD".

Another thing, i can't use the Oracle Loader, it must be like this.

View 5 Replies View Related

SQL & PL/SQL :: Convert Excel File Into Text?

Aug 2, 2010

i want to convert an excel file into text and then into oracle table.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved