tags:

views:

34

answers:

2

Hi i have a file that consists of ids.

my statement is

select * from table_name where id in (?)

? in the statement should have ids.....but those ids are in file.

help me please what i have to write in the place of ? symbol

without creating table in database cant we done above thing?

Thanks in advance

+4  A: 

You should import the file into the database.

You can use SQL*Loader for that, or create a table with ORGANIZATION EXTERNAL

Quassnoi
+1 for external tables
APC
without creating table in database cant we do above operation?
musicking123
`@musicking123`: it's not a table a such. It looks like a table but is stored in a file, not in a tablespace. You cannot do it without changing a schema.
Quassnoi
Thank u .........
musicking123
A: 

You could compose the SQL query as a string in the (PHP/C#/Java/other) code that uses the database. I'd really think that either keeping the IDs in the database or importing the file would be the easiest way, if there isn't something about your constraints that prevents it.

T.R.