Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: bind variable

Re: bind variable

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 29 Jul 2007 12:44:53 -0700
Message-ID: <1185738289.181928@bubbleator.drizzle.com>


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_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Jul 29 2007 - 14:44:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US