Columns merged with other columns?

how do I achieve the following?
I want to have a tabular form as following
The first line of the tabular form will only be 3 columns (eg. col1,col2,col3). those three columns will then be broken down into 9 columns (ed. col1 - no column, col2 will have col4,col5,col6, and col7, col3 wil have col8 to col12.) on the second line.
Any ideas? I know it is possible to do with html but i'm not sure how to process it in APEX

What I typically do first is to look at a report template from the current theme and see what CSS classes they are using against the tables, headers and rows. I will copy the entries to a text document so I can easily reference them.
The you create a new report template from scratch and as a Named Column (row template).
This type template allows you to specify where each column goes by using a substitution variable for the selected column.
The query I used in the example was
select ename, job, sal
from emp
For the Row Template 1 field under Row Template section, I put
<tr><td>#ENAME#</td><td>#JOB#</td><td>#SAL#</td></tr>
In the Before first and after last row text section I put
1. in the Before rows field
<style type="text/css">
table.outln {border-collapse:collapse;}
table.outln td {border: solid #000 1px;padding:5px;}
</style>
<table cellpadding="0" border="0" cellspacing="0" summary="" class="t9standardalternatingrowcolors outln" border="1">
<tr><th class="t9header" colspan="2">Name / Job</th><th class="t9header">Salary</th></tr>
2. In the After Rows field
</table>
This type of template is REALLY powerful. The only issues that I have run into in the past is that the order of the columns in your query should be the same as the order in which they are used in your row template. I am not sure if it is still an issue, but I have experience issues in the past that when you later change the query and the order is different then the rows are actually put in by position and not by name. To fix that problem I just drop the report and recreate.
If you happen to have my book by Oracle Press, HTML DB Handbook, there is a good description of this type of template on pages 211- 215.
The book is a little old now (almost 2 years). Just happened that they renamed HTML DB to ApEx the month before the book was published. It covers ver 2.0, but still has some good info in it.

Similar Messages

  • How to replace the string of column value with other column value in same table

      
    I have a temp table  which contains 
    Id  Name CTC   Address                      Content
    1    Ross  $200   6th block                  Dear #Name your  CTC  is #CTC and your address is  #address
    2   Jhon   $300   1oth cross                 Dear #Name your  CTC  is #CTC and your address is  #address
    Now i want to  select content    so that it should get  replace with  the respective  columns  and final output should come like this 
     Dear Ross your  CTC  is 200 and your address is    6th block  
      Dear Jhon your  CTC  is 300 and your address is   10th cross  
    Kindly suggest

    I think RSingh suggestion is ok ... what do you mean by another way? ...maybe something more generic?
    maybe build a table whith the list of col you need to "replace" and dinamically build the replace query ...
    declare @colList table(colName varchar(100))
    insert into @colList
    select 'name'
    union all select 'ctc'
    union all select 'address'
    declare @cmd varchar(2000)
    select @cmd='select '+ (select 'replace(' from @colList for xml path('') +' content '+
    (select ',''#'+ colName +''', '+ colName +')' from @colList for xml path(''))
    +' from YOURTABLENAME '
    exec (@cmd)
    or your request was different ?

  • How to use SQL*Loader to load XMLType Column with other columns?

    Hi,
    I am trying to use sqlldr to load an XML file into a table with an XMLType column. I have found plenty of examples where the entire table is an xmltype, but I would like to load many XML objects into a generic table for processing with one XMLType column and many other columns to identify the load. As a simple example, I have one constant column which I want to set during the upload.
    The following example does not work :(. No errors either.
    create table xml_upload
    (upload_type varchar2(10) not null,
    xml_data XMLType)
    my control file:
    LOAD DATA
    INFILE * append
    INTO TABLE xml_upload
    XMLType(xml_data)
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    upload_type constant MARKET,
    xml_data
    BEGINDATA
    <SALE_ORDER>
    <CUST_CODE>TIM</CUST_CODE>
    <ORDER_NUM>1234></ORDER_NUM>
    </SALE_ORDER>
    $ sqlldr my.ctl
    SQL*Loader: Release 10.2.0.4.0 - Production on Sun Sep 27 22:51:52 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Commit point reached - logical record count 4
    SQL> select * from xml_upload;
    no rows selected
    SQL>
    Any ideas on how I can do this? Am I missing something...
    I have also been playing with the lobfile clause of sqlldr, also without any success...
    Current database version is 10g R2.
    Thanks,
    Tim.

    Hi,
    I tried the same example as it is. but, I am getting the following error:
    SQL*Loader-350: Syntax error at line 6.
    Expecting valid column specification, "," or ")", found "filler".
    ,file_name  char(100) fillerThe table I created is:
      create table xml_upload
    (upload_type varchar2(10) not null,
    xml_data XMLType)The control file I used is:
    LOAD DATA
    INFILE *
    INTO TABLE xml_upload TRUNCATE
    upload_type constant 'MARKET'
    ,file_name  char(100) filler
    ,xml_data LOBFILE (file_name) TERMINATED BY EOF
    BEGINDATA
    test.xmlThe database I am using is 10gr2

  • Merge with first column

    When i try to merge the 2nd cell in a row with the first cell, the "Merge cells" option is greyed out yet the option is there for all other cells in the row. What is it about that fist column than makes it so you can't merge with it? Is it a header column? Anybody know why or how to fix? Thanks.

    There is a way to convert a standard column into a header column.
    The reverse is unavailable.
    You must insert a standard column between column A and column B.
    Copy the contents of the column A
    Paste into the new column B
    Delete column A.
    Yvan KOENIG (VALLAURIS, France) samedi 6 novembre 2010 21:13:43

  • Getting a column in numbers '09 to not sort along with other columns

    How do I have a header column not sort along with the other columns. for example, if I have a spread sheet with all my contacts and there is a numbers header column on the left, how do I get the last name column to sort but not have the header column sort along with it?
    Patrick
    Ohio

    pmalone wrote:
    How do I have a header column not sort along with the other columns. for example, if I have a spread sheet with all my contacts and there is a numbers header column on the left, how do I get the last name column to sort but not have the header column sort along with it?
    Feature unavailable.
    We sort every columns or none of them.
    Yvan KOENIG (VALLAURIS, France) vendredi 18 septembre 2009 19:23:57

  • How to show Relevance% along with other columns

    I need to retieve the Relevance % in adddition to other columns
    in a table? How can I get the Relevance %?
    Thanks.

    The Score(1) does return a number but it is not the number we
    are looking for. For example, we have a column, say,
    Description in a table. The Decsription column has text,
    say, 'Telecom'. Now when we do a query and search on the
    description column using the intermedia index for the
    word 'Telecom', then the Score(1) should return 100 for that
    record since that is the only word in the Decsription column.
    Is it possible to do that using intermedia?
    Thanks.

  • TableView - How to update a running balance column after any other column in the view is re-sorted

    To keep this simple and to illustrate a problem that I am trying to solve let's say we have
    a domain class that contains an income per day.
    This class has two persistent properties - populated from a database table - date and income.
    And there is one transient property - running balance - that shows the accumulated income
    starting from the first record. This property is not persisted and it is used only to show
    the running/accumulated income in a table view.
    This domain object is shown in a table view with three columns:
         - date
         - income
         - running balance
    The first two columns - date and income - are sortable. When the user clicks on the column
    heading these can will be sorted in ascending or descending order. The running balance
    column needs to reflect this change and be correctly updated.
    So the question is : how would you implement the running balance update after the data in
    the table has been updated by the user?
    Take 1)
    =============
    The obvious approach is to use "setOnSort" method to consume the SortEvent event and re-sort the
    data but the sort-event does not contain any useful information that would tell from which column
    the sort event originated.
    Take 2)
    =============
    Found a possible solution:
         - TableView.getSortOrder() returns a list that defines the order in which TableColumn instances are sorted after the user clicked one or more column headings.
         - TableColumn.getSortType() returns the sort type - ascending/descending.
         - This info can be used in the TableView.setOnSort() event handler to re-sort the data and update the balance at the same time.
    Take 3)
    =============
    When the TableView.setOnSort() event handler is called the data is already sorted therefore the only thing that needs to be done is to update the running balance.

    I  think I understand what you're trying to do. If I've missed it, apologies, but I think this will provide you with something you can work from anyway.
    I would listen to the data instead of watching specifically for sorting. This will be much more robust if you add new functionality later (such as adding and removing rows, editing the data that's there, etc).
    Specifically, for the runningBalance column, create a cellValueFactory that provides a DoubleBinding; this binding should listen for changes to the data and compute the value by running through the table's items up to the point of the item for which it's displaying the value. (Hope you can untangle that sentence.)
    Example. The important part is the cellValueFactory for the cumulativeAmountCol. I guess I should mention that you shouldn't try this exact approach with very large tables as the performance might be pretty bad (computations of the order of n x m on changing data, where n is the number of rows in the table and m is the number of visible rows in the table).
    import java.text.DateFormat;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Random;
    import javafx.application.Application;
    import javafx.beans.Observable;
    import javafx.beans.binding.DoubleBinding;
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.scene.Scene;
    import javafx.scene.control.TableCell;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableColumn.CellDataFeatures;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class CumulativeTableColumnExample extends Application {
      private final static int NUM_ITEMS = 20 ;
    @Override
      public void start(Stage primaryStage) {
      final TableView<LineItem> table = new TableView<>();
      // using the extractor here makes sure the table item list fires a list changed event if any amounts change
      // this enables the cumulative amount column to keep up to date when the amount in a different row changes.
      table.setItems(FXCollections.observableList(createRandomData(), new Callback<LineItem, Observable[]>() {
          @Override
          public Observable[] call(LineItem item) {
            return new Observable[] {item.amountProperty()};
      final TableColumn<LineItem, Date> dateCol = new TableColumn<>("Date");
      final TableColumn<LineItem, Number> amountCol = new TableColumn<>("Amount");
      final TableColumn<LineItem, Number> cumulativeAmountCol = new TableColumn<>("Cumulative Amount");
      table.getColumns().addAll(Arrays.asList(dateCol, amountCol, cumulativeAmountCol));
      dateCol.setCellValueFactory(new PropertyValueFactory<LineItem, Date>("date"));
        amountCol.setCellValueFactory(new PropertyValueFactory<LineItem, Number>("amount"));
        cumulativeAmountCol.setCellValueFactory(new PropertyValueFactory<LineItem, Number>("amount"));
        cumulativeAmountCol.setSortable(false); // otherwise bad things might happen
      final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
      dateCol.setCellFactory(new Callback<TableColumn<LineItem, Date>, TableCell<LineItem, Date>>() {
          @Override
          public TableCell<LineItem, Date> call(TableColumn<LineItem, Date> col) {
            return new TableCell<LineItem, Date>() {
              @Override
              public void updateItem(Date date, boolean empty) {
                super.updateItem(date, empty);
                if (empty) {
                  setText(null);
                } else {
                  setText(dateFormat.format(date));
      cumulativeAmountCol.setCellValueFactory(new Callback<CellDataFeatures<LineItem, Number>, ObservableValue<Number>> () {
          @Override
          public ObservableValue<Number> call(CellDataFeatures<LineItem, Number> cellData) {
            final LineItem currentItem = cellData.getValue() ;
            DoubleBinding value = new DoubleBinding() {
                super.bind(table.getItems());
              @Override
              protected double computeValue() {
                double total = 0 ;
                LineItem item = null ;
                for (Iterator<LineItem> iterator = table.getItems().iterator(); iterator.hasNext() && item != currentItem; ) {
                  item = iterator.next() ;
                  total = total + item.getAmount() ;
                return total ;
            return value;
        final NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();
      // generics hell.. can't wait for lambdas...
      final Callback<TableColumn<LineItem, Number>, TableCell<LineItem, Number>> currencyCellFactory = new Callback<TableColumn<LineItem, Number>, TableCell<LineItem, Number>>() {
          @Override
          public TableCell<LineItem, Number> call(TableColumn<LineItem, Number> column) {
            return new TableCell<LineItem, Number>() {
              @Override
              public void updateItem(Number amount, boolean empty) {
                if (empty) {
                  setText(null) ;
                } else {
                  setText(currencyFormat.format(amount));
        amountCol.setCellFactory(currencyCellFactory);
        cumulativeAmountCol.setCellFactory(currencyCellFactory);
        BorderPane root = new BorderPane();
      root.setCenter(table);
      primaryStage.setScene(new Scene(root, 600, 400));
      primaryStage.show();
      public List<LineItem> createRandomData() {
        Random rng = new Random();
        List<LineItem> items = new ArrayList<>();
        for (int i=0; i<NUM_ITEMS; i++) {
          Calendar cal = Calendar.getInstance();
          cal.add(Calendar.DAY_OF_YEAR, rng.nextInt(365)-365);
          double amount = (rng.nextInt(90000)+10000)/100.0 ;
          items.add(new LineItem(cal.getTime(), amount));
        return items ;
      public static void main(String[] args) {
      launch(args);
    public static class LineItem {
        private final ObjectProperty<Date> date ;
        private final DoubleProperty amount ;
        public LineItem(Date date, double amount) {
          this.date = new SimpleObjectProperty<>(this, "date", date);
          this.amount = new SimpleDoubleProperty(this, "amount", amount);
        public final ObjectProperty<Date> dateProperty() {
          return date;
        public final Date getDate() {
          return date.get();
        public final void setDate(Date date) {
          this.date.set(date);
        public final DoubleProperty amountProperty() {
          return amount ;
        public final double getAmount() {
          return amount.get();
        public final void setAmount(double amount) {
          this.amount.set(amount);

  • Render a column based on other column value in the same table

    JDev 11.1.1.6.0
    This may be a silly question but I am stuck
    I need to conditionally render a column say A. Condition is like if the value in the other column B of same table is equal to F. I should render column A only when this condition is satisfied. I have tried the following code:
    <af:column sortProperty="PhoneNumber1"
    sortable="false"
    headerText="#{bindings.A.hints.PhoneNumber1.label}"
    id="c146"
    rendered="#{row.PhoneNumber1ResponseFlag eq 'F'}">
    <af:outputText value="#{row.PhoneNumber1}"
    id="ot130"/>
    </af:column>
    <af:column sortProperty="PhoneNumber1ResponseFlag"
    sortable="false"
    headerText="#{bindings.B.hints.PhoneNumber1ResponseFlag.label}"
    id="c80" rendered="true">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag}"
    id="ot129"/>
    </af:column>
    The data shown in the table for column  PhoneNumber1ResponseFlag is F. Still my condition is not working.

    Timo was saying that it is not possible to render the column in some situations and not in anothers, you will always have to render the column.
    The best way to do this is instead of showing a column with the text ' ', show something meaningfull to the user. This is a DataWarehouse advice to you and may be usefull since you're using ADF in a area that uses DataWarehouse..
    So the code could be something like this (based on Timo's code):
    <af:column sortProperty="PhoneNumber1"
    sortable="false"
    headerText="#{bindings.A.hints.PhoneNumber1.label}"
    id="c146">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag eq 'False.' ? row.PhoneNumber1 : 'No value applied.'"
        id="ot130"/>
    </af:column>
    <af:column sortProperty="PhoneNumber1ResponseFlag"
    sortable="false"
    headerText="#{bindings.B.hints.PhoneNumber1ResponseFlag.label}"
    id="c80">
    <af:outputText value="#{row.PhoneNumber1ResponseFlag}"
        id="ot129"/>
    </af:column>
    Hope that helps,
    Frederico.

  • Add each column record with next column record

    Dear all,
    I have created a crosstab with the column "Order Numbers". Each Order number is calculated per day.
    I would like to know how can I create a formula so that each record in the column field is calculated by adding the next column field.
    For example
    Order numbers
    1
    2
    3
    4
    5
    Formula should display the records like this
    Order Numbers
    1
    3 (12)+
    6 (123)
    10 (1234)+
    15 (12345)
    So in other words each record in each field of the column is adding the next field.
    Something like ColumnRecord= Column Record+Next column Record.
    How can we achieve this?
    Many thanks
    Regards
    Jehanzeb

    Hellooo,
    I have sorted it.
    here is what I did
    Firstly I selected the Column field (percentage field).
    Clicked format -
    > then Suppress and clicked on x+2
    added the following formula
    whileprintingrecords;
    numbervar x := x + currentfieldvalue;
    false
    Then I clicked on Display String x+2 and entered this.
    whileprintingrecords;
    numbervar x;
    totext(x,2)+"%"
    Then I clicked on border->background> and added this formula
    whileprintingrecords;
    numbervar x := 0;
    defaultattribute
    all set and it is working perfectly.
    I hope this helps someone who is seeking this type of formula
    Regards
    Jehanzeb

  • How to insert into date column based on other columns?

    Hi
    I have four columns in a table called game named as
    R_Day - Type - Number
    R_Month - Type - Number
    R_Year - Type - Number
    R_Date - Type - Date
    I have around 1000 records and i want to fill R_Date column based on the data in the R_Day,R_Month,R_Year.
    How to write a query to fill the R_Date column based on other three columns.
    Thanks
    srinivas

    select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    dt from (select 23 R_Day,07 R_Month,2007 R_Year from
    dual);
    Hi,
    Update <Table Name> set R_Date=select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    from <Table Name>
    Regds.
    Nirmal
    SQL>  select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007
            21         11       2007
    SQL> update test
      2  set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
      3  from test;
    set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    ERROR at line 2:
    ORA-00936: missing expression
    SQL> update test
      2  set r_date = to_date(r_day||'-'||r_month||'-'||r_year,'dd-mm-yyyy');
    2 rows updated.
    SQL> select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007 01-JAN-07
            21         11       2007 21-NOV-07
    NB:Please test before posting..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • IView from second level navigation merged with Other page

    Hi All,
    I encountered a typical problem with iViews.
    I have second level navigation with links as AAA,BBB,CCC (work sets) added to the Role-1.
    CCC is a work set which is been added with pages CCC-1,CCC-2,CCC-3. (CCC-1,CCC-2,CCC-3 are also added to detailed level navigation).
    Now on clicking of CCC (second level navigation link), I have page displaying with CCC-1 (which is working as desired).
    Now I have page DDD wh.ich is directly to the Role-1. Hence now second level navigation is displaying as AAA,BBB,CCC,DDD on clicking on Role -1 .
    Now when I click on CCC, while displaying the contents of CCC-1, DDD (page) is also displaying beneath of the CCC-1.
    I don't want this DDD merging with CCC-1.
    Can any one help me, how to resolve this issue.
    Thanks in Advance,
    Chinna.

    Hi,
    Just a thought : you could create a new workset and put DDD in it and see if that helps.
    Regards,
    Pierre

  • Display days of the month as columns along with other information

    Hi All
    I have a requirement where in I have to display the employee wise leave details for a particular month data passed as parameter to be displayed will be some thing like below
    per_all_people_f.employee_name, per_absence_attendances.date_start, per_absence_attendances.date_end, per_absence_attendance_types.name, '01-JAN-2012','02-JAN-2012','03-JAN-2012','04-JAN-2012',..........,'31-JAN-2012'
    Test_employee, 02-JAN-2012, 04-JAN-2012, sick leave, N,Y,Y,Y,N,N,N,,,,,,,,,,NSo if the parameter passed is JAN-2012 and the employee has taken leave from 02-JAN-2012 to 04-JAN-2012 the values will be Y otherwise it will be N, Similarly if the passed month is FEB-2012 so the columns will be as below
    per_all_people_f.employee_name, per_absence_attendances.date_start, per_absence_attendances.date_end, per_absence_attendance_types.name,'01-FEB-2012','02-FEB-2012',.......,'28-FEB-2012'The last date columns should be dynamic
    Any suggestions will be highly appreciated.
    Regards

    Hi,
    This looks like an example of a Pivot . See the forum FAQ {message:id=9360005} for several ways to do that, suitable for different versions.
    I hope this answers your question.
    If not, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data. Sinmplify the problem. For example, even though you're interested in all days of the month, post a problem that only involves, say, days after the 26th of the month. We'll help you find a solution that works for all days.
    In the case of a DML operation (such as INSERT) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0). This is always important, but even more so with pivots.
    See the forum FAQ {message:id=9360002}

  • Earliest & Latest Dates With * Other Columns

    Hi friends,
    I have data in a single table as:
    Customer_ID (VarChar, Key)
    Customer_Name
    Transaction_Date
    Transation_Amount
    What query could get me all the four fields with two additional fields reflecting the Earliest and the Latest dates of transactions of the Customer with his/her ID being used? Some Sub-Query & Joins?
    Best Regards, Faraz A Qureshi

    I reckon this is what you need
    select Customer_ID,
    Customer_Name,
    Transaction_Date,
    Transation_Amount,
    Min(Transaction_Date) over (Partition by Customer_ID) Early_Date,
    Max(Transaction_Date) over (Partition by Customer_ID) Latest_Date
    from <<your tablename>>
    --If this helps kindly mark it as answer

  • XML Report - Conditionally showing a column in between other columns

    I have a XML Report, with columns
    A, B, C, D
    Now I need to add a new column E in between B and C when certain condition is satisfied.
    A, B, E, C, D
    for column E, I kept <?if:column='X'?> columnname <?endif?>.
    When condition is satisfied it is displaying column and also values, but when not an empty column is displayed with no values, I dont want this empty column when condition is not satisfied.
    It should just show A, B, C, D instead of A, B,  , C, D
    Request you to help me with my requirement.

    Hi Kavipriya, thanks for response.
    I tried below condition for that column:
    <?if@column:OM_Due_Date_X='Y'?>  <?OM_Due_Date_L?>  <?end if?> 
    I am setting OM_Due_Date_X in sql package to 'Y' if customer is 'Rob' else it will be 'N'.
    If 'Y', then I am displaying a column name OM Due Date which is <"OM_Due_Date_L?>
    Now for Column values it is just <?OM_Due_Date?>
    Do I need to change anything here ?

  • Finding column count with dynamic columns and dynamic tables

    I've done some PL/SQL for awhile now but was trying to devise a solution for the following problem:
    I wish to find the number of times a specific value for a column exists in all the tables that contain the field and I have access to see with the current user. The column name and value will be passed in via parameters.
    I was hoping to use something like
    select table_name from all_tab_columns where column_name = <variable table name>;
    then use the results from this to create a select statment based off the tables from the select above. I know the difference between dba_tab_columns and all_tab_columns - I want to make sure that I only retrieve the values i have access to.
    Can anyone point me to some guide / website / reference material I can read to catch up on the idea of creating this statment?
    Thank you.

    Hi,
    it's a test version.
    You can naturally tune it, but it seemed to work:
    declare
    pi_column VARCHAR2(30) := 'DEPTNO';
    pi_value VARCHAR2(4000) := '20';
    v_count NUMBER := 0;
    v_count_tab NUMBER;
    BEGIN
    FOR I IN (select owner, table_name from dba_tab_columns
              where column_name = pi_column
    LOOP
        EXECUTE IMMEDIATE 'SELECT count(*) FROM '||i.owner||'.'||i.table_name||
                          ' WHERE '||pi_column||' = :pi_value'  INTO v_count_tab USING pi_value; 
        v_count := v_count + v_count_tab;
    END LOOP;                   
    dbms_output.put_line(v_count);
    END;Regards

Maybe you are looking for