still struggling to find a simple explanation how I can read a csv into a temp table to use in a join when connecting to the PROD database
a csv stored locally (on windoze desktop), not uploaded to any server
on client, not on server
if I go through the "oracle sql dev" import wizard (e.g. docs.oracle.com/database/121/ADMQS/…), would this be "imported" only in memory / on the client / my local machine,
or
would it be imported-and-uploaded to the server/database I'm connected to (which I wouldn't want - and hope I do not have the permission to do so, either)
?
How can I check if the "oracle sql loader" utility is installed?
of the 5 ways the 4th ("import wizard" of "oracle sql dev.") seems most appealing intuitively
but before I give it a shot I'm still looking for some confirmation that the "import" is local-only (and won't mess with the server / the "real" database)
I don't want to import to my connection / to the database I'm connected to
I just want to use the contents of the csv to run a join-query vs a table from the connected database
stackoverflow.com/a/49077724/2153622 ("Inline external tables enable the runtime definition of an external table as part of a SQL statement, without creating the external table as persistent object in the data dictionary.")
that might be it? but it seems to be available only in newer versions (>18c; not in 11g :(
@nuttyaboutnatty I think usually it means importing data into a database. If you are importing something into Oracle, then you are importing it into your Oracle database (the one that's handled by the Oracle RDBMS).
What do you mean by importing data locally only?
Where would it be stored? What software would be handling it as a low-level layer that provides you with the access to that data as a flat dataset (presumably)?
When speaking about using data handled by different platforms (e.g. Oracle and Access), I think there's a different term for that.
I think, in PostgreSQL it's handled using the concept called Foreign Data Wrapper. In SQL Server you would use Linked Servers (although there are ways to provide raw connection attributes without persisting a connection as an object).
So there may be some kind of initial query that extracts the subset of data that you are interested in, and then you want to be able to run other queries on that subset without "disturbing" (certainly without writing to) the source database?
((in Access (everything stored locally, no connection to any other database hosted on servers), I'm running the LEFT JOIN on two imported local tables))
Okay, another attempt. You have a database, you get a CSV extract from it (doesn't matter how), you want to use the RDBMS that handles that database as an engine (to run SQL queries on the obtained CSV) without writing the CSV contents to that database first. And the reason you are thinking about that RDBMS is because you don't have any other, except Access, which apparently doesn't count
is that "imported" to the database on the server, or is it only in "temporary" memory for a given query? (I'm new to this and am unfamiliar with the correct terminologies/concepts) — nutty about natty32 secs ago
@AndriyM I run a select * from [the database/tables from the "real" database I'm connected to via "oracle sql dev"]
and get "real" / "live" data
then I have a separate, static, flat-file csv stored locally
The read-only requirement concerns not just the data itself (you don't want to upload the CSV into the database), but presumably also any meta-data (you don't want to create any objects in the database that would serve to just temporarily facilitate querying of the CSV), correct?
I mean, this should be solvable theoretically. An RDBMS should in theory be able to create an on-the-fly connection to a system ODBC driver capable of representing a CSV to the RDBMS in a standardised form. I think SQL Server uses the OPENROWSET function for that. No idea what, if any, counterpart to that Oracle has.
Answer provided by John Eisbrener in a comment
The effective equivalent is a Database Link. Sadly there's not an identical equivalent to what OPENROWSET does in one Oracle command or statement. You have to declare the db link first before accessing it. If you don't want to edit a tnsnames.ora...
To which the answer appears to be creation of a Database Link, which probably fails the read-only requirement
@JackDouglas As an attempt at a quick recap, nutty has a CSV file and wants to use it as a table in a database while having read-only privileges in that database. Importing the data or creating any metadata objects to facilitate the connection is out of the question. Is that possible in Oracle 11g?
"The external tables feature is a complement to existing SQL*Loader functionality. It enables you to access data in external sources as if it were in a table in the database"
Yeah, that might be the clincher. But I guess all that could be used as part of the question to help explain the problem and request for an alternative
@nuttyaboutnatty see above if it helps in any way ^^^