Select in Oracle 8i

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

Poston Tue, 01 Jul 2008 9:13 am

First >> the Oracle does not accept INNER JOIN, LEFT JOIN, RIGTH?

Now, I would like some help in Sql because I capengo a little with this: I have two tables: Dept and Stock. The inventory table has a field NU_DPTO that is key in the Dpto. Need to bring stores that have parts in stock, sorted by which has the greater amount. The rule is: QTDE_PECAS: QTDE_ESTOQUE_PA + QTDE_ESTOQUE_PA_OUT.
These attributes only exist in the inventory table. Can only come Dpto (stores) that have qtde_pecas > 0. I would like to thank all INCE.
Location: São Paulo

Tudo posso, nAquel que me fortalece
Filipenses 4:13

Poston Tue, 01 Jul 2008 9:46 am

Guy, oracle supports left and inner join!
Attempts to use it in this way left outer join.

Now do a join loved the two tables, then used a Max in the field where you want to locate the most using the ORDER BY field DESC.
Then WHERE the condition > 0 qtde_pecas places.

Espero q me help you!

Location: cariacica - es

Thiago Vetis
Creedence Clearwater Revival - :-o

Return to SQL

Who is online

Users browsing this forum: No registered users and 3 guests