Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Problem with limitation of result

Problem with limitation of result

2004-06-29       - By Beni Buess

Reply:     1     2     3     4     5     6     7     8  

Hi,

the following query works as a normal query:

SELECT sc.seccodedesc AS ACCOUNTOWNER, oppsc.seccodedesc AS
OPPORTUNITYOWNER, acc.account, ui.username, opp.description AS OFFERNO,
opp.actualclose, opp.reason, opp.estimatedclose, opp.status,
opp.actualamount, sod.project_no, opp.actualamount, sod.project_name,
sod.category, sod.notes, sod.swisslogprob, sod.projectprob,
((sod.swisslogprob * sod.projectprob)/100) AS probability,
sod.targetproject, sod.req_for_pro, sod.handover, sod.createdate

FROM opportunity opp, swl_opp_desc sod, seccode sc, seccode oppsc,
account acc, userinfo ui
   WHERE                              sod.opportunityid = opp.opportunityid
   AND opp.seccodeid = oppsc.seccodeid
   AND acc.accountid = opp.accountid
   AND acc.seccodeid = sc.seccodeid
   AND ui.userid = opp.ACCOUNTMANAGERID

but doesn 't work as a subquery or a view. i should have this as a
subquery, because i want to limit the result using ROWNUM. so i 've made
the following:

SELECT ROWNUM, oppview.* FROM
   (SELECT sc.seccodedesc AS ACCOUNTOWNER, oppsc.seccodedesc AS
OPPORTUNITYOWNER, acc.account, ui.username, opp.description AS OFFERNO,
opp.actualclose, opp.reason, opp.estimatedclose, opp.status,
opp.actualamount, sod.project_no, opp.actualamount, sod.project_name,
sod.category, sod.notes, sod.swisslogprob, sod.projectprob,
((sod.swisslogprob * sod.projectprob)/100) AS probability,
sod.targetproject, sod.req_for_pro, sod.handover, sod.createdate
   FROM opportunity opp, swl_opp_desc sod, seccode sc, seccode oppsc,
account acc, userinfo ui
   WHERE                              sod.opportunityid = opp.opportunityid
   AND opp.seccodeid = oppsc.seccodeid
   AND   acc.accountid = opp.accountid
   AND acc.seccodeid = sc.seccodeid
   AND ui.userid = opp.ACCOUNTMANAGERID) oppview
WHERE ROWNUM BETWEEN 0 AND 10

then i get "ORA-00918 (See ORA-00918.ora-code.com): column ambiguously defined ".


would be great if somebody could explain me what causes that error and
how to do that the right way.


thanks
beni

__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
This message may contain legally privileged or confidential
information and is therefore addressed to the named persons only.
The recipient should inform the sender and delete this message,
if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity
and punctuality of this message.
The sender has activated an automatic virus scanning by
Messagelabs, but does not guarantee the virus free
transmission of this message.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --