Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading client machine flat file from SQL in Toad

user13667036Apr 11 2013 — edited May 13 2013
Hello,
I want to use a list of ID's saved in a text file in a where clause of a SQL statement (very similar to this post 2346082 I am on a Winodws7 client machine and logging onto oracle 11gR2. I can do it from sql*Plus
SELECT DB.table1.col1
FROM DB.table1 
where 1=1
and col1 IN 
    (
          @c:\my_directory\file_name.csv   --space before @ is white-space not tab
    )
and 1=1;
where file_name has entries:
'123123123',
'234234234',
'345345345',
.
.
.
This works fine when in I try with sql*Plus. But when I try in IDE's like Toad or SQL-developer it throws an error: "ERROR ORA-00936: missing expression". Any idea why it's happening and how to solve it? I don't have permission to create UTL_FILE directory object, more over this file is on my (client) machine. Also I don't want to load the file to an Oracle table using sql-loader.

BTY, can you create external table on client machine?

Thanks

Edited by: user13667036 on May 13, 2013 11:24 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2013
Added on Apr 11 2013
3 comments
1,584 views