searching for a string in the

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

Poston Mon, 03 Dec 2007 11:33 am

Following technicians: I need two things: 1° As I show every table at the Bank? I am using the command \"select * from all_tables;\" but as I'm using straight from termianl he shows all table baguncadas and that's why I don't understand what is the q.

2nd I'm a registered user but I do not know what is the tablea that he included (not worth to mention that he can be in tables users in heheh) who can help me I thank hugs
neto.sabino
Location: SP

Sabino Neto

Poston Mon, 03 Dec 2007 12:12 pm

And Grandson, beleza?

in search of all_tables u can filter by table_name, e.g.
Code: Select all
SELECT TABLE_NAME FROM ALL_TABLES WHERE OWNER='proprietario'
/
the second question I don't quite understand, this userid of the Bank or system?

[] 's
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP

Poston Mon, 03 Dec 2007 12:12 pm

Brother, beleza?

Using SQL * Plus?
If so, give a:
Code: Select all
SET LINESIZE 10000;
and then list again.
On the issue of your user tables, searched the USER_TABLES?
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Mon, 03 Dec 2007 1:05 pm

then: I'm using the same console, but wouldn't have problem I open a plsql block, but then need to do correct cursor?

And my second point was that I registered by om system user and wanted to know which table was made this inclusion (the serivodor of the code is not working). Leveraging also wanted to know what are the tables that does the FK to the registration table of users.

Thanks
neto.sabino
Location: SP

Sabino Neto

Poston Mon, 03 Dec 2007 1:14 pm

Brother, About the CONSTRAINTS, are here:
Code: Select all
SELECT *
FROM user_constraints
WHERE TABLE_NAME LIKE '%TUA_TABELA%';
another tip: About CONSTRAINTS, search here on the Forum by [color = BLUE] USER_CONSTRAINTS [/color] or CONSTRAINTS you will find interesting links, like this: http://www.glufke.net/oracle/viewtopic. ... onstraints On the list: If you want to place in PL/SQL, or creates an implicit cursor (FOR) or an explicit cursor rightwith OPEN, FETCH, and CLOSE LOOP, beleza?

You can also find examples here on the Forum, searching for CURSOR.

qualquer thing, says ai.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Mon, 03 Dec 2007 1:19 pm

brothe earned will give only a search in tables.

VAM leveraging (again hehehe). Man I am having trouble configuring a DBMS to access the Bank.

Probelams: I do not know what is the SId of the Bank.

Could you help me?
neto.sabino
Location: SP

Sabino Neto

Poston Mon, 03 Dec 2007 1:20 pm

And ai Sabino, beleza?

To make the query you can user a cursor if you want, or you can make a direct loop, e.g..
Code: Select all
for reg in (select * from ...) loop

end loop;
here's a script you can use to find the fk's their table.
Code: Select all
SELECT TPAI.TABLE_NAME TABELA_PAI
       , TFILHA.TABLE_NAME TABELA_FILHA
       , CFILHA.COLUMN_NAME COLUNA_TABELA_FILHA
FROM   SYS.ALL_CONSTRAINTS TPAI
       INNER JOIN SYS.ALL_CONSTRAINTS TFILHA ON TPAI.CONSTRAINT_NAME = TFILHA.R_CONSTRAINT_NAME
       INNER JOIN SYS.ALL_CONS_COLUMNS CFILHA ON TFILHA.CONSTRAINT_NAME = CFILHA.CONSTRAINT_NAME
WHERE  TPAI.CONSTRAINT_TYPE = 'P' --  ( PRIMARY )
       AND TPAI.TABLE_NAME = 'T_PAI'  -- INFORMAR NOME DA TABELA PAI
ORDER BY TABELA_FILHA, COLUNA_TABELA_FILHA
If you want to do something more dynamic você you can use the select above together with some examples of research in Bank, q can be found on this link.
http://www.glufke.net/oracle/viewtopic. ... ht=execute

[]'s
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP

Poston Mon, 03 Dec 2007 1:23 pm

Brother, about the Bank ... next ...
I know that in the table below contains some information, but I think you'd better post a specific topic here on the Forum, at the DBA that they will help you, surely you can be?

Code: Select all
SELECT * FROM V$DATABASE;
qualquer thing, we're there.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP


  • See also
    Replies
    Views
    Last Post


      Return to SQL

      Who is online

      Users browsing this forum: Google [Bot] and 3 guests