Finding columns using all_tab_columns
I am using oracle 11g and i am having trouble finding a column name using all_tab_coulmns .Basically i dont know the exact name of the column and i used wild card in the where clause but i seems line wild card doesnt work.Could this be because of the reason that the column names are case sensitive.Query that i used is listed below.
select * from all_tab_columns where column_name='%sequence%'.What i wanted out of this query was, all the columns that have 'sequence' in it and FYI i used uppercase as well.
two things here
1. use like instead of =
2. column_name are stored in upper case in all_tab_columns
so write ur query as
select * from all_tab_columns where column_name like upper('%sequence%');
Similar Messages
-
Finding max value in column using java..
Hello there!!
I have a problem that i tried finding in google but did not get what i wanted.. that's why i hope you guys could help me out.
How do i find the maximum value in a column using resultset..
for example..
Connection con = DriverManager.getConnection("jdbc:mysql:///eproc","root", "");//eproc is dbase name in MySQL
Statement stmt=con.createStatement();
ResultSet rs;
rs = stmt.executeQuery("SELECT MAX(id) FROM cat_work_sor_category");now, how do i use resultset to make sure i get the max value and assign to integer variable...
Please do help me out.
Thankyou.Connection con =
DriverManager.getConnection("jdbc:mysql:///eproc","roo
t", "");//eproc is dbase name in MySQL
Statement stmt=con.createStatement();
ResultSet rs;
rs = stmt.executeQuery("SELECT MAX(id) FROM
cat_work_sor_category");
Integer MaxValue = new Integer(-1);
if(rs.next()){
MaxValue = rs.getInt(1);
int MAX_VALUE = MaxValue.intValue(); -
Finding column name in database
Hi all..
I want to find each column name, how many tables this column name is there
in database.
For single colum, i can find by using this query..
select a.COLUMN_NAME, a.TABLE_NAME from all_tab_columns a where
a.OWNER='DC_ERD' and a.COLUMN_NAME ='ACCESSORY_MAKER'
If i want to find for each column present in the database, can anybody please tell
me if it is possible in sql or pqsql is needed.
Thanks in advance,
PalAre you asking about the number of tables, it's been used or the tables list?
select column_name, count(table_name)
from all_tab_columns
group by column_nameCheers
Sarma. -
NEED HELP IN USING ALL_TAB_COLUMNS FOR RETRIEVING DATA???
A table say T1 contains column like Emp_id,Code.
and there are several Code like C1,C2,C3.
Another table say T2 contains column like
Emp_id,C1,C2,C3.Here the value of the code field of the
T1 table is now column of the T2 table.And the amount of
each code of T1 table is equal to column value of T2
table.
Now I want to retrieve data from T2 table like
C1 200
C2 300
C3 140
I cannot retrieve data like this using all_tab_columns.
I can only getting the column_name but cannot its value.
PLEASE HELP ME...
Edited by: user630863 on Apr 8, 2009 11:37 AMemp_id | code
001 | C1
001 | C2
005 | C3
005 | C1
002 | C2
002 | C3
Table T1
emp_id | C1 | C2 | C3
001 | 10 | 15 |
002 | | 7 | 12
005 | 45 | | 94
Table T2
I have written a query
select column_name from all_tab_columns a,T1 b
where a.column_name=b.code
and table_name='T2'
OUTPUT:
C1
C2
C3
But I Need data for each employee like
001 C1 10
001 C2 15
002 C2 7
002 C3 12
005 C1 45
005 C3 94
Edited by: user630863 on Apr 8, 2009 1:28 PM -
Jdeveloper java.lang.IllegalStateException: A column used in a constraint m
I have a database diagram. I tried to move the offline database to online database and got the following error. not able to do anything after this
is there a way to find out which table has the problem
this is the error
java.lang.IllegalStateException: A column used in a constraint must exist in the relation
at oracle.javatools.db.ColumnConstraint.getColumns(ColumnConstraint.java:89)
at oracle.javatools.db.diff.ColumnConstraintDiffer.diffColListForceSame(ColumnConstraintDiffer.java:95)
at oracle.javatools.db.diff.ColumnConstraintDiffer.diffColList(ColumnConstraintDiffer.java:84)
at oracle.javatools.db.diff.ColumnConstraintDiffer.diff(ColumnConstraintDiffer.java:71)
at oracle.javatools.db.diff.DiffEngine.diff(DiffEngine.java:111)
at oracle.javatools.db.diff.ListDiffer.diff(ListDiffer.java:81)
at oracle.javatools.db.diff.DiffEngine.diff(DiffEngine.java:177)
at oracle.javatools.db.diff.BeanDiffer.diffLists(BeanDiffer.java:272)
at oracle.javatools.db.diff.BeanDiffer.diffLists(BeanDiffer.java:229)
at oracle.javatools.db.diff.DBObjectDiffer.diff(DBObjectDiffer.java:46)
at oracle.javatools.db.diff.TableReconcileDiffer.diff(TableReconcileDiffer.java:56)
at oracle.javatools.db.diff.DiffEngine.diff(DiffEngine.java:111)
at oracle.javatools.db.diff.ListDiffer.diff(ListDiffer.java:81)
at oracle.javatools.db.diff.DiffEngine.diff(DiffEngine.java:177)
at oracle.ideimpl.db.transfer.reconcile.ReconcileUI.run(ReconcileUI.java:384)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:604)
at java.lang.Thread.run(Thread.java:595)This has been fixed and will be available in a later release. The table and column names will be displayed.
-
Having trouble connecting column to column using niSwitch on a PXI 2530
Having trouble connecting column to column using niSwitch vi on a PXI 2530 matrix module. I have configured my switch using Switch Executive, have identified aliases, and verified routes and route groups. When I use LabVIEW to connect column to column I get an error reading "cannot find connection between c0 and c1". c0 and c1 are example columns I want to connect. Any help is appreciated.
You can find NISE VIs in the function pallete in LV if you have installed LabVIEW support when you installed NISE (this is selected by default in the installer if you had LV installed before installing NISE).
Also, choose between niSwitch and NISE based on your need - if all you ever do is connect two channels in your application, then configuring a NISE virtual device is probably an overkill (and so is using a switch in this case:-) . However, if you are going to manage multiple routes, then using NISE configuration will let you create named routes and route groups, which you can then invoke (connect/disconnect) in your application and have the configuration part managed outside your application. The code would then concentrate solely on establishing a necessary connection(s) via connecting a route or a route group, while if you were to use niSwitch for this purpose, you would have to keep the logic of connecting inside your application, together with the list of channels that need to be connected.
Start with using NISE, and see if you like it.
http://www.ni.com/pdf/products/us/3msw112-113.pdf
Srdan Zirojevic -
How can I get list of columns used of specific table in all stored procedure?
How can I get used column list of a specific table in among all stored procedure?
Suppose that,
I have a table(VendorMaster) which has 100 columns just I want to know how many columns used in among all stored procedure.We have solved by below query...
IF OBJECT_ID('tempdb.dbo.#SPDependencyDetails') IS NOT NULL
DROP TABLE #SPDependencyDetails
CREATE TABLE #SPDependencyDetails
Or_Object_Database NVARCHAR(128)
,Or_Object_Name NVARCHAR(128)
,Ref_Database_Name NVARCHAR(128)
,Ref_Schema_Name NVARCHAR(128)
,Ref_Object_Name NVARCHAR(128)
,Ref_Column_Name NVARCHAR(128)
,Is_Selected BIT
,Is_Updated BIT
,Is_Select_All BIT
,Is_All_Columns_Found BIT
DECLARE @database_name VARCHAR(100)
DECLARE database_cursor CURSOR
FOR
SELECT name
FROM sys.databases
WHERE database_id =8
OPEN database_cursor
FETCH NEXT FROM database_cursor
INTO @database_name
WHILE @@FETCH_STATUS = 0 --Outer Loop begin
BEGIN
DECLARE @WholeLotofSQL NVARCHAR(MAX) = '
DECLARE @object_name VARCHAR(150)
,@sqlstatement NVARCHAR(2500)
DECLARE object_cursor CURSOR --Inner cursor, iterates list of objects that match type
FOR
SELECT name
FROM '+@database_name+'.sys.objects AS o
WHERE o.type = ''P'' --Change Object type to find dependencies of Functions, Views and etc.
ORDER BY 1
OPEN object_cursor
FETCH NEXT FROM object_cursor INTO @object_name
WHILE @@FETCH_STATUS = 0 --Inner Loop Begin
BEGIN
SET @sqlstatement = ''USE '+@database_name+';
INSERT INTO #SPDependencyDetails
SELECT DB_NAME() AS Or_Object_Database
,'''''' + @object_name + '''''' AS Or_Object_Name
,CASE WHEN referenced_database_name IS NULL THEN DB_NAME()
ELSE referenced_database_name
END AS Ref_Database_Name
,referenced_schema_name AS Ref_Schema_Name
,referenced_entity_name AS Ref_Object_Name
,referenced_minor_name AS Ref_Column_Name
,is_selected
,is_updated
,is_select_all
,is_all_columns_found
FROM sys.dm_sql_referenced_entities(''''dbo.'' + @object_name + '''''', ''''OBJECT'''');''
EXEC sys.sp_executesql @sqlstatement
FETCH NEXT FROM object_cursor INTO @object_name
END
CLOSE object_cursor
DEALLOCATE object_cursor'
EXEC sys.sp_executesql @WholeLotofSQL
FETCH NEXT FROM database_cursor INTO @database_name
END
CLOSE database_cursor;
DEALLOCATE database_cursor;
SELECT Or_Object_Database as 'Database'
,Or_Object_Name as 'Procedure'
,Ref_Object_Name as 'Table'
,Ref_Column_Name as 'Column'
FROM #SPDependencyDetails -
Quicktime file info missing in Finder column view???
In the Finder column view my PowerMac G4 running OS X 10.3.9 shows all QuickTime audio and video file info along with the playable thumbnail video or music bar, including duration/running time and (for movies) dimension/aspect ratio in pixels.
However, on my much newer iBook G4 from 2 years ago running OS X 10.4.10, those two helpful stats are missing. From what I've been told this helpful file date and aspect ratio data is indeed possible with 10.4 Tiger as it is in Panther but I can't see how to show them via either View preferences, QuickTime prefs, Apple's document files or even these message boards. If anyone could please help me I'd really appreciate it, thanks!!!Oh, sorry.
No, I am running Quicktime 7.2 on both computers. I always install the latest updates when Software Update informs me of one and Quicktime doesn't use different versions for Panther & Tiger as far as I know.
This has been this way for a long time and the only difference at any time in the past has been 10.3.x vs 10.4.x. I sort of accepted it was something not available in Tiger's Finder column view (since I don't remember doing anything specific in Panther to show that extra info) but then after someone pointed out to me that that should be something one can adjust (and after using common sense) I realized Tiger wouldn't disable or take away info provided in the earlier versions, in a sense downgrading something users may rely on.
I don't think I asked: are you (or anyone reading this) showing the duration and dimensions of Quicktime audio and movie files in Finder column view under Tiger? ...or under Panther? Again, I'm referring to those that can be played directly in the preview in column view. Thanks. -
Find the used space in datafile on any specific date
Hi,
We have a datafile created on 2-11-2009.
I wish to find the used space in that datafile on 13-12-2009.
From v$datafile and dba_data_files from the "BYTES" column it wld give me the current used space in the datafile.
But how to find the used space in datafile on any specific date.
Thanks.Hello,
It depends on your Oracle release, starting with Oracle 10.1, you have the View dba_hist_tpspc_space_usage which may give you an history of the space used by the Tablespaces:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_3195.htm#I1023456
You may have to pay for specific license to be allowed to access to this View which belongs to AWR (Automatic Workload Repository).
Hope this help.
Best regards,
Jean-Valentin -
Javascript errors - Summing columns using Javascript
Hi
I have two regions on a page which are tabular forms that I have manually setup using APEX_ITEMS that I would like to use some JavaScript to pick up the values entered and sum that row up. I used Vikas example for tabular form calculation and it works perfectly for 1 region however if I have two regions it seems to give me the following error message in Firefox:
g_table.rows[rownum].cells[getCellPos(g_table, html_GetElement("COL05"), "column")] has no properties
Which I gather is because there are two columns on the page named COL05 and idea how I could get around this problem.
I've put an example here: http://apex.oracle.com/pls/otn/f?p=35414:4Hello,
It could be a bit difficult to auto sums a row, as
usually rows include non-numeric columns. In any
case you can always use a computation column in your
select statement, or build a derived column in the
report attributes tab. The problem is to update these
columns in real-time, after a specific cell has been
changed, and for that you need JavaScript.I realised this thats why I wanted to pickup the column and Row and then I would be able to replace the value in the specified column ie. total column using javascript for each row.
I’m not sure I’m following you, but if you mean the
current (active) rownum per displayed report page,
you can use the #FIRST_ROW_FETCHED# and
#LAST_ROW_FETCHED# substitution strings, in the
footer of the report region.
If you meant something else, please elaborate a bit
more.Look at the revised demo app http://apex.oracle.com/pls/otn/f?p=35414:4 as you can see in this particular example each region returned 15 rows of data. I wondered if there was a way to pick up the last row returned so that I could use the same javascript function I use to calculate the rows I could update that specific column/total row. Example, in my demo app you will see a null row returned I would like to find this row then update the values. -
HT2470 how to set finder columns default to 'right size individually'?
i despise having to hover/click everytime i search files.
where is the option hidden to turn-on my finder column auto-size???chances........ there's one for you! :-)
to create a new UI template go to the navigator click on
Providers tabs / Locally Built Providers / Shared Components / User Interface Templates
Then Create New... User Interface Template
Copy paste the following html/tpl code
<HTML dir=#DIRECTION#>
<HEAD>
<TITLE>#TITLE#</TITLE>
#PAGE.STYLE#
#PAGE.BASE#
</HEAD>
<BODY leftMargin="0" rightMargin="0" topMargin="0" marginheight="0" marginwidth="0" class="PageBG">
<!-- here you can set the page/table width -->
<TABLE width="80%" align="center" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD>
<TABLE >
<TR>
<TD>
<IMG SRC="#IMAGE_PREFIX#pobtrans.gif" BORDER="0" WIDTH="0" HEIGHT="4">
</TD>
</TR>
</TABLE>
#PAGE.SUBPAGELINKS#
#BODY#
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
To use this UI TPL in your page group you have to
1 edit the PG properties to allow the use of UI template
(is under the Configure tab / Page Types and Template)
2 then you have to modify the page prorties too
Page proprties / Optional tab / User Interface Templates
Et voila'
Hope this clarifies
Cheers
Diego -
I am trying to install IDM on my own laptop and use MS SQL Server 2000 as the repository. I run the create table scripts, copy all the jar files to C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Idm\WEB-INF\lib. But I still got the following error message:
com.waveset.util.ConfigurationError: Cannot find columns for table 'object' ==>com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'object'
Does anyone have any idea of what may cause this problem?
THANKS!I found the solution to this issue.. is that the Database user ID must be set to the schema .. this is the statment that probably did not work:
CREATE USER <username> FOR LOGIN <login name> with DEFAULT_SCHEMA = <database name>
In sql 2005 expand the database... open security .. find the user.. right click and select properties.. in the default schema box.. select the SunSync database .. in the schemas owned by this user select the sunsync schema database..
good luck -
Not able to display data in different columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.Hi Venkat,
After extracting data into DSO check the request whether active or not.
Check data in DSO in contents.
If is there any restrictions on info providers in Queries.
Let us know status clearly.......
Reg
Pra -
Not able to display data in separate columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.
This is an urgent need. Please help me out.Hi,
I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
eg:
select
case
TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2)
= :P15_EV_LCL
then
span style="background-color:lightgreen"
|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
else
span style="background-color:yellow"
|| TRUNC(
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
end "Effort"
from actuals Z
If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
Please suggest
Thanks
Sudhir
Edited by: Sudhir_N on Mar 23, 2009 10:00 PM -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002
Maybe you are looking for
-
Bluetooth from iPhone 3GS to MacBook Pro not working?
I am having (seemingly) bluetooth connection issues with "some" devices to my MacBook Pro. I note: * Mouse pairs fine * iPhone 3GS does not remain connected (focus of this forum question) Error - after pairing my iPhone 3GS to my MBP I get an error:
-
Hiding filenames when combining multiple files into a single .pdf
I'm fairly new to this Acrobat X. I'm trying to assemble my portfolio to distribute to employers but I cannot seem to get rid/hide the filenames in the final pdf file. I was using the option to 'combine multiple files into a single pdf' because I was
-
Vibration setting: how to make it vibrate continou...
Hi, my cyan Lumia 800 (OS 7740, firmware 7720, hardare x.3) vibrates only two short bursts (about 1 sec) each upon receiving a call, but I want it to viabrate as long the ringtone rings. Vibrate is "on", what else can I configure and is this a known
-
Down Payment in A/R invoice
Hi, How can we address this scenario? The invoice amount is INR 2000 DP INR 200 When i select a tax code system calculate the tax on the (Inv Amt-Down Payment) Is there any way by which i can make the tax to calculate o
-
Hello, I'm trying to free up space on my MacBook Air by deleting videos & photos, but when I attempt to do so, the supposed deleted items do not appear in the iPhoto trash. Even if I drag to the trashcan in the list. What am I doing wrong? I delet