This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes Problem with select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with select" Watch "Problem with select" New topic
Author

Problem with select

kusturica
Greenhorn

Joined: Oct 01, 2002
Posts: 2
Hi all!
I have the following:
SELECT pre.id_preaviso, pre.num_preaviso, TO_CHAR(pre.f_inip,'dd/mm/yyyy') f_inip,
TO_CHAR(pre.f_presentacion,'dd/mm/yyyy') f_presentacion, c.nss, pre.nom_centro,
pre.id_via, pre.via_nombre, pre.via_num, pre.via_num_bis, pre.via_escalera,
pre.via_planta, pre.via_puerta, pre.localidad, pre.rama,pre.autonomia,
pre.provincia,pre.municipio,pre.comarca,pre.delegacion,pre.sector,pre.subsector,
ap.id_acta FROM preavisos pre,centros c, actas_preavisos ap
WHERE (ap.id_preaviso(+) = pre.id_preaviso) AND (pre.id_centro = c.id_centro)
AND pre.num_preaviso IS NULL
AND ROWNUM <= 1001
How could I make (ap.id_preaviso(+) = pre.id_preaviso) in a different way, faster?

Thanks .
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1751
    
    2
kusturica,
Please take another look at the JavaRanch Naming Policy. We'd like to have you continue posting here, so please update your display name. You can do so here.
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1751
    
    2
Originally posted by kusturica:
How could I make (ap.id_preaviso(+) = pre.id_preaviso) in a different way, faster?

I'm not sure what you're asking.
If you're talking about performance tuning, then I'm the wrong guy to respond.
If your query needs to have the outer join in it to retrieve the appropriate data, then I don't see much alternative.
[ October 01, 2002: Message edited by: Michael Matola ]
 
wood burning stoves
 
subject: Problem with select