Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select statement pass paramter to a get statement

Status
Not open for further replies.
Mar 7, 2010
61
Hi

Using Bethnic golden32 connecting to oracle db.

I have a supplier table which as a blobidx. All i know is to get the details of this blob i run the following (specifying the blobidx:

select get_blob(blobidx) from dual;

**Change the blobidx to the number you are inputting

My supplier table stores the blobidx, so I just want to pass it directly from the supplier table, but I am not clear on the sql as to how.

Can anyone help?

Thanks

 
This is the Microsoft SQL Server and thus not the correct place to ask an Oracle.

However, I would guess you could do something like:

select get_blob((SELECT blobidx FROM Suppliers WHERE SupplierId=123)) from dual;

Of course, you will need to supply the correct WHERE clause instead of my made-up example, and I doubt you really want to select from "dual", which is a kind of "fake" table in Oracle.

And this may not work because I don't know if Oracle will let you put inline SQL statements as parameters to function calls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top