How to find DB tables containing specific columns (ORG_ID / ORGANIZATION_ID)
Hi all, I would like to know if someone has developed a script to find all tables containing the columns (fields) specific.
I'm on a migration project where I don't have access to the source of the DB, I just ask for queries and I to reflect all the tables DB containing specific data of organization.
So the first step was to understand used tables and I get them, now I understand what tables have Org_id / Organization_ID and fields of the SOURCE of the LANGUAGE/LANGUAGE (source DB has much set Org and many languages also, so I need to filter the 100total 6ORG_ID and 2 languages of 8 total installed)
Can anyone help?
Thank you
Best regards
Pietro
Hello
You can see this:
Find all tables in db with the name of the column of a particular string?
Kind regards
MihaiF
Tags: Database
Similar Questions
-
How to find a table, using the name of the column in the database schema
Dear all,
Please help me on
using the name of the column, how to find a table name in the database schema.
Thanks in advanceHello
You can query the data dictionary views all_tab_columns and user_tab_columns.
For example, to find the tables in the scott schema have called deptno columns:SELECT table_name FROM all_tab_columns WHERE owner = 'SCOTT' AND column_name = 'DEPTNO';
Remember that anything inside quotes is case-sensitive.
The all_tab_columns view has one row for each column in each table (or view) that you have the privileges to use.
The user_tab_columns view is a subset of all_tab_columns, containing only your own tables (and views). -
How to find the name of the column in the tables
Hello..
Suppose that there are thousands of table in the database. Out of them a few tables contain the column name as 'ENTRY_BY '.
I want to know the tables that have columns like "ENTRY_BY".
... Please suggest for this query.
all_tab_cols
Select * from all_tab_cols
where column_name like ' % INPUT % ';
Post edited by: Rajavignesh
-
How to find the page contains the indesign sdk?
PLS, someone help me, how to find the page contains the indesign sdk?
Thank you
screen410099
Don't know, if you find a shorter way, but it works:
UIDRef language = YOUR_TABLE;
Error result code.
do
{
InterfacePtr
textModel; TextIndex beginning;
Len Int32;
result = table_get_text_model (read, 0, 0, textModel, start, len);
If (result! = kSuccess) break;
If (! textModel) break;
UIDRef frameRef = text_query_frame (textModel, start);
If (! frameRef) break;
Int32 pnum = - 1;
PageRef UIDRef = page_getref (frameRef, &pnum);)
If (! pageRef) break;
:
:
} While (false);
//***************************************************************************
Error code (Table_get_text_model)
Language UIDRef,
Int32 left,
top of Int32,
InterfacePtr
& textModel, TextIndex & start,
Int32 & len)
{
Result ErrorCode = kFailure;
do
{
Inits
textModel = InterfacePtr
(Nile); Start = 0;
Len = text::kTextLen;
Make sure that we have a valid table model
InterfacePtr
tableModel (label, UseDefaultIID()); if(!tableModel) break;
convert the network to a network ID address
GridAddress gridAddress (top, left);
get the container text table so we could make the text template.
InterfacePtr
tableTextContainer (tableModel, UseDefaultIID()); if(!tableTextContainer) break;
textModel = InterfacePtr
(tableTextContainer-> QueryTextModel()); if(!textModel) break;
InterfacePtr
tableTextContent (tableModel, UseDefaultIID()); if(!tableTextContent) break;
GA GridArea (up, left, top + 1, left + 1);
Len = tableTextContent-> GetTextChunk (ga, start);
If (! len) break;
result = kSuccess;
} While (false);
return the result;
}
//***************************************************************************
#if (csversion_<>
# define ITextFrameC_ ITextFrame
#else
# define ITextFrameC_ ITextFrameColumn
#endif
UIDRef text_query_frame (InterfacePtr
txt, TextIndex istartPos) {
UID uid = kInvalidUID;
TextIndex startPos = istartPos;
do
{
If (! txt) break;
INNERE Textrahmen of the items
InterfacePtr
frameList (txt-> QueryFrameList ()); If (! frameList | frameList-> GetFrameCount ())<= 0)="">=>
First INNERER Textrahmen of the items
InterfacePtr
textFrame (frameList-> QueryNthFrame (0) / * QUF,: UseDefaultIID () * /); #ifndef (csversion_<>
Location of RangeData (startPos, startPos);
#else
TextIndex location = startPos;
#endif
Int32 frameIndex = - 1;
InterfacePtr
tf = InterfacePtr (Nile); If (startPos < txt-=""> tf TotalLength ()) = InterfacePtr
(frameList-> QueryFrameContaining (location, & frameIndex)); of other tf = InterfacePtr
(frameList-> QueryNthFrame (frameList-> GetFrameCount () - 1)); If textFrame (tf) tf =;
If (! textFrame) break;
//
Aus dem first inner Textrahmen bilden wir jetzt eine hierarchy.
In der Ebene uber hierarchy suchen wir jetzt nach nach einem dieser
Objekt, das ein Graphicrahmen ist. Dieses element ist der gesuchte
ÄUßERE Rahmen.
//
InterfacePtr
child (textFrame, UseDefaultIID()); If (! child) break;
do
{
InterfacePtr
parent (child-> QueryParent()); If (parent == nil) break;
InterfacePtr
graphicFrameData (parent, UseDefaultIID()); If (graphicFrameData! = nil)
{
We have a regular text frame.
UID =: GetUID (graphicFrameData);
break;
}
child = parent;
} While (child! = nil);
} While (false);
If (uid == kInvalidUID) return UIDRef (Nile, kInvalidUID);
Return UIDRef (: GetDataBase (txt), uid);
}
//***************************************************************************
#if (csversion_<>
# define GLayout_:
#else
# define GLayout_ Utils
()-> #endif
UIDRef page_getref (const UIDRef & frameRef, int32 * pgNum)
{
UIDRef result = UIDRef::gNull;
do
{
If (pgNum) * pgNum = 0;
If (! frameRef) break;
InterfacePtr
itemHier (frameRef, IID_IHIERARCHY); If (! itemHier) break;
If (! pause frameRef.ExistsInDB ());
ES more like evil EIB GetOwnerPageUID AB. ICH denke badly, at least
Ein muss ein Rahmen wohl schon haben Parent. Wenn wir da keinen find,.
tschüss Dann.
InterfacePtr
parent (itemHier-> QueryParent()); If (! parent) break;
PageUID UID = GLayout_ GetOwnerPageUID (itemHier);
If (pageUID == kInvalidUID) break;
result = UIDRef (frameRef.GetDataBase (), pageUID);
If (pgNum)
{
IDataBase * db = frameRef.GetDataBase ();
If (! db) break;
UIDRef docRef (db, db-> GetRootUID ());
InterfacePtr
PageList (docRef, IID_IPAGELIST); If (!.) (Break from PageList);
Int32 pageIndex is PageList-> GetPageIndex (pageUID);.
* pgNum = pageIndex;
}
} While (false);
return the result;
}
//***************************************************************************
-
How to find a table behind the OA framework page
Hello
can any body tell me how to find the tables behind any page of OA framework in particular for screens of ALS.
ConcerningOn the tab of the page-->, click on expand all link.
Here you can find the area of the table and the VO rasthaus to it. When you've got the name of the View object.
Then click on details of the Business component references-->
In the object section View find your viewObject and click on it. Here you can find the application attached to it.
Thank you
-Anil -
How to find the name of a column in a table
Hi all
I have a Table that contains approximately 100 columns.
I need to find the column name, to find in specific columns containing data like 'abc '.
Ex: I have a table like temp_table_name
the columns are col1, col2, col3, col4, col5, col6, col7, col8,.... col99
I'm looking for with data specific like 'abc '.
Need to find the name of the table column that contains data of 'abc '.
Please suggest me. How to find in a single query... :-)
Actually I'm looking through a column of the table as below
Select count (*) in the temp_table_name where col1 = 'abc '.
FOR I IN 1.20 LOOP
ln_num_of_rows: = 0;
lv_column_name_search: = "col" | I have;
lv_sql: = ' select count (*) in the temp_table_name where ' | lv_column_name_search | "= abc";
EXECUTE IMMEDIATE lv_sql INTO ln_num_of_rows;
IF ln_num_of_rows > 0
-column found in lv_column_name_search
EXIT;
END IF;
END LOOP;
But I'm gettig performance problem.
How can I do this in any other alternative way? could you suggest any way possible as soon as POSSIBLE.It's probably never going to be effective - realistic, you have to scan completes the picture.
You could probably improve a little things by doing something like
SELECT DISTINCT column_name FROM ( SELECT (CASE WHEN col1 = 'abc' THEN 'col1' WHEN col2 = 'abc' THEN 'col2' WHEN col3 = 'abc' THEN 'col3' ... WHEN col20 = 'abc' THEN 'col20' ELSE NULL END) column_name FROM table_name WHERE col1 = 'abc' OR col2 = 'abc' ... OR col20 = 'abc' )
but it's never going to be incredibly fast.
Justin
-
How to find a value in any column of the table - essentially a search
Hi guys,.
Thanks in advance for your help.
I'll try to find a value in any column of the table? How can I do?
An example of value would be "FEDERAL."
Using Oracle 11 g and SQL Developer.
Thank you
It's a question that is asked in the past several times (but not recently from what I remember).
Michaels has provided in the past, solutions which are quite clever, just using SQL...
10g of solution
Michaels > var val varchar2 (5)
Michaels > exec: val: = "Sub".
PL/SQL procedure successfully completed.Michaels > select distinct substr (: val, 1, 11) "keyword."
substr (table_name, 1, 14) "table."
substr (t.column_value.getstringval (), 1, 50) ' / value of the column.
CLO.
Table
(xmlsequence
(dbms_xmlgen.getxmltype ("select" | column_name))
|| 'from ' | table-name
|| ' where upper (')
|| column_name
|| ') as superior (' %' |: val)
|| '%'')'
) .extract (' LINES/rowset / * "")
)
) t
-where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'SERVICES')
order of the "Table".11g upwards
SQL > select table_name,.
column_name,
: search_string search_string.
result
from (select column_name,
table_name,
"ora: view("' ||) " table_name | "") / LINE /' | " column_name | "[ora:contains (text ()," %' |: search_string | ")]. (%») > 0]' str
CLO
where table_name in ('EMP', 'Department')),
XMLTable (columns str result varchar2 (10) path '.')
/TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
------------------------------ ------------------------------ -------------------------------- ----------
DEPT DNAME es RESEARCH
EMP ENAME es JAMES
EMP JOB es SALESMAN
EMP JOB es SALESMAN4 selected lines.
-
How to create table containe blob column view?
Hi, I would like to aske any type of blob data
I have data containe blob clolumn type table
I want to create view this table how do?
and
If I created the table view blob column data will be responsible for memory or what because that will cause some performance issues because the table contains enormous data?
Thank youYou must create the view as
CREATE OR REPLACE VIEW
AS SELECT col1, col2, col3..... FROM WHERE ...etc... The Act of creating the view will not otherwise the data in the table underlying, all it will do is create a view definition.
Select only the view will select data.If you don't need to select the BLOB column in the view, then you would not include it in the list of the columns in the view definition.
If your LOB data are stored online, then it may be a significant selection of the view, even if the BLOB column is not indicated in the list of the columns in the view.Published by: dombrooks on June 1, 2009 10:12
-
How to find the table in a schema, if I only have a particular column name
Hi all
Ideal if some1 could help me, I know not a column name and I need to find the table that actually holds this column paricular name I know.
is it possible to find this particular table with SQL?
Thank you
RahulSelect the table TABLE_NAME from user_tab_columns where column_name = 'COLUMN_NAME '.
-
How to create a table with editable column values.
Hello world
I think it's very simple, but I am unable to find how to do this. This is my requirement. I need to create a table with n columns and 1 line initially. the user must be able to enter data into this table and click of a button must insert the data into the database table. Also, there should be a button at the bottom of the table to add 1 line to the table.
I know how to do the insertion of data, but can someone please let me know how to create a table which allows the user to enter data and how to create a line button Add 1?
Thanks in advance!Raghu,
Go through the tutorial of Toolbox Page & Advanced section of the Guide of the OFA table.
Step 1 - you need to create EO & VO from this EO. This EO will be table of database where you want to insert the data.
Step 2 - create an advanced table region. (See this section in table advanced for more details)
Step 3 - attach this VO in the BC4J region advanced Table component.
Kind regards
GYAN -
How to find max based on 2 columns.
Hi I have a table where I have two fields of digital type (date and time)) (this field are not date format time but digital)
Date is in column A and column B represent the time.
How can I find the maximum value of column A and with results for a Max find b.
example of
A - - - - - - - - - -B
101010-202020
101011-202021
101012-202021
101010-202022
101012-202020
......... ...........
I'm looking for is
A - - - - - - - - - - B
101012-202021
Thank youwith t as ( select 101010 a,202020 b from dual union all select 101011,202021 from dual union all select 101012,202021 from dual union all select 101010,202022 from dual union all select 101012,202020 from dual ) select max(a) a, max(b) keep(dense_rank last order by a) b from t / A B ---------- ---------- 101012 202021 SQL>
SY.
Published by: Solomon Yakobson, February 24, 2010 12:57
-
How to find the component of specific form of CJP
Hello, all.
For example, we are looking for how to find any component shape of CJP.
While in CCP, we tried the following
DrawnPanel parent = (DrawnPanel) this.getParent ();
Component components [] = parent.Components ();
Component;
for (int i = 0; i < components.length; i ++)
{
element components =;
.................
component.getName (); Returns the names of internal forms such as TextItem41...
component.getProperty (ID.NAME); Returns the instance of the class well, which is not very useful.
}
Our question how do I find the specific form of CCP component? Where it is possible to see the data in the forms of the component as a block name, Type, name, etc.
Best regards
Yuri.
Edited by: ygauchma January 6, 2011 04:54Unfortunately, the name of the element Forms (block.item) is not passed with the method setName() in the underlying Java component, so that you are unable to establish direct correspondence :(
I asked to the what new features would you like to see on Oracle Forms? on "what do you want in the next version' if they can do this very simple thing.
François
-
Collections of SQL / objects - how to store a table within a column?
Hi guys,.
I have a current table on production... I'm only allow you to add a column to her...
The simplified scenario is...
I have a table
CREATE TABLE PLAN_TRANSACTION
(THE ARGUMENT PLAN_ID VARCHAR2 (20) DEFAULT SYS_GUID();)
PLAN_NUMBERS_TYPE COLUMN? );
For the PLAN_NUMBERS column, I want to store all types and numbers associated with the PLAN_ID.
In general, it would be
CREATE TABLE TYPES_AND_NUMBERS
(TYPE VARCHAR2 (20),)
NUMBER OF NUMBERS);
---------------------------------
Type A, 12345
Type B, 12345
Type A, 54211
etc.
Now instead of add another additional column PLAN_ID TYPES_AND_NUMBERS table and create a relationship of foreign key with PLAN_TRANSACTION.
I want to keep the table inside the table PLAN_TRANSACTION column.
I think doing this
CREATE TYPE TYPES_AND_NUMBERS AS OBJECT
(TYPE VARCHAR2 (20),)
NUMBER NUMBERS);
CREATE TABLE AS TN_TAB TYPE OF TYPES_AND_NUMBERS;
CREATE TABLE PLAN_TRANSACTION
(THE ARGUMENT PLAN_ID VARCHAR2 (20),)
PLAN_NUMBERS TN_TAB
)
THE NESTED TABLE PLAN_NUMBERS
STORE AS NESTED_PLAN_NUMBERS;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
My question is...
Q1) is my way of creating a correct nested table?... creating an object type, then an array of objects, then storing this table within a column in a nested table...
Q2) is otherwise easier to create a nested table as I quite new in object_relational--concepts simply, I felt quite concerned create an object to simulate a line. and create an array of object to store objects, and then put it inside a column.
Q3) possible for me, or is it something like create type TN_TAB as table of (varchar2 TYPE, numbers);
Thanks a lot guys!
Best regards
NoobA nested table is the easiest way to resolve this condition.
Other solutions might involve some large objects (CLOB or XMLTYPES), but without knowing anything commercially, I think a nested table is the best way. -
How to MERGE when the target table contains invisible columns?
Oracle running on Oracle Linux 6.4 12.1.0.2.0 database:
During his studies of FUSION with invisible columns, I discovered that invisible columns in the target table cannot be read. Workaround seems to be
MERGE INTO (SELECT <column list> FROM <target table>) AS <alias>
However, the documentation does not seem to allow this. Here are the details.
Test data
> CREATE TABLE t_target( k1 NUMBER PRIMARY KEY, c1 NUMBER, i1 NUMBER invisible ) table T_TARGET created. > INSERT INTO t_target (k1,c1,i1) SELECT 2, 2, 2 FROM dual UNION ALL SELECT 3, 3, 3 FROM dual UNION ALL SELECT 4, 4, 4 FROM dual 3 rows inserted. > CREATE TABLE t_source( k1 NUMBER PRIMARY KEY, c1 NUMBER, i1 NUMBER invisible ) table T_SOURCE created. > INSERT INTO t_source (k1,c1,i1) SELECT 1, 1, 1 FROM dual UNION ALL SELECT 2, 2, 9999 FROM dual UNION ALL SELECT 3, 3, 3 FROM dual 3 rows inserted.
First try
Please note that I have a WHERE clause in the WHEN MATCHED clause. Its purpose is to avoid the update of a row when data are already correct. The WHERE clause is trying to read the invisible column of the target table.
> MERGE INTO t_target o USING ( SELECT k1, c1, i1 FROM t_source ) n ON (o.k1 = n.k1) WHEN MATCHED THEN UPDATE SET c1=n.c1, i1=n.i1 WHERE 1 IN ( decode(o.c1,n.c1,0,1), decode(o.i1,n.i1,0,1) ) WHEN NOT MATCHED THEN INSERT (k1, c1, i1) VALUES(n.k1, n.c1, n.i1) ... Error at Command Line : 10 Column : 12 Error report - SQL Error: ORA-00904: "O"."I1": invalid identifier
As you can see, I put a subquery after the USING clause so that 'n.i1' would be 'visible', but this is not enough since the 'I1' column in the target table is always invisible.
Second test
> MERGE INTO ( SELECT k1, c1, i1 FROM t_target ) o USING ( SELECT k1, c1, i1 FROM t_source ) n ON (o.k1 = n.k1) WHEN MATCHED THEN UPDATE SET c1=n.c1, i1=n.i1 WHERE 1 IN ( decode(o.c1,n.c1,0,1), decode(o.i1,n.i1,0,1) ) WHEN NOT MATCHED THEN INSERT (k1, c1, i1) VALUES(n.k1, n.c1, n.i1) 2 rows merged.
Here I used a subquery in the INTO clause thus, and it worked.
Unfortunately, this does not seem to be admitted in the documentation: IN fact refers to a table or a view as schema objects.
My question is:
How can I refer to invisible columns in the target table without creating a new object? My workaround using a subquery solution seems to work very well, but can I recommend if it is not documented?
Can I replace a "inline view" for a view and still be supported?
During his studies of FUSION with invisible columns, I discovered that invisible columns in the target table cannot be read. Workaround seems to be
However, the documentation does not seem to allow this. Here are the details.
Here I used a subquery in the INTO clause thus, and it worked.
Unfortunately, this does not seem to be admitted in the documentation: IN fact refers to a table or a view as schema objects.
My question is:
How can I refer to invisible columns in the target table without creating a new object? My workaround using a subquery solution seems to work very well, but can I recommend if it is not documented?
Can I replace a "inline view" for a view and still be supported?
But the documentation DO ALLOWS not only! You use a view - a view online and those that can be changed in a MERGE statement.
All versions of the doc for FUSION since 9i specifically say this:
INTO clause
Use the
INTO
target clause to specify the table or view you are updating or inserting into. To merge the data in a view, the view must be updated. Please refer to the "Notes on the editable views" for more information.Here are the links for the doc. 9i, 10g, 11g and c 12, ALL OF THEM (the last three), except 9i have this EXACT clause above.
SQL statements: INDICATED to ROLLBACK FALLS, 15 of 19
http://docs.Oracle.com/CD/B19306_01/server.102/b14200/statements_9016.htm
http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_9016.htm
https://docs.Oracle.com/database/121/SQLRF/statements_9016.htm
9i doc does not have this specific quote in the INTO clause section, but it doesn't have that quote a little later:
Limitation of the update of a view
- You cannot specify
DEFAULT
when refreshing a view. - You cannot update a column referenced in the
ON
condition
clause.
merge_insert_clause
The
merge_insert_clause
specifies the values to insert into the column of the target table, if the condition of theON
clause is false. If the insert clause is executed, then all insert triggers defined on the target table are activated.Restrictions on the merger in a view
You cannot specify
DEFAULT
when refreshing a view.If your "workaround" isn't really a workaround solution. You SHOULD use an inline view if you need to reference a column "invisible" in the target table, since otherwise, these columns are INVISIBLE!
My workaround using a subquery solution seems to work very well, but can I recommend if it is not documented?
You can recomment it because IT IS documented.
- You cannot specify
-
How to update a table whose name column contains an ampersand?
Hello
I need to update a column whose column name contains an ampersand and cannot find a way to do it. Option is not there to have the name of the column changed.
Ex:
Aircraft UPDATE
SET d & f = 1
WHERE aircraft_code = '737';
This property returns an error of missing an = sign
I tried:
TOGETHER would be ' |' &' | 'f' = 1
does not work
Any help is greatly appreciated.
Thank you
LauraSET DEFINE OFF
stop to interpret the & sign as from a lexical setting on the client.Not sure if you have this problem here.
& could also has power not characters in the normal column names (didn't test).In this case, you will need to put the name of column ".»
+ example +.
{code}
Aircraft UPDATE
The VALUE "d & f" = 1
WHERE aircraft_code = '737';
{code}Be aware that in this case the column name must be spelled exactly as if it was when the table was created.
Included case.{code}
Aircraft UPDATE
THE "D & F" VALUE = 1
WHERE aircraft_code = '737';
{code}
Maybe you are looking for
-
Firefox functioned normally. I downloaded the application of password of Firefox and all my web pages stopped downloading correctly. I deleted the app, without change. I uninstalled and reinstalled Firefox. Nothing. This happened once before and I ha
-
V10.11.3 OSX El Capitan taking a long time to open
Why after update to OSX El Capitan v10.11.3 its taking a long time to open?
-
I just bought a brand new 13 "MacBook Pro with the Retina display (no, I didn't wait for the new version of 2016). It's my first MacBook. I'm looking for advice on what I can to make this last as long as possible. You guys have any advice for me of p
-
cannot find Visatask in 'Add new item in VS2008' using studio measure 8.6
I installed VS2008, VISA and Measurement Studio 8.6 (with visa.net library). When I run a new application in vs2008, I can't chose to don't ask world but the only visa application. I can't find job Visa when I go to add a new item in vs2008. Please h
-
Problem with the different Labview platform
Maybe this question should be address to OR. I have this library calling a DLL registry. The library aims to convert a movie from hard disk (type *.mcf) file type in image stream and then to show and possibly to save. The DLL is designed by the desig