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 -> inconsistant sql behavior

inconsistant sql behavior

From: <edmundo70_at_my-deja.com>
Date: Fri, 20 Aug 1999 17:35:20 GMT
Message-ID: <7pk3kn$3nq$1@nnrp1.deja.com>


Hello folks,

I have a query where I want to do a subselect for a count.

select

     vdl.EnteredDate as ListDate,
	(select count(*) as ShowingCount from
        dev.ListingShowing ls
     where
        ls.ListingID = vdl.ListingID) as ShowingCount

from

    myView vdl

__

This works in Pl/sql but when I try to make it as a cursor, I get something like "not expecting Select"...

Here is another way that I thought should work but doesn't select

      cnt.ShowingCount

from

      myView vdl,
  	(select count(*) as ShowingCount from
        dev.ListingShowing ls
     where
        ls.ListingID =  vdl.ListingID) cnt


___

I guess vdl is not defined in the correlated subquery.

Thoughts?

Thx,
-Ed

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Aug 20 1999 - 12:35:20 CDT

Original text of this message

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