Home
All Oracle Error Codes
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

RE: SQL help needed

Mark W. Farnham

2006-07-10

Replies:
name   group   group_value
M       A         1
M       B         2
M       dev       4
D       etc.......


select name, sum(group_value) from test
  group by name
  having group_value = (select sum(group_value) from test where name =
'M'));

should work (off of the top of my head and my typing is not tested.)

Notice those group_values are disjoint powers of two. You could craft a
decode on your existing data to do the same thing. If you don't enforce
uniqueness on name-group tuples this could generate false answers, and you'd
have to make the statement more complicated.

-----Original Message-----
From: oracle-l-bounce@(protected)
Behalf Of David Boyd
Sent: Monday, July 10, 2006 11:18 AM
To: oracle-l@(protected)
Subject: SQL help needed

Hi List,

I was wondering if a SQL statement is possible for following query.

The name of the table is test. It has following data:

name                group
Marry                group A 1-1
Marry                group B 1-2
Marry                group dev 1-1
Ann                 group A 2-3
Dave                 group A 2-3
Dave                 group B 4-1
Dave                 group dev 3-2

I want to find out the names that are in the exact same groups as 'Marry'.
The number in the group has to be ignored. For the above data, the query
should return 'Dave' only since both Marry and Dave are in group A, group B,
and group dev.

Thanks for any input advance.

Dave

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l