Select With

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc

Poston Mon, 28 Jan 2008 3:27 pm

Hello good afternoon people.
Does anyone have any examples of select with the with??
And when it is more appropriate ....
Grateful Debby:)
Location: Salvador - BA

Poston Tue, 29 Jan 2008 2:56 pm

As a matter of fact that \"With\" is one that can be used to connect by?

Code: Select all
   START WITH last_name = 'Jose'

Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP

Poston Tue, 29 Jan 2008 5:33 pm

Hello Cristiano No.. This WITH use in oralce9 i in select.
For performance improvement ...
He also works with insert/select ... I'vê tested and a process that used to take 20 minutes before ... < insert 1 and 2 updtate ´ s > now do in 4 minutes using the WITH ...
My question now is this::: how to use it on update???

Thank You Debby:)
Location: Salvador - BA

Poston Tue, 29 Jan 2008 5:41 pm

Debby, I located this example below:
Code: Select all
update table_two
   set field01 = nvl((
   with s as
   select end_date,
   dense_rank() over ( partition by trunc(end_date, 'mon') order by end_date ) r
   from the_table
   select distinct r
  from s
  where s.end_date = table_two.datefield02  12 ), 0) + 2
tries to make the adaptation to your case and, qualquer thing, says ai.
Location: Araraquara - SP


OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional

Poston Mon, 11 Feb 2008 5:55 pm

Hello cheezburger network is precisely so the example you were looking for. I'll try ...

Thanks again Sds, Debby:)
Location: Salvador - BA

Return to SQL

Who is online

Users browsing this forum: No registered users and 6 guests