Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Advice on how to query data
instead of doing multiple joining u can use the following code..
select orgName from contacts c, contactActs cs
where c.id = cs.id
and c.id = 100 (*variable for PL/SQL Block)
and cs.ContactActId in (17,24,43,44) (*list of variable by user input
for PL/SQL Block)
or can write PL/SQL blcok with same SQL by getting two variable as
input
Orgnisation Id and ContactActIds respectively...
remember: not to forget multiple ContactActIds
Instead of using static like c.id = 100 or cs.ContactActId in
(17,24,43,44)
.....
Kerul, DBA(SQL SERVER 2000, Oracle 8i)
Received on Mon Mar 28 2005 - 00:15:28 CST