Re: bind variable



cptkirkh wrote:
I have a visual basic application that uses a sql query that uses bind
variables to extract a result. I have noticed that i can't use bind
variables in a from clause. Is there anyway to pull the max of one
column and then another column in the table that corrsponds to that
row? Here is my sql query.

"select ec.ec_export_number,ec_date from event_campaign ec, " &_
" (select max(ec_export_number) as maxexport from
event_campaign" & _
" where EC_PURPOSE = :event_purpose AND EC_ITEM_SENT
= :item_sent" & _
" and EC_SQL = :sql_totalcount ) maxresults where " & _
" ec.ec_export_number = maxresults.maxexport and EC_PURPOSE
= :aevent_purpose AND EC_ITEM_SENT = :aitem_sent " & _
" and EC_SQL = :asql_totalcount"

Either concatenate the column in or use DBMS_SQL.
--
Daniel A. Morgan
University of Washington
damorgan@xxxxxxxxxxxxxxxx (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
.



Relevant Pages

  • Re: bind variable
    ... variables to extract a result. ... I have noticed that i can't use bind ... variables in a from clause. ... Is there anyway to pull the max of one ...
    (comp.databases.oracle.server)
  • Re: SEARCH QUERIES VERY SLOW - HOW TO IMPROVE SPEED?
    ... that the initial where clause was having a lot of OR and the final ... and then I'd pull up all the data needed for those IDS. ... My buddy told me to avoid the use of "Like" comparisons, ... I will include the code for the most time consuming query. ...
    (microsoft.public.access.queries)
  • RE: extracting embedded or Ole Object data
    ... file that you want to extract certain strings. ... I have need to pull text data from an embedded, or an OLE object I pull ...
    (microsoft.public.excel.programming)
  • Re: Getting all rows of data that have a value in a particular col
    ... You want to extract all entries that are not n/a to another location. ... needed to pull in 10 columns for only about 20-40 rows? ... I'm going to break for dinner but I'll put together a sample file ... but whether or not it's practical depends on how many cells ...
    (microsoft.public.excel.misc)
  • RE: extracting embedded or Ole Object data
    ... and then I know how to import txt files to excel. ... graphic images and you can't extract text from these files. ... update those maps, and because of the map update we need to update our excel ... I have need to pull text data from an embedded, or an OLE object I pull ...
    (microsoft.public.excel.programming)