Get Tables & Columns
Which tables do I query on to get a list of all Tables & Columns with its Data type?
At the moment I can see TAB$, COL$ and OBJ$ but I'm confused as to how to join them to get the data. Or is it in some other tables?
The table names are
1. User_tables
2. ALL_TABLES Description of relational tables accessible to the user
3. ALL_TAB_COLUMNS Columns of user's tables, views and clusters
Similar Messages
-
Getting table column header names from database
Hi,
We are trying to get table headers from database. So when we query the database it returns multiple rows at the same time. How can we display specific table column headers from the returned result set at respective places.
We tried using record selection expert but that only works for one selection and not for others.
How can we do this?Thank you Josh and Abhilash for helping us.
We are using PostgreSql.
"command_headers" has query which looks like following-
SELECT id, header FROM labels
WHERE id='header.header_1'
OR id='header.header_2'
OR id='header.header_3'
ORDER BY id;
which will return following result set-
id header
header.header_1 Header1
header.header_2 Header2
header.header_3 Header3
Our Table structure is something like this-
Page Header: Header1 | Header2 | Header3
Details: {command_data.value1} | {command_data.value2} | {command_data.value3}
command_data is another command which generates data for the table.
All values in details section coming from command_data is in format string.
We don't need to apply grouping or sub totals. This is a simple table, showing string values for all columns.
Preview:
Header1 | Header2 | Header3
car | yello | abc
bike | black | xyz
plane | white | pqr
Currently, all headers are static labels. How do we use "command_headers" to display all table Headers dynamically? Can we achieve this format using cross tab? -
Get Table Columns inside a Trigger
I am currently working on triggers. Is there a way to retrieve all the columns of the table where the trigger is associated to? I got a way to get columns a table using the query below.
select column_name from all_tab_columns
where table_name = 'tablename'
and owner = 'ownername'
But is there other way?Hi ,
Unfortunately , i don't think that there is a 'dynamic' solution to your problem....
I'm facing the same problem ....see the below post...
Getting the columns of a table which are inserted/updated via db trigger
Regards,
Simon -
How get table column value in textfield on mouse click in table column
hi master
sir i have one table that have three field
sno
name
fname
and three textfield in my page
how i get sno,name,fname in textfield form table when i click any reow or any record
when i cliek any record that record value sno,name and fname transfer to textfiled1,textfield2 and textfield3
please give me idea and code
thank's
aamirHi Gorge,
Are you sure the column you are accessing is of type EditText ?
Please step through your code and do check the type of the column first.
While Rows <= index
Dim o = omatrix.Columns.Item("2000002049").Type 'Check the type here first.
edit1 = oMatrix.Columns.Item("2000002049").Cells.Item(index).Specific
index = index + 1
Regards
Edy -
How do you get table column names to show one time per page
I have a report where I want the column names to show one time per page.
I have the table with the column names set below the header and above the
'for-each Row'.
When I view the report in PDF format the colunm names show only one time on the first page and on the other pages the column names do not show at all. If I view the report in RTF, the same thing happens, shows column names on the first page, but not on the other pages after that.
I highlighted the table and went to table properties, clicked on ROW tab and then checked (Repeat as header row at the top of each page) and it still does not work for PDF or RTF format. I have looked at other forums with this issue and it doesn't work for me in PDF format.
Could someone tell me what I am doing wrong.....
I appreciate anyone that can help me.
Thank you,
SusieI figured out what I was doing wrong.
I was creating a seperate table for the column names and not using the table where the column names where created originally. I deleted the column names from the original table and created a seperate table above that table with the column names only.
So I went back to the original table and highlighted the row with the column names and went to table properties/ROW tab/ and clicked (Repeat as header row at the top of each page) and now it works perfectly in PDF format where the column names show one time for each page. Deleted the other table where I had the column names only.
thanks
Susie -
How to get the column values from a BC4J View Table in UIXML?
I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
I appreciate any help on this.Hi,
You need to use keyStamp, an example:
<bc4j table name="orders">
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
<event name="show">
<!-- forward to the update page, passing
the selected key as a page property -->
<ctrl:go name="orderInfo" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="orders" key="key" />
</ctrl:property>
</ctrl:go>
</event> -
Just new to this and unable to find answers
My solution
Public Function GetTableColumnNames() As Boolean
Form1.ListBox1.Items.Clear()
_MDFFileName = String.Format("{0}.mdf", _DatabaseName)
_sqlConnectionString = String.Format("Data Source=(LocalDB)\v11.0;AttachDBFileName={1};Initial Catalog={0};Integrated Security=True;", _DatabaseName, Path.Combine(_DatabaseDirectory, _MDFFileName))
Dim cn As New SqlConnection(_sqlConnectionString)
'put the table name in brackets in case it has spaces in it
Dim SQLString As String = "SELECT * FROM [" & _TableName & "]"
Try
cn.Open()
Dim cmd As New SqlCommand(SQLString, cn)
Dim rdr As SqlDataReader =
cmd.ExecuteReader(CommandBehavior.KeyInfo)
Dim tbl As DataTable = rdr.GetSchemaTable
'This shows all of the information you can access about each column.
For Each col As DataColumn In tbl.Columns
Form1.ListBox1.Items.Add(col.ColumnName)
Debug.Print("col name = " & col.ColumnName & ", type = " & col.DataType.ToString)
Next
'Get each column.
For Each row As DataRow In tbl.Rows
Form1.ListBox1.Items.Add(row("ColumnName"))
Next
rdr.Close()
Catch
MessageBox.Show("Error opening the connection to the database.")
Finally
cn.Close()
End Try
Return _Success
End Function -
Trigger how to get new and old value for nested table column?
Hi,
I have created a nested table based on the following details:
CREATE TYPE typ_item AS OBJECT --create object
(prodid NUMBER(5),
price NUMBER(7,2) )
CREATE TYPE typ_item_nst -- define nested table type
AS TABLE OF typ_item
CREATE TABLE pOrder ( -- create database table
ordid NUMBER(5),
supplier NUMBER(5),
requester NUMBER(4),
ordered DATE,
items typ_item_nst)
NESTED TABLE items STORE AS item_stor_tab
INSERT INTO pOrder
VALUES (800, 80, 8000, sysdate,
typ_item_nst (typ_item (88, 888)));
Now I would like to create a trigger on table pOrder for after insert or update or delete
and I would like to track the new and old value for the columns inside nested table.
Can anybody direct me how to do it?
I would like to know the sytax for it like:
declare
x number;
begin
x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
end;
Hope my question is clear.
Thanks,
LavanHi,
Try like this:
CREATE OR REPLACE TRIGGER PORDER_I
BEFORE INSERT
ON PORDER
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
DECLARE
items_new typ_item_nst;
ordid_NEW NUMBER;
BEGIN
FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price: ' || :new.items(I).price );
END LOOP;
END;Regards,
Peter -
How to get the column names of the table into the Dashboard prompt
how to get the column names of the table into the Dashboard prompt
Thanks & Regards
Kishore PHey john,
My requirement is as follows
I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
My pivot table looks like this
COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
---------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK REGION DOLLARS DOLLARS DOLLARS DOLLARS
1 CENTRAL 10 20 30 40
2 SOUTHERN 10 30 30 70
3 EASTERN 20 20 20 60
4 WESTERN 10 20 30 40
When i select the District in column selector
Report has to display rank based on Total Sales by District. i.e
------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK DISTRICT DOLLARS DOLLARS DOLLARS DOLLARS
for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
do you have any solution for this?
http://rapidshare.com/files/402337112/Presentation1.jpg.html
Thanks & Regards
Edited by: Kishore P on Jun 24, 2010 7:24 PM
Edited by: Kishore P on Jun 24, 2010 7:28 PM -
How to get the F4 help for table columns ..
Dear All,
Here I have created table with cell editors of INPUT FIELD .
And I would like to provide the f4 help for those columns .
Here I have checked the node , which i have binded to the table, there input help mode is set to Automatic and search helps are also attached for that node .
But in the table I am not getting the F4 help . Where as if i create the input fields invidually i am able to see the F4 help .
But for table column I am unable to find..
Help me regard this...
Thanks & regards,
Veerednra NathHi,
In debugging , the I have seen the node info attributes list ( VALUE_HELP_ID and VALUE_HELP_MODE ) .
For you understanding, Here I am giving the values which contains ,
VALUE_HELP_ID contains the AUTO:VBUK
AUTO:VBUP
AUTO:MAT1
AUTO:H_T023
and
VALUE_HELP_MODE contains the all Zeros for all the four attributes .
Hope I have given correct inputs .
Thanks & Regards,
Veerendra Nath -
How to get one column of ALV table as dropdown by key.
Hi experts,
How can I get one column of ALV table as dropdown and editable. If user wants to change that column value he can just select from that dropdown and click on update button. Can I provide tool tip to that column as " Select from drop down to change the status "?
Please Help.
Thanks,
PratibhaYou just need to change the cell editor of that column in ALV.
So first get access to the alv model object (adjusting the code below for your ALV Component Usage name - mine was ALV_ADV):
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv_adv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ).
DATA l_table TYPE REF TO cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
Then access the column object you want to change:
DATA l_column TYPE REF TO cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'REGION' ).
Then create the cell editor for DDLB and set it as the new cell editor for this column:
DATA ddlb TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
create object ddlb
exporting
selected_key_fieldname = 'REGION'.
ddlb->set_tooltip( `Select from drop down to change the status` ).
l_column->set_cell_editor( ddlb ). -
Getting row count of file into table column
Hi experts,
I want to insert the row count of the file into a table column for generating a summary file containing the detials of all the files generated for the day along with the row count and also for audit purpose.
My design is to create table in the summary file format & update the data's in it then using OdiSqlUnload to generate the required summary file, for this purpose I need to insert the row count of the file generated.
I tried to get the row count using the http://odiexperts.com/get-file-length-and-header-in-operator post. But passing the "lines" value into a ODI variable or inserting into a table column is not working.
Please help or suggest what can be done to achive the above scenario.
Thanks in advance.There are a few excellent examples at :- COUNT
Cheers
John
http://john-goodwin.blogspot.com/ -
How to get table data column by column dynamically
Hi ,
first of all
i have something like this
cursor sys_cursor is
select * from sys.all_objects;
v_data varchar2(200);
fetch sys_cursor
into v_owner, v_object_name, v_subobject_name, v_object_id, v_data_object_id, v_object_type, v_created, v_last_ddl_time, v_time_stamp, v_status, v_temporary, v_generated, v_secondary;
v_data := v_owner || ' ' || v_object_name || ' ' || v_subobject_name || ' ' ||
v_object_id || ' ' || v_data_object_id || ' ' ||
v_object_type || ' ' || v_created || ' ' || v_last_ddl_time || ' ' ||
v_time_stamp || ' ' || v_status || ' ' || v_temporary || ' ' ||
v_generated || ' ' || v_secondary;
encrypt(v_data);
it is ok for "sys.all_objects" but i need to modify this for all tables
so , i need to know column names of table and type of it and value of it
then i need to get column values by one by and encrypt it.
i used dbms_sql and succeed to find column name and type
however , i couldnt get the values.i can't use dbms_sql.column_values because i find column type dynamically.
what can i do?
how can i get table data by row
and then for each row , i need to get values of columns by one by and encrypt those values.
any idea is appriciated.
thanks
AykutDynamic SQL is the solution. Right from getting the column names, their data types to passing the string to encrypt function that you have.
You will need to handle datatypes like LONG, LOB etc... as they cannot be concatenated with strings.
Also, you need to manage dates and numbers.
Obviously this would be very complicated code.
Even if you decide to code the procedure to encrypt tables one by one, still you need to make this procedure dynamic to handle above situations. -
Popup is not getting launched click on command link in table column value
Hi
We have a scenario where we bring the pop-up clicking on command link in the table column value. It was working fine before but from last few labels this is not working.
Here is the code snippet that we are using,
<af:table>
<af:column>
<af:commandLink>
<af:outputText value=”product name” />
<af:showPopupBehavior TriggerType=”click” PopupId=”::p1”/>
<af:commandLink>
</af:column>
</table>
<af:popup id=”p1”>
<af:dialog>
</af:dialog>
</af:popup>
Thanks,
NageshIt is important to set partialSubmit="true" in the <af:commandLink> tag. A full submit will be made otherwise and the popup will not show. Use also tryggerType="action" instead of triggerType="click" and use the proper chararcter case of the tag attribute names. Try with this:
<af:commandLink text="product name" partialSubmit="true">
<af:showPopupBehavior popupId="::p1" triggerType="action"/>
</af:commandLink>Dimitar -
Table column names not getting displayed
Hi
When i do a SELECT statement i am not getting the column names
SQL> SELECT * FROM EE;
aa physics 100
bb physics 200
PLease let me know how can i set it.
Thank you
Marium ThomasDid you modify some of the default settings (e.g. HEADING or PAGESIZE)?
Try
set heading onhttp://download-uk.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1011230
Maybe you are looking for
-
Hi, For one of our users the option to send an email as attachment has disappeared in office programs such as word, excel etc As you can see from the above these are the normal options you expect to see but for the user affected they get the option t
-
Last used iphoto a month ago to upload photos. Today attempted to upload daughter's gymnastic photos and iphoto 9.4.3 will not open. Stops at dialog that says it must be updated to open my library. But I run Lion not Maverick. The new iphoto only ru
-
Creative cloud download error please contact customer support
I have installed and uninstalled creative cloud app multiple times. Each time I get the same error. "download error Please contact customer support. I have checked to see that the aamdetect plugin is installed. I have restarted safari. I have read ev
-
Hooking up to the camera?
Can aperture be hooked up to your camera while on a photoshoot? So Aperture becomes the lcd screen when it comes to viewing your images? MacBook Pro Mac OS X (10.4.7)
-
Custom Workflow Approval Table
What are some of critical fields that I would need if I were designing my workflow approvals to be based on a custom table? I have a fairly limited understanding of the major data components that are being used for workflow so any input from the exp