Can one explain me in details how to store a text file in a table.For example I have a text file named as aa.txt.I want to store it in a table.Or i can also create a table in order to store it.How can i store it in that table.Please explain it in details.
10 10484
you need to user the datatype BFILE for your purpose.
you need to user the datatype BFILE for your purpose.
Thanks for your reply.I understand i have to use BFILE.But can u tell me the entire procedure in details.
try the following steps - create directory DIR1 as 'd:\data'
-
-
create table filetable(id number(6),filename bfile)
-
-
insert into filetable values (1,bfilename('DIR1','filename'));
the file to be stored must be in the specified directory / path
The BFILENAME function does not validate that the user has READ privileges on the specified file or directory alias. It also does not perform a physical check to see if the directory or file actually exist. Instead, these checks are performed when access against the BFILE object is attempted.
There are several issues to keep in mind with directory aliases:
An alias is a database object, an "internal" name for an external, filesystem-based directory location.
You must create a directory alias before you can use it.
To create a directory alias, you will need the CREATE DIRECTORY or CREATE ANY DIRECTORY system privileges.
To access a directory alias, you must be the owner or be granted the READ privilege on that alias.
Directory aliases can be case-sensitive!
try the following steps - create directory DIR1 as 'd:\data'
-
-
create table filetable(id number(6),filename bfile)
-
-
insert into filetable values (1,bfilename('DIR1','filename'));
the file to be stored must be in the specified directory / path
Thank you sir.But still I found one problem.It is stored in the database.But when I using 'select * from filetable;' Then It showing value error under filename column.Then how can i see the contents of the file which is stored inside the column filename.
Suppose if u dont have the prvileges then connect to DBA account or ask your DBA to do the same for you and grant the privilege:
SQL> GRANT CREATE DIRECTORY TO user_name;
SQL> CREATE DIRECTORY dd AS 'd:\data';
if u want to grant previleges on the directory then.
SQL> GRANT READ ON DIRECTORY projects TO new_user;
ALL_DIRECTORIES is the data dictionary view for directories.
In the call to BFILENAME, the case used to set that directory alias must match the case originally used to define the directory alias.
may i know please what is the tool u are using.
may i know plese what is the tool u are using.
I am using pl/sql developer.
Column or attribute of type BFILE can not be displayed by using plsql developer or by SQL* PLUS.
u need to retrive it programitically.
Column or attribute of type BFILE can not be displayed by using plsql developer or by SQL* PLUS.
u need to retrive it programitically.
Please tell me the procedure to retrieve it programitically.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Christopher Brandsdal |
last post by:
Hi!
I have a delicatg problem....
I have made a registration form for adding my friends information in a
database. The problem is that I want to connect the persons with companies
in the same...
|
by: Roy Gourgi |
last post by:
Hi,
I am used to working in Visual FoxPro and I would like to be able to create
a database and store and retrieve information from it. What is the simplest
way to do it and what should I be...
|
by: Mark |
last post by:
I'm trying to port the asp.net unleashed sample store from SQLServer to
Access. I have it all do, execpt when I try and add something to the cart I
geet this error:
Exception Details:...
|
by: Rudy |
last post by:
Hello all!
I am amazed how many posts I have read to store an image in SQL, and just as
many against it. So I learned how to store an image in a SQL db and retrieve
the image. A little tricky,...
|
by: rdemyan via AccessMonster.com |
last post by:
I'm trying to implement a licensing scheme. There are three types of
licenses:
Trial - good for 30 to 60 days
Interim - good for 1 year
Fully Paid - no expiration
Everything is working fine...
|
by: tlyczko |
last post by:
I am new to SS2005, and I've just started working on a small test/dev
database.
I recently read that one should store things like tables, views,
constraints, etc. in the *.ndf file rather than...
|
by: c676228 |
last post by:
Hi everyone,
I am just wodering in asp program, if there is anybody writing store
procedure for inserting data into database since there are so many parameters
need to be passed into store...
|
by: prabunewindia |
last post by:
Hello everybody,
here i am going to explain, how to get mails from Outlook express database and store in our own database(local)
Initially you have to add the refference Outlook library10.0 or...
|
by: harshad |
last post by:
Dear All,Here I am facing problem to store image.I am trying to store byte
array(image) in to session variable so at time of update I will got that
byte array and I do my update. here i am given...
|
by: M.-A. Lemburg |
last post by:
On 2008-08-07 20:41, Laszlo Nagy wrote:
1
It also very fast at dumping/loading lists, tuples, dictionaries,
floats, etc.
--
Marc-Andre Lemburg
eGenix.com
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |