Shortly column definition

This is a biggest stupid question, but...
I would like to create a funtion that return a "field" for to put a column into a select. I will explian with an example:
my field (that usually write into a select):
NVL(ROUND(SUM(DECODE(field1,0,DECODE(field2,'T',myfield)))),0)
So, my problem is that I have a lot of this field and I would like to create a function for to have a shortly select command
for example, starting from:
SELECT
NVL(ROUND(SUM(DECODE(field1,0,DECODE(field2,'T',myfield1)))),0)
NVL(ROUND(SUM(DECODE(field1,0,DECODE(field2,'T',myfield2)))),0)
NVL(ROUND(SUM(DECODE(field1,0,DECODE(field2,'T',myfield3)))),0)
FROM TABLE1, TABLE2
WHERE
join TABLE1 with TABLE2
I would like to arrive to:
SELECT myfunction(myfield1), myfunction(myfield2), myfunction(myfield3)
I will create a function that return a string for to put it into the select or there is another solution for to have the myfield really that can be correctly calculated into the SELECT command ??
thanks in advance for your help and best regards.
Roberto

You don't make quite clear where these fields come from (tables have columns, forms have fields) but you could do something like this:
SQL> r
  1  CREATE OR REPLACE FUNCTION my_function (p1 IN VARCHAR2, p2 IN VARCHAR2)
  2     RETURN NUMBER
  3  AS
  4     default_value CONSTANT NUMBER := 999;
  5     return_value NUMBER;
  6  BEGIN
  7     IF p1 IS NULL
  8     THEN
  9        return_value := 0;
10     ELSIF p1 = 0
11     THEN
12        IF p2 = 'T'
13        THEN
14           return_value := default_value;
15        ELSE
16           return_value := p2;
17        END IF;
18     ELSE
19        return_value := p1;
20     END IF;
21     RETURN round(return_value);
22* END my_function;
Function created.
SQL> select sum(my_function( col1, col2)) FROM t1
  2  /
SUM(MY_FUNCTION(COL1,COL2))
                         21
SQL> Note that you cannot write aggregating functions, so you have to use SUM in the select statement.
Two additional points:
[list]
[*]If you are using 8i you don't need to declare the RESTRICT_REFERENCES pragma.
[*]If you want to do dataconversion with this thing it might be worth looking at the CREATE OPERTATOR functionality to create an overloaded function.
[list]
Cheers, APC

Similar Messages

  • Interactive Report's Column Definition - Single Row View Label Bug?

    Hello,
    I have an Interactive report that I've added a Blue background to certain column headings (done by giving Column Heading a background color), this works fine except for the Single Row view - it displays the <....> code I used to get the background color and the column heading. I've tried to change the Single Row View Label by unchecking the 'Use Same Text for Single Row View' on the Column Definition and giving a different label, it just ignores whatever I put in and shows the Column Heading with the < .... > code. Is this a Bug or am I doing something wrong?
    Thanks,
    Anna

    Hi Anna,
    I believe that it is a bug.
    If the 'Use Same Text for Single Row View' checkbox is unticked and some text is entered in the 'Single Row View Label' field it gets ignored completely when viewed in the single row view and the existing value in 'Column Heading' is used.
    I wanted to do something similar to you, colouring some of the Interactive Report column headers, and it works fine in the IR report itself but shows the code (span style:color etc) in the single row query. I am using Apex 3.1.1 and the Sand Theme.
    I created a simple application on apex.oracle.com using the red theme and in single row view it still ignores the 'Single Row View Label' but interestingly shows the Column Heading text without the code. This indicates that there could be a work-around by altering the theme.
    Regards,
    Chris

  • Data type in column definition

    Hi,
    I create a table with column called "Direction of Travel code ".
    The travel codes in the functional spec are numbers.
    In the column definition which one is efficient to define the data type as number or varchar?
    Code
    1      
    2      
    3      
    4      
    5      
    6      
    7      
    8      
    9      
    0

    tijmen wrote:
    Tubby wrote:
    And then when you issue a query and ask for travel codes 2 through 10 the CBO can't determine that there are 8 values (cardinality wise) because you're not storing the data type in the format you should be storing it as. Statistics? Perhaps even histograms?
    Simple testcase:
    create table t1(x number(1)) as select mod(rownum, 10) from all_objects where rownum <= 100;
    create table t2(x varchar2(1)) as select to_char(mod(rownum, 10)) from all_objects where rownum <= 100;
    exec dbms_stats.gather_table_stats(user, 'T1', method_opt => 'FOR ALL COLUMNS SIZE 1');
    exec dbms_stats.gather_table_stats(user, 'T2', method_opt => 'FOR ALL COLUMNS SIZE 1');Tried a few simple statements against those (where x = N, where x between N and M), using either literals or bind values. I didn't see any difference in the explain plan...
    Not to mention what happens when someone decides to put an "A" in your travel code that should be only numbers, it will eventually happen.Yes, and that's an input error that should be caught by a database constraint (and possibly even before that by the application). Who knows, the codes 0 and 5 might become obsolete as well with changing business rules. Your number datatype is not going to protest when someone still uses them. Hey, maybe even tomorrow someone from the business will come in and demand for the codes 'a' to 'd' to be created. Histograms, application code and database constraints (which all have side effects and add complexity to the system) as opposed to declaring the data type as a NUMBER (which it is). Doesn't seem like a really good argument for intentionally choosing the wrong data type. Well, at least you didn't suggest a trigger in there as well.
    >
    I'm not saying you should use a char type instead of a number. I'm saying I doubt there's much difference as far as the database is concerned, and I would base the decision on how it works out on the application and business side.As you've found out, the OP stated the functional specs define this as a number. IF in the future the specs change and a business analyst mandates that this support characters as well then the data type gets changed to support the new requirement, no database constraints to remove, no application code to remove, etc...

  • FK Constraints with nonmatching column definitions

    Hello,
    I ran a healthcheck with TOAD and he reported some foreign keys with nonmatching column definitions:
    ! Constraint : HERCULES.LBS_VAL_FK
    ! On Table : HERCULES.LOONBESLAG_SCHULDEISEN
    ! Columns : VAL_CD VARCHAR2 (5)
    ! To Table : HERCULES.VALUTA
    ! Columns : CODE VARCHAR2 (3)
    It also mentions that this causes poor performance because of data conversion.
    But, varchar2 means that each column has a variable length and this length is stored somewhere. So the value of VAL_CD and CODE will be stored in exactly the same way. No data conversion, no poor performance. Right?
    Or am I missing something here?
    Thanks for all the feedback.
    Rik

    I'm quite sure data type conversion doesn't take place here. However the very idea of different types for the PK-FK columns is nonsense, because you cannot fully use this VARCHAR2 (5) column in this case anyway. OK I'm not speaking about deferred constraints :)
    Gints Plivna
    http://www.gplivna.eu

  • 2 column definitions for a single table view

    Hi Experts,
    I have a requirement in which i need 2 column definitions for a single table view.
    The requirement is :
    ..............Week1...........              |....................Week2...............
    01/01/2007 |  02/01/2007  |    15/01/2007 | 16/01/2007 | 17/01/2007
    data.......... |  data..........  |    data.......... | data..........  |   data..........      
    data.......... |  data..........  |    data.......... | data..........  |   data..........    
    data.......... |  data..........  |    data.......... | data..........  |   data..........   
    the weeks shud be displayed for the corresponing dates below......
    Is it possible to have 2 column definitions
    Please help me out.
    Thanks in advance

    Hi Balaiji,
    proceed as follows:
    Create a structure in the dictionary called ZSTRU_USR02_F
      with  field1 type int4
              field3 type int4
              field3 type int4
    Create a table type in the dictionary:
    zusr02  line type ZSTRU_USR02_F.
    Create a structure in the dictionary:
    ZSTRU_USR02
      with tab1  type zusr02
      and tab2  type zusr02
    Create a table type in the dictionary:
    zttusr02 line type ZSTRU_USR02
    Create a controller (table.do) in a BSP-application
    Add the controller class to this controller.
    Add a attribute (table) instance public type zttusr02
    redefine method do_request, add the following coding:
      FIELD-SYMBOLS: <fs_tab> LIKE LINE OF table,
                     <fs_row> TYPE zstru_usr02_f.
      DATA: lirv_view TYPE REF TO if_bsp_page,
            lv_int    TYPE i.
    * Dispatch Input for event handling
      dispatch_input( ).
    * Navigation requested during Event handling?
      IF is_navigation_requested( ) IS NOT INITIAL.
        RETURN.
      ENDIF.
    * get some data into the table.
      INSERT INITIAL LINE INTO TABLE table ASSIGNING <fs_tab>.
      DO 3 TIMES.
        INSERT INITIAL LINE INTO TABLE <fs_tab>-tab1 ASSIGNING <fs_row>.
        ADD 1 TO lv_int.
        <fs_row>-field1 = lv_int.
        ADD 1 TO lv_int.
        <fs_row>-field2 = lv_int.
        ADD 1 TO lv_int.
        <fs_row>-field3 = lv_int.
      ENDDO.
      DO 3 TIMES.
        INSERT INITIAL LINE INTO TABLE <fs_tab>-tab2 ASSIGNING <fs_row>.
        ADD 1 TO lv_int.
        <fs_row>-field1 = lv_int.
        ADD 1 TO lv_int.
        <fs_row>-field2 = lv_int.
        ADD 1 TO lv_int.
        <fs_row>-field3 = lv_int.
      ENDDO.
    * Create the view
      lirv_view ?= create_view( view_name = 'table.htm' ).
    * Hand over the data
      lirv_view->set_attribute( name = 'table' value = table ).
    * Call the view
      call_view( lirv_view ).
    Create a view called table.htm. Add your controller class as controller class for the view and add the attribute table type zttusr02.
    Add the following to the layout:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
    <htmlb:tableView id             = "tableToDisplay"
                     table          = "<%=table%>"
                     emptyTableText = "No Data"
                     iterator       = "<%=controller%>"
                     footerVisible  = "FALSE"
                     encode         = "TRUE"
                     width          = "100%"/>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Go back to your controller class. Add the interface IF_HTMLB_TABLEVIEW_ITERATOR
    Implement the method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS
      DATA: lwa_column  LIKE LINE OF p_column_definitions.
    * Column 1
      CLEAR lwa_column.
      lwa_column-columnname          = 'TAB1'.
      lwa_column-title               = 'Column 1'.
      lwa_column-tooltipheader       = 'Tooltip Column 1'.
      lwa_column-width               = '50%'.
      lwa_column-wrapping            = 'FALSE'.
      lwa_column-horizontalalignment = 'LEFT'.
      lwa_column-verticalalignment   = 'MIDDLE'.
      APPEND lwa_column TO p_column_definitions.
    * Column 1
      CLEAR lwa_column.
      lwa_column-columnname          = 'TAB2'.
      lwa_column-title               = 'Column 2'.
      lwa_column-tooltipheader       = 'Tooltip Column 2'.
      lwa_column-width               = '50%'.
      lwa_column-wrapping            = 'FALSE'.
      lwa_column-horizontalalignment = 'LEFT'.
      lwa_column-verticalalignment   = 'MIDDLE'.
      APPEND lwa_column TO p_column_definitions.
    Implement the method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START and add:
      DATA: lr_tview   TYPE REF TO cl_htmlb_tableview.
      FIELD-SYMBOLS: <fs_row> LIKE LINE OF table.
      ASSIGN p_row_data_ref->* TO <fs_row>.
      CASE p_column_key.
        WHEN 'TAB1'.
          CREATE OBJECT lr_tview.
          lr_tview->id = p_cell_id.
          GET REFERENCE OF <fs_row>-tab1 INTO lr_tview->table.
          lr_tview->footervisible = ''.
          lr_tview->width = '100%'.
          p_replacement_bee = lr_tview.
        WHEN 'TAB2'.
          CREATE OBJECT lr_tview.
          lr_tview->id = p_cell_id.
          GET REFERENCE OF <fs_row>-tab2 INTO lr_tview->table.
          lr_tview->footervisible = ''.
          lr_tview->width = '100%'.
          p_replacement_bee = lr_tview.
      ENDCASE.
    With this you get a table in a table. Now if you create a second iterator you'll be able to adjust the apperance of the inner table, as well as you can add column headers.
    Hope that helps.
    Best Regards
    Michael

  • Can Data Masking support dependent column definition between instances

    Hi,
    The customer is trying to conduct an POC of Data Masking,one requirement is supporting "dependent column" definition between oracle databases.
    I know it's ok within an database,but no idea about between serveral databases.
    Do you have any advice.
    Thanks a lot.
    Kelvin

    I guess using a databaselink might do the job.
    Regards
    Rob

  • How to reduce the column definition w/o losing the data in the columns?

    I need to reduce a particular column definition of a table from varchar2(10) to varchar2(4), but there is already existing data inside this column. The max length of data in this column is only 2 chars, which is less than the new column length.
    What commands/steps should I take to reduce the column definition successfully without losing the data in this column?

    Unfortunately, there is no one step solution.
    You can create a new table and insert into this table with the old table values
    e.g.
    Old_Table
    fld1 varchar2(10)
    New_Table
    fld1 varchar2(4)
    insert into new_Table (select * from Old_Table) ;
    I need to reduce a particular column definition of a table from varchar2(10) to varchar2(4), but there is already existing data inside this column. The max length of data in this column is only 2 chars, which is less than the new column length.
    What commands/steps should I take to reduce the column definition successfully without losing the data in this column?

  • Listing foreign keys with non matching column definitions

    Dear All,
    I seen an entry in DBA weeky activities s that "Listing foreign keys with non matching column definitions" . What is meant by that?. How to pick up that?
    Shiju

    I seen an entry in DBA weeky activities s that
    "Listing foreign keys with non matching column
    definitions" . What is meant by that?. How to pick up
    that?Most probably find columns which are part of foreign keys, but their respective primary key column have different length (AFAIK data type cannot be different).
    Data dictionary can help you in that, I'll give you hints where to look at:
    user/all/dba_constraints - foreign and primary keys
    user/all/dba_cons_columns - columns which are part of constraints
    user/all/dba_tab_columns - column definitions of tables
    However creating query from these data dictionary views could be a nice task for you :)
    Gints Plivna
    http://www.gplivna.eu

  • AMBIGUOUS COLUMN DEFINITION

    I'M GETTING "AMBIGUOUS COLUMN DEFINITION" WHICH IS CLEARLY WRONG SO HOW DO I FIX IT ?

    user8093006 wrote:
    I'M GETTING "AMBIGUOUS COLUMN DEFINITION" WHICH IS CLEARLY WRONG SO HOW DO I FIX IT ?
    To explain what is happening. It is called name resolution.
    You use object names in code - where the object you refer to by name can be a function, procedure, variable, parameter, constant, global, etc. In SQL code, this also includes columns, tables, views, and so on.
    You get name collisions. This is when 2 objects have the same name. In SQL this often happens (and should happen!). The DEPT table has a column (primary key) called DEPT_ID. The EMP table indicates which department the employee works for, via its column (foreign key) DEPT_ID.
    So the name reference DEPT_ID is used multiple times by multiple tables.
    When you use DEPT_ID in a SQL statement, the SQL engine needs to resolve that name and determine to which column in which table you are referring to. This name resolution has a scope. The scope says which tables need to be considered (checked) for having a DEPT_ID column. The scope is determined (in this case) by the tables your SQL is selecting from.
    Now if your scope includes both EMP and DEPT tables, there is a name collision - and the SQL engine does not know whether your DEPT_ID name refers to the column in the EMP table, or the column in the DEPT table.
    And this is the error you are seeing. The SQL engine is saying that your name reference DEPT_ID is ambiguous, as it exists as different objects within that SQL's resolution scope.
    The fix is explicit scope. Where you do not use DEPT_ID and have the SQL engine figure out in which table it is (within the current scope) - instead you tell that to the SQL engine and indicate which table it is in.
    There are 2 method to use explicit scope in SQL. You can do that via using the name of the owner of the object - in this case, the name of the table that owns that column:
    select
        dept.dept_id,
        dept.department_name,
        emp.surname
    from dept, emp
    where dept.dept_id = emp.dept_id
    Or you can use aliasing (less typing and a bit more flexible ito code maintenance):
    select
        d.dept_id,
        d.department_name,
        e.surname
    from dept d, emp e
    where d.dept_id = e.dept_id
    Explicit scope is usually a good thing. Where implicit scope is needed, a feature such as synonyms should be considered (it allows explicit scope to be used, while enabling one to easily change the object that the name resolves to).

  • Column definition for a specific column in a view

    Is there a way to query the metadata to get the definition of a single column in a view? I can see the complete DDL for a view from USER_VIEWS.TEXT, and I can see the column listing in USER_TAB_COLUMNS to give the datatype etc. However, what I'm looking for is the DDL that defined a specific column.
    So, given:
    create table PERSON (
    SSN VARCHAR2(12),
    FIRST_NAME VARCHAR2(25),
    LAST_NAME VARCHAR2(25),
    STREET VARCHAR2(40),
    CITY VARCHAR2(30),
    STATE VARCHAR2(30),
    ZIP VARCHAR2(15),
    COUNTRY VARCHAR2(35))
    create view PERSON_VW as
    select SSN,
    FIRST_NAME,
    LAST_NAME,
    FIRST_NAME || ' ' || LAST_NAME FULL_NAME
    from PERSON
    I expect the query might look something like:
    select DDL from metadata where table_name = 'PERSON_VW' and column_name = 'FULL_NAME'
    and the result would be: "PERSON.FIRST_NAME || ' ' || PERSON.LAST_NAME"
    or select DDL from metadata where table_name = 'PERSON_VW' and column_name = 'FIRST_NAME'
    and the result would be: "PERSON.FIRST_NAME"
    Thanks!

    >
    Hi again Barry,
    When I queried user_tab_columns (or dba_tab_columns or all_tab_columns), I have the following list of columns:
    TABLE_NAME
    COLUMN_NAME
    DATA_TYPE
    DATA_LENGTH
    DATA_PRECISION
    DATA_SCALE
    NULLABLE
    COLUMN_ID
    DEFAULT_LENGTH
    DATA_DEFAULT
    I don't see anything resembling the DDL for the view column. Somewhere underneath some
    cover I haven't peeked under, Oracle must be keeping track of what it is supposed to be giving
    for, in my example, FULL_NAME.Unless I'm very much mistaken, these columns' data (per table) looks pretty much like DDL to me.
    Maybe what you need is just SQL Developer (great tool, if you don't have it, get it!).
    And it's free (as in beer - not as in speech! :( )
    Beside the connections tab is a "Reports" tab with various, as you might expect ;), reports.
    One of them is on the Tables - with (some) DDL. This will work as a once-off if that's what
    you need?
    Otherwise there's the SQL tab if you open a table under connections - it's very complete - sample
    at bottom of post.
    HTH,
    Paul...
    (Ultimately, I'm diagnosing problems in existing databases that have views already created so
    I don't have the option of considering virtual columns.)Quelle surprise ;(
    Paul...
    -Barry
    CREATE TABLE "HR"."COUNTRIES"
        "COUNTRY_ID"   CHAR(2 BYTE) CONSTRAINT "COUNTRY_ID_NN" NOT NULL ENABLE,
        "COUNTRY_NAME" VARCHAR2(40 BYTE),
        "REGION_ID"    NUMBER,
        CONSTRAINT "COUNTRY_C_ID_PK" PRIMARY KEY ("COUNTRY_ID") ENABLE,
        CONSTRAINT "COUNTR_REG_FK" FOREIGN KEY ("REGION_ID") REFERENCES "HR"."REGIONS" ("REGION_ID") ENABLE
      ORGANIZATION INDEX NOCOMPRESS PCTFREE 10 INITRANS 2 MAXTRANS 255 LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
      TABLESPACE "USERS" PCTTHRESHOLD 50;
    COMMENT ON COLUMN "HR"."COUNTRIES"."COUNTRY_ID"
    IS
      'Primary key of countries table.';
      COMMENT ON COLUMN "HR"."COUNTRIES"."COUNTRY_NAME"
    IS
      'Country name';
      COMMENT ON COLUMN "HR"."COUNTRIES"."REGION_ID"
    IS
      'Region ID for the country. Foreign key to region_id column in the departments table.';
      COMMENT ON TABLE "HR"."COUNTRIES"
    IS
      'country table. Contains 25 rows. References with locations table.';

  • Usage Tracking table column definition

    Hi Gurus,
    I am not able to visualize the difference / significance of these two columns in S_NQ_ACCT table for usage tracking:
    NUM_CACHE_HITS - {Indicates the number of times existing cache was returned.}
    NUM_CACHE_INSERTED - {Indicates the number of times query generated cache was returned.}
    i got NUM_CACHE_HITS which gives the number of times cache match has occured, but what is role / meaning of NUM_CACHE_INSERTED, the documentation says "Indicates the number of times query generated cache was returned" what is query generated cache?
    Thanks,
    Sri

    hi jups,
    By deafult that parameter wil be null ,but any query got cached then it updates its value this way num_cache_inserted = 1
    Will this help you Definitions of time-related fields of usage tracking data
    hope helps you.
    Cheers,
    KK

  • Changing the column definition in a view

    Dear all,
    i have a problem in view , i searched first but i couldnt find any thing.
    assume i have two tables and they have one field with type number, i want to make a view, and in this view, i want to redefine this number field as follows : number(3) .
    how it is possible in oracle?
    thank u in advance.
    best,
    Iman

    Use CAST (your_column as NUMBER(3))
    http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions023.htm#SQLRF51260

  • About Query Data Source Columns property

    Hello everyone,
    I'm new to Oracle Forms version 10.1.0.2.
    When I create a data block based on a table using Data Block Wizard, the block's Query Data Source Columns property is automatically populated with column definition entries corresponding to the columns of the base table.
    I tried making changes to these entries, for example by changing the data types to wrong data types or even deleting them, and I found that those changes had no effect on the block at all. The form was still working as I wanted.
    Please explain what is exactly the role of the block's Query Data Source Columns property.
    Thank you very much.
    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.

    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.
    IMHO those properties are very self-explaining: It is the data source of the block, or in other terms: how it is populated.
    Table means the data block is based on a table and subsequently will be populated by
    select col1, col2, col3 from your_table
    With sub-query the block will be populated with your subquery; forms will issue
    select col1, col2, col3 from (
      -- this is your subquery
      select col1, col2, col3 from tab1, tab2 where [....]
    With Procedure in short you'd have a stored procedure which returns a ref cursor and the block will be populated by the ref cursor.
    As for your question about the name: this actually should matter; the default is NULL which means that there needs to be a column which has the exact name as the item so in the above sample with table the item associated with your_table.col1 should be named col1. If it isn't the property should be named like the column. If this property also doesn't reflect the name this shouldn't work IMO.
    cheers

  • How to find default value of a column ?

    hi , alok again,
    i have to find default value of a column.
    Acutally i have found , column's max width, its nullability, precision, scale, type, but NOT default value.
    I will have to use the default value and nullability while validating user's input.
    ResultSetMetaData doesnot contain any method any such method...
    Pls help,
    how can i do so.
    Any idea will be highly appreciated.
    Thanks in adv.
    Alok

    Hi,
    After you get the resultset from DatabaseMetaData.getColumns() as shown by sudha_mp you can use the following columns names to retrieve metadata information:
    Each column description has the following columns:
    TABLE_CAT String => table catalog (may be null)
    TABLE_SCHEM String => table schema (may be null)
    TABLE_NAME String => table name
    COLUMN_NAME String => column name
    DATA_TYPE int => SQL type from java.sql.Types
    TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
    COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
    BUFFER_LENGTH is not used.
    DECIMAL_DIGITS int => the number of fractional digits
    NUM_PREC_RADIX int => Radix (typically either 10 or 2)
    NULLABLE int => is NULL allowed.
    columnNoNulls - might not allow NULL values
    columnNullable - definitely allows NULL values
    columnNullableUnknown - nullability unknown
    REMARKS String => comment describing column (may be null)
    COLUMN_DEF String => default value (may be null)
    SQL_DATA_TYPE int => unused
    SQL_DATETIME_SUB int => unused
    CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
    ORDINAL_POSITION int => index of column in table (starting at 1)
    IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
    SCOPE_CATLOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
    SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
    SCOPE_TABLE String => table name that this the scope of a reference attribure (null if the DATA_TYPE isn't REF)
    SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
    Regards,
    bazooka

  • Linking report column to open a webpage

    Hi All,
    Need a sincere help. I have a table TAB_ARC. In which i have columns
    ID
    PART_NUM
    LINK_TO_PART_NUM (Its a hyperlink)
    I have made report and form on same. I am inserting PART_NUM and LINK_TO_PART_NUM (which is a web link respective to the PART_NUM) in the from which is updating my TAB_ARC table.
    In the report i am having ID and PART_NUM displaying. I want to link the PART_NUM with my LINK_TO_PART_NUM so that whenever i click the any PART_NUM it opens a new page with the link of LINK_TO_PART_NUM
    Hope to get reply from you all as it is urgent.
    Regards
    Edited by: User_Apex on Apr 26, 2011 2:23 AM

    As discussed in +{message:id=9543583}+, use column substitutions in the Link Text and URL properties. In the column attributes for PART_NUM, use <tt>#PART_NUM#</tt> as the Link Text and <tt>#LINK_TO_PART_NUM#</tt> as the URL. Set the LINK_TO_PART_NUM column definition Display Type to "Hidden".
    Haven't you completed the <i>2 Day + Application Express Developer's Guide</i>?

Maybe you are looking for

  • Sender File adapter Pooling

    Hi ALL, 1)while creating the file in the FTP server i want the sender file adater to wait or lock from polling the file getting created and start picking the file once its completely crated. i am told that we need to write OS commends to handle this

  • Backspace key broke, replacement? (Satellite L10)

    Cleaning my keys and the backspace key broke. Satellite L10-281 Anyone help me out on how i would go about getting a replacement? Toshiba site useless can't find a single thing.

  • Anyway to capture HD on my 2.5 dual?

    Question says it. I've been looking all over, and the only thing I found so far that actually works is the DeckLink from BlackMagic -- $995! Anyone have a better suggestion...?

  • Currency rate in purchase order

    Hi, I have a case. In standard system foreign currency rate in PO is calculated based on purchase order date. System takes last actual currency rate to calculation. I need to customize it in this way that system will take to calculation currency rate

  • Md5summing the database ends up in integrity failure

    What might cause this? I clean out the cache before i did this, I don't know if it has anything to do with it. # pacman-optimize :: Md5sum'ing the old database                                           [DONE] :: Tar'ing up /var/lib/pacman