Identifing all ccid columns in all tables
Hi Everyone,
I am in the process of identifying all tables that are either directly storing the CODE_COMBINATION_ID (gl_je_lines.code_combination_Id) or storing the same value with another name (ra_Cust_trx_types_all.GL_ID_REV).
Can the forum experts please advise me few pointers to find the needed data inputs.
Thanks,
Sunil
Hi Sunil,
select * from all_tab_cols
where column_name like '%CCID%'
select * from all_tab_cols
where column_name like '%COMBINATION%'
select * from all_tab_cols
where column_name like '%GL_ID%'
hope these queries meets your requirements
vik
Similar Messages
-
How to add the values of all selected columns in a table and display it ?
Hi all,
I am using jdeveloper 11.1.1.6.0
Page:
my page jsff page contains one ADF table and one textbox
DB:
i have two database tables A & B ,
i need 2 columns from each table . say (A.product_no ,A.product_name,B.prodeuct_price ,B.confirm)
here product_no is primary key and present in both tables.
i need to create a VO combining these two tables and put it as ADF table in a jspx page
Functionality :
my 'confirm' field is a checkbox field in table . whenever the checkbox is selected,
the corresponding price will be getting added and display it in a textbox.
Eg:
if my first 4 price values are 3000 , 2000 ,4000,2000
and if i select first 3 values , then the text box should contain 9000 value.
i need help ...
Problem:
i need help in creating VO and functionality partHi,
it is easy: create an entity object for every table and one view object where you select your both entity objects and join them in your select statement.
Your desired 'confirm' functionality could be achieved with helpp of view object transient attributes - for more information see: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcquerying.htm#CHDHJHBI
Regards
Pavol -
Is there a way to match all columns in a table?
Oracle 11.1.0.7:
Is there any way to say match all the columns of Table A with Table B? For eg:
Table A
id
name
Table B
id
name
Is there a way to say match all the columns with similar column in other in a select instead of doing "where A.id = B.id and A.name = b.name"? I am trying to write a compare script to test that replication is indeed doing the right thing.user628400 wrote:
If 2 columns have null values does it match that too? I'll run some tests.It does
SQL> ed
Wrote file afiedt.buf
1 with a as (select 1 col1, null col2 from dual
2 union all
3 select 2 col1, null col2 from dual
4 union all
5 select null, null from dual),
6 b as (select 1, null from dual
7 union all
8 select null, null from dual)
9 select *
10 from a
11 minus
12 select *
13* from b
SQL> /
COL1 C
2
While I was doing the comparision I found that if column x in Table A has "null" and same column x in table B has "null" and if I do "where A.x = B.x" then it doesn't return the row. I am not sure why. Does "minus" work the same way?That's because NULL will never equal any value (including NULL) and NULL will never not equal any value (including NULL). That is
NULL = 1 is unknown (which maps to false)
NULL = NULL is unknown
NULL != 1 is unknown
NULL != NULL is unknown
If you want to compare columns that may have NULL values, you need to use IS NULL and IS NOT NULL or use the NVL function to map NULL values to a non-NULL but impossible value, i.e.
WHERE (a.x = b.x OR
(a.x is null and b.x is null))or
WHERE nvl(a.x,-17) = nvl(b.x,-17)assuming that -17 is not a valid value for either a.x or b.x
Justin -
Query to get the data of all the columns in a table except any one column
Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
For Example:
Let us consider the EMP table.,
From this table except the column comm all the remaining columns of the table should be listed
For this we can write a query like this..
Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
Is there any other way of writing the query to get the required result..?
Thanks..Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
If you really need to list all the columns for a table because you don't want to type them, just use something like...
SQL> ed
Wrote file afiedt.buf
1 select trim(',' from sys_connect_by_path(column_name,',')) as columns
2 from (select column_name, row_number() over (order by column_id) as column_id
3 from user_tab_cols
4 where column_name not in ('COMM')
5 and table_name = 'EMP'
6 )
7 where connect_by_isleaf = 1
8 connect by column_id = prior column_id + 1
9* start with column_id = 1
SQL> /
COLUMNS
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
SQL> -
How to make allow null for a column in all table.
Hi,
I have a column "col1" in all tables (user made table) , i want to make it allow null
please tel me how can it be done using single script.
i mean in short way.
yours sincerely.yes. absolutely you can.
Look, what i got -
Ranit>> select 'alter table ' || table_name || ' modify("TIMESTAMP" null) ; ' from user_tab_columns where column_name='TIMESTAMP' and nullable ='N';
'ALTERTABLE'||TABLE_NAME||'MODIFY("TIMESTAMP"NULL);'
alter table FIXED_OBJ$ modify("TIMESTAMP" null) ;
alter table SUMPARTLOG$ modify("TIMESTAMP" null) ;
alter table SUMDELTA$ modify("TIMESTAMP" null) ;
alter table ALL_SUMDELTA modify("TIMESTAMP" null) ;
alter table DBA_EXP_FILES modify("TIMESTAMP" null) ;
alter table WRI$_DBU_CPU_USAGE modify("TIMESTAMP" null) ;
alter table DBA_CPU_USAGE_STATISTICS modify("TIMESTAMP" null) ;
7 rows selected.But, it is not over.
Either - You have to do an 'EXECUTE IMMEDIATE' over these 'alter' scripts.
OR - Take these scripts, put it into a <script_name>.sql file and then execute this file.
Hope you understand.
Edited by: ranit B on Dec 22, 2012 3:17 PM
-- code added -
All columns of trinidad table are not coming up on page while its running
Hi,
I have put two trinidad tables on my page.But while the page is run, I am unable to see all the columns of the table.Only a few columns are visible.
Also, though there are 5 rows in teh table ,there is a lot of gap below the tablespace.So the next table comes after a very big gap.
How to solve the above two problems? Kindly let me know your valuable suggestions.
RegardsHi santosh,
Following is my code.I am providing only one column code(similarly there are 3 more columns),along with the table code.
<tr:table value="#{phonebeannew.inputphone}" var="row"
rows="#{bindings.phone.rangeSize}"
inlineStyle="height:#{phonebeannew.rownumbers + 275}px"
id="t1" width="100%">
<tr:column sortProperty="phonetype" sortable="false"
headerText="phonetype"
id="c3" width="5px">
<tr:inputText value="#{row.phonetype}"
simple="true">
I gave width as 5px but it doesnt make any difference in output.
The 'phonebeannew' is our bean and inputphone is a property of it.input phone holds the array of values for the 4 columns.
Kindly let me know if you want any further information which I can provide
Regards -
Find all tables in db with column name of a particular string?
I'm looking for all tables in a db that have a certain column name. How can I find this?
John,
thanks for your answer.
John Mcginnis wrote:
The quick search field in the schema browser is doing client-side filtering of the list of objects. This means we can only filter on things that we already have fetched from the database, like the object name. We have no current plans to extend the types of information that can filter on, although it is possible we might add the ability to filter based on a few other types of information that we generally fetch with the object name. However, filtering by column name would require pre-fetching the lists of columns for all tables and as such is not likely to be added to the schema browsers search field.
I'm sure you guys had a Toad review to understand how things are done there.....so
My 2 cents are: instead of pre-fetching the columns of all tables why don't you add a button below the table drop-down list which should fetch the tables based on the filter columns condition - exactly like Toad.
Thanks,
Dani -
Finding a column name from all tables
i have 85 tables in my user, i forget a column name and its table name. how to find that particular column amongst all tables i have.
hi
You can use User_tab_columns or All_tab_columns
SQL>Select Table_Name,Column_Name From user_tab_columns
where lower(table_name) like '%emp%' or
lower(column_name) like '%dept%'
Khurram Siddiqui
[email protected]
Message was edited by:
pcbyte12 -
How to search all columns of all tables in a database for a keyword?
Dear Team,
i have an requirement that : i want to search all the columns of all the tables in the particular database based on the specific key word or an free text.
example :
table 1: columns data
empname sam
empid 01
table 2 columns data
deptname sam
departmentid 10
table 3 columns data
organization name sam
organization id 1
when i search for text " SAM"
it should search me from the entire database, all tables and columns of it and display the result
output : tablename cloumn value
table1 empname sam
table2 deptname sam
table3 organizationame sam
the example is just an sample not the real data .
please help me with sample code or any link related to it .
thanks in advanceHi justin , thanx for the reply
the basic requirement that we required is ,
the user will just type the keyword( value in the coumn) he required and it should search all the tables and columns of the table in the database and i have to show this in the front ent in the table format. here the user will analyse the information based on the search .
it is just like the google search we does( type the keyword in free text) it will display the result.
so for that i have to search entire table and columns in the whole database.
please if any one provides me the solution it will be help full for me.
thanx in advance -
How to search all columns of all tables in a database
i need to search all columns of all tables in a database , i already write the code below , but i've got the error message below when run this script
DECLARE
cnt number;
v_data VARCHAR2(20);
BEGIN
v_data :='5C4CA98EAC4C';
FOR t1 IN (SELECT table_name, column_name FROM all_tab_cols where owner='admin' and DATA_TYPE='VARCHAR2') LOOP
EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' ||t1.table_name|| ' WHERE ' ||t1.column_name || ' = :1' INTO cnt USING v_data;
IF cnt > 0 THEN
dbms_output.put_line( t1.table_name ||' '||t1.column_name||' '||cnt );
END IF;
END LOOP;
END;
Error report:
ORA-00933: SQL command not properly ended
ORA-06512: at line 7
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
Any help pleaseSQL solutions by Michaels
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
11g upwards
SQL> select table_name,
column_name,
:search_string search_string,
result
from (select column_name,
table_name,
'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
from cols
where table_name in ('EMP', 'DEPT')),
xmltable (str columns 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 SALESMAN
4 rows selected. -
How to view all tables and column names from a remote database
Hey Guys,
I have a database in a remote server. I have the db link and the schema name.. Now i want to view all the tables in the remote database with column names.. I dont have access to that database using sql developer.. But i can view some tables using the db link..Is there any way i can view all the tables with the column names?user10683742 wrote:
Dont think i have DBA access..It gives the following error
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"You don't have to have 'dba' access, per se. You just have to have SELECT ALL TABLES privilege. when you use a db_link, you are connecting to the remote db with the user defined in the link, and .. on that db .. you will have the privileges of the user defined in the db link. Exactly as if you had used sqlplus to connect to that db with that user. -
Sum of values in same column of all tables
On the same sheet, I have multiple tables with the same column (F) titled "AMOUNT".
I want to get the sum of all the values in that column, from every table, without having to specify each table.
Is there a way to do this?It would be nice to not have to specify each table but it can't be done that way. Nonetheless, it is easy to get those sums. Type in =SUM( then click on the column letter (F in this case) of each of those tables until you have them all then add the closing parenthesis and hit return.
-
Aggregate of all Columns in each table for the entire schema
I want to calculate the report of Aggregate of all Columns in each table for the entire schema in Oracle. Pls let me know which approach is best to do this.
Thanks in advance !!Not sure about your requirement..
This?
select table_name,sum(data_length) sm
from user_tab_cols
group by table_name; -
ORA-12983: cannot drop all columns in a table
Hi,
I am creating a table with two columns.
I have modified a column as unused using ALTER statement.
After that i have tried to drop the another column by using ALTER statement.
But it throws an error ORA-12983: cannot drop all columns in a table.
is it not possible to achieve this via ALTER statement?
thanksis there any other way to find the name of the columns which have been marked as unused?Don't think so, and you would not be able to do much about. You won't be able to reference it, you won't be able to un-unuse it, and you would even be able to add a new column having same name.
Why are you using SET UNUSED in the first place?
Regards
Peter
Quoting myself:
You won't be able to reference itMaybe not good enough:
SQL> select column_name, data_type, segment_column_id
from user_tab_cols
where table_name = 'T';
COLUMN_NAME DATA_TYPE SEGMENT_COLUMN_ID
SYS_C00001_11051618:28:14$ NUMBER 1
B NUMBER 2
SYS_C00003_11051618:28:14$ NUMBER 3
3 rows selected.
select "SYS_C00003_11051618:28:14$" from t
Error at line 1
ORA-00904: "SYS_C00003_11051618:28:14$": invalid identifier
SQL> alter table t drop column "SYS_C00001_11051618:28:14$";
Table altered.
SQL> select column_name, data_type, segment_column_id
from user_tab_cols
where table_name = 'T';
COLUMN_NAME DATA_TYPE SEGMENT_COLUMN_ID
B NUMBER
1 row selected.
Note: Both columns "disappeared" Thanks MichaelS
Edited by: Peter on May 16, 2011 9:29 AM -
whenever a user decides to choose another file to read, i would remove all the columns in the table and then write it all over again, However, I do not see such function in jtable, so how do I go about doing that?
Use the following code for remove all the row in a table...
call the DeviceClearTable()
method in mouse event...
public void DeviceClearTable()
int numrows = DeviceModel.getRowCount();
for(int i = numrows - 1; i >=0; i--)
DeviceModel.removeRow(i);
Edited by: kumaravel on Jun 2, 2008 10:36 AM
Maybe you are looking for
-
Getting values from a function module called in a WDA method
Friends, I am trying to execute a function module from WDA. I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an interna
-
I tunes wont recognise internet connection
i am trying to use the radio service... but everytime i select the radio option in itunes it comes up with a popup saying that it cant recognise my internet connection and to reconnect.... any tips or helpers would be awesome cheers patrick
-
How to create an item with date type mm/yyyy (no day)
Hello, Is it possible to create an item with date type mm/yyyy (no day)? I want the pop-up date picker to just show month and year. Thanks, Jen
-
Default buyer in purchase group
Hi all, i need to set default buyer in purchasing group. Totally there are three buyers in purchasing group. i need to assign the third buyer as default buyer ( when ever user raises the shopping cart, the third buyer should be fetched to the shoppin
-
Account assignment Category is not popping up for one User
User is trying to create the SC, but there is no Account assignment category( Cost center, WBS ) being displayed when I try to search the Acc assignment category, it gives the results without any values. There is no values for Category field for the