|
I'm trying to pull the last 4 records from an Oracle database and the
SQL code isn't quite working.... the error I'm getting
says the From keyword is not found where expected....
Any help would be greatly appreciated.
Thanks
Nick
Select p.sAddr1 name TOP 4 , p.sCode propcode , attributes.SUBGROUP2 proptype , attributes.SUBGROUP1 advisor , attributes.SUBGROUP13 status , ASCAP15.dtDate dt , ASCAP15.A_AFTOTALRETURN af_totret , ASCAP15.A_AFINCOMERETURN af_incret , ASCAP15.A_AFAPPRECRETURN af_appret From Property p , Attributes , ASCAP15 Where p.hMy = attributes.hProp and p.hMy = ASCAP15.hProp (+) and attributes.SUBGROUP2<> ' ' and attributes.SUBGROUP13<> 'Proposed Purch' ORDER BY p.sAddr1 DESC, ASCAP15.dtDate ASC
|
|
Er, actually, it's your "TOP 4" phrase that's in the wrong place. It should come immediately after SELECT.
I also find your lack of JOIN disturbing. Not wrong, necessarily, but disturbing. I generally find that this kind of implicit JOIN is very error-prone.
|