Scan table for columns with all unqiue rows

this is the best I could do think of so far which doesnt work, I dont know how to convert the literal column name to a reference to the column
SELECT g.table_name, g.column_name
FROM all_tab_columns g
WHERE g.table_name = 'SA_AREA' and NOT EXISTS (
SELECT g2.column_name
FROM all_tab_columns g2
WHERE 1 !=
(SELECT COUNT (*)
FROM all_tab_columns g3
--i know this part is wrong for sure
WHERE g2.column_name = g3.column_name
AND g2.table_name = g3.table_name
AND g.column_name = g2.column_name
AND g.table_name = g2.table_name))
thanks for your help

Hello nwill,
I think that .. you want something like this
create table TEST_(COL1 VARCHAR2(30) not null,
                   COL2 NUMBER,
                   COL3 VARCHAR2(10));
alter table TEST_ add constraint PK_COL1 primary key (COL1);
alter table TEST_ add constraint UK_COL3 unique (COL3);
SELECT TABLE_NAME
     , COLUMN_NAME
  FROM ALL_CONS_COLUMNS
WHERE CONSTRAINT_NAME IN
       (SELECT CONSTRAINT_NAME
          FROM ALL_CONSTRAINTS
         WHERE CONSTRAINT_TYPE IN ('P', 'U')) -- (P) primary key and (U) unique
   AND TABLE_NAME IN (SELECT TABLE_NAME
                        FROM ALL_ALL_TABLES
                       WHERE OWNER = 'SCOTT')ouput
TABLE_NAME                     COLUMN_NAME
TEST_                          COL3
TEST_                          COL1Hope this helps
Christian Balz

Similar Messages

  • MS SQL - Add column with all rows being "0"

    Add column with all rows being "0"

    nevermind
    "lee" <[email protected]> wrote in message
    news:e3b5kt$mch$[email protected]..
    > Add column with all rows being "0"
    >
    >
    >

  • Why does my scanned docs. come out with all colored lines on it after going thru the top feed try?

    why does my scanned docs. come out with all colored lines on it after going thru the top feed try?

    hi there,
    could you provide the community with a little more information to help narrow troubleshooting? Things like your printer model and your operating system help out a lot.
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Excel 2007 to Sql server table. Column with more than 255 characters.

    Hi there,
    I am facing a problem while converting data from Excel 2007 to SQL server 2005 table. I am using BIDS 2005.I have an excel file where one particular column has more than 255 characters. I use OLEDB connection for excel file as there is no driver for Excel
    2007 in BIDS2005. I am using Microsoft Office 12.0 Access Database Engine OLE DB Provider for Excel file.
    Next, I changed advanced properties for the column to DT_NTEXT. But when I am getting errors on execution. They are:
    [OLE DB Source [1949]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
    [OLE DB Source [1949]] Error: Failed to retrieve long data for column "action".
    [OLE DB Source [1949]] Error: There was an error with output column "action" (2046) on output "OLE DB Source Output" (1959). The column status returned was: "DBSTATUS_UNAVAILABLE".
    [OLE DB Source [1949]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "action" (2046)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "action"
    (2046)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    Please advise on how can I deal with columns having more than 255 characters in Excel file.
    Thanks!

    Here is what your connection string should look like for excel source
    Provider
    =Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\temp\test.xls;Extended
    Properties="EXCEL 8.0;HDR=YES";
    http://sqlworkday.blogspot.com/

  • Best method to update database table for 3 to 4 million rows

    Hi All,
    I have 3 to 4 million rows are there in my excel file and we have to load to Z-Table.
    The intent is to load and keep 18 months of history in this table. 
    so what should be best way for huge volume of data to Z-Table from excel file.
    If is from the program, is that the best way use the FM 'GUI_DOWNLOAD' and down load those entries into the internal table and directly do as below
    INSERT Z_TABLE from IT_DOWNLOAD.
    I think for the huge amount of data it goes to dump.
    please suggest me the best possible way or any psudo code  to insert those huge entries into that Z_TABLE.
    Thanks in advance..

    Hi,
    You get the dump because of uploading that much records into itnernal table from excel file...
    in this case, do the follwowing.
    data : w_int type i,
             w_int1 type i value 1.
    data itab type standard table of ALSMEX_TABLINE with header line.
    do.
       refresh itab.
       w_int = w_int1..
       w_int1 = w_int + 25000.
       CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = <filename>
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = w_int
        I_END_COL                     = 10
        I_END_ROW                     = w_int1
      TABLES
        INTERN                        = itab
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 2
    *   OTHERS                        = 3
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if itab is not initial.
    write logic to segregate the data from itab to the main internal table and then
    insert records from the main internal table to database table.
    else.
    exit.
    endif.
    enddo.
    Regards,
    Siddarth

  • Pivoting table results so YearIDs become columns with all other data underneath them

    The table above has all the data I need for my report, however, I need to pivot the table so that each YearID (based upon corresponding fkYear) is a separate column and the rest of the data in each row appears under the appropriate Year ID.  I'm trying
    to pivot the table but I'm stuck on exactly how to do it.
    RandyHJ1957

    Ok, here is what I have so far as a PIVOT using a CTE
    WITH ActiveAccountCodes AS
    SELECT BWfkYear, BWYearID, BWFund, BWMajorObject, BWObject, BWObjectDescr, BWAmount, BWDescr FROM @TmpProposedAccountCodes
    UNION
    SELECT BWfkYear, BWYearID, BWFund, BWMajorObject, BWObject, BWObjectDescr, BWAmount, BWDescr FROM @TmpCurrentAccountCodes
    UNION
    SELECT BWfkYear, BWYearID, BWFund, BWMajorObject, BWObject, BWObjectDescr, BWAmount, BWDescr FROM @TmpBudget1AccountCodes
    UNION
    SELECT BWfkYear, BWYearID, BWFund, BWMajorObject, BWObject, BWObjectDescr, BWAmount, BWDescr FROM @TmpBudget2AccountCodes
    UNION
    SELECT BWfkYear, BWYearID, BWFund, BWMajorObject, BWObject, BWObjectDescr, BWAmount, BWDescr FROM @TmpBudget3AccountCodes
    SELECT BWObject, BWObjectDescr, Proposed, Current, Actual1, Actual2, Actual3, BWDescr
    FROM ActiveAccountCodes
    PIVOT(SUM(BWAmount) FOR BWYearID IN ([SELECT BWYearID FROM @TmpProposedAccountCodes AS [Proposed]], [SELECT BWYearID FROM @TmpCurrentAccountCodes AS [Current]],
    [SELECT BWYearID FROM @TmpBudget1AccountCodes AS Actual1],
    [SELECT BWYearID FROM @TmpBudget2AccountCodes AS Actual2],
    [SELECT BWYearID FROM @TmpBudget3AccountCodes AS Actual3] )) AS PVT
    The error I am getting now is where I attempt to define the Proposed and Current column headings using a select statement to get the right YearID for the right year.  I get a red line under Proposed and Current in the main query above the PIVOT expression
    RandyHJ1957

  • Search for column in all tables

    I want to search for a column value(example instance_id=123456) in all the tables using one query rather than describing each table to find first if instance id exist and if so do a select from that table.

    You could try some sort of variation of this:
    DECLARE
       value_of_interest    NUMBER := 12345;
       vTable          ALL_TAB_COLS.TABLE_NAME%TYPE;
       vExist          ALL_TAB_COLS.COLUMN_NAME%TYPE;
    BEGIN
       DBMS_OUTPUT.PUT_LINE(RPAD('TABLE',45,' ') || ' ' || 'EXISTS');
       FOR rec in (SELECT TABLE_NAME FROM ALL_TAB_COLS WHERE COLUMN_NAME='INSTANCE_ID')
               LOOP
                       EXECUTE IMMEDIATE 'SELECT ''' || rec.table_name || ''' AS TAB,DECODE(count(*),0,''NO'',''YES'') AS EXIST FROM '
                               ||  rec.table_name
                               || ' WHERE INSTANCE_ID=:value '
                               || 'GROUP BY ''' || rec.table_name || '''' INTO vTable,vExist USING value_of_interest;
                       DBMS_OUTPUT.PUT_LINE(RPAD(vTable,45,' ') || ' ' || vExist);
               END LOOP;
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
               DBMS_OUTPUT.PUT_LINE('No Results found!');
    END;Please be aware this that has not been tested, and may have to be modified for your use.

  • ALV Table: DROPDOWN-Column with different valuesets per row

    Hello,
    I tried to create a dropdown by index cell in a table with different valuesets in each row. So I created an attribute VALUESET of type WDR_CONTEXT_ATTR_VALUE_LIST in my node to provide different valuesets per element. In my ALV-table I bound the property "valueset_fieldname" of the dropdown-cell to the context-attribute VALUESET:
      lo_column = lo_alv_model>if_salv_wd_column_settings~get_column( id = 'PRICE').
      CREATE OBJECT lo_drop_down_idx
        EXPORTING
          selected_key_fieldname = u2018PRICEu2019.
      lo_drop_down_idx->set_valueset_fieldname( value = u2018VALUESETu2019 ).
      lo_column->set_cell_editor( lo_drop_down_idx ).
    Now I have the problem, that the list of the dropdown-cell displays the proper amount of values but not the proper texts . My valueset looks for example like this:
    Value: A
    Text:  A
    Value: B
    Text:  B
    Value: C
    Text:  C
    Value: D
    Text:  D
    But my Dropdown-cell shows these values:
    A
    A
    A
    D
    Could you please help?
    Edited by: Developer on Feb 2, 2010 5:32 PM

    Hello Lekha,
    thank you for your answer. I think there might be an other reason for this problem. When I debug the view with the Webdynpro-Debugger the valueset in the context contains the correct values but the dropdown shows wrong values.
    You also sent me a link with a codesample. In this coding you use the following statement:
    lr_drp_idx->set_texts( 'VALUESET'   ). This is a method of the class CL_WD_DROPDOWN_BY_IDX. I used the class cl_salv_wd_uie_dropdown_by_idx as I'm working with an ALV-Table. This class doesn't have the method set_texts. Instead it has a method called 'set_valueset_fieldname'. Maybe this method has a bug?
    Regards,

  • Finding Updated Columns with Values in Rows

    Hello,
    I have a one requierment as below.
    if I have Table ITEM with Below records
    ParcelID 
    ItemCode
    CurrentLocation
    Destination
    UpdatingTime
    1010         
    GLS
    ABC
    XYZ
    01-12-14
    1015         
    PHM
    SSS
    ZZZ
    01-12-14
    If any of the column value is updated it will replicate to ITEMUPDATE table with old row and new row as well.
    Suppose for ParcelID 1010 CurrentLocation Changed from ABC to CDE it will store in ITEMUPDATE table with both records
    old and new and if ParcelID 1015 CurrentLocation Changed from SSS to KKK it will also store as below.
    Now ITEMUPDATE table will have all records old as well as new rows as below.
    ParcelID
    ItemCode
    CurrentLocation
    Destination
    UpdatingTime
    1010      
    GLS
    ABC
    XYZ
    01-12-14
    1010      
    GLS
    CDE
    XYZ
    02-12-14
    1015      
    PHM
    SSS
    ZZZ
    01-12-14
    1015      
    PHM
    KKK
    ZZZ
    01-12-14
    Like this any column can update not only CurrentLocation.
    Now the requirement is I want to know which columns is updated and what is the new value.
    Some what results need to look like below.
    ParcelID
    Old_CurrentLocation
    New_CurrentLocation
    1010     
    ABC
    CDE
    1015     
    SSS
    KKK
    Please Anyone Can help me on this .
    Thank You,
    Avis

    Hello Avis,
    You need to store date and time in 'UpdatingTime' column in both ITEM and ITEMUPDATE tables.
    If you store only date, you will not get desired results as there may be multiple records for a 'ParcelID' in the same date in ITEMUPDATE table. It is difficult to get the latest record from multiple records with same dates for a 'ParcelID' from ITEMUPDATE.
    Alternatively you can create a surrogate key   , like 'ItemUpdateID', in ITEMUPDATE from which we can get the latest record for a 'ParcelID'. The surrogate key can be a integer identity column so that automatically incremented and updated for each insert
    in ITEMUPDATE. Then it is easy to get latest UpdatingTime for a ParcelID from ITEMUPDATE  table.
    If the table design and data is something as below:
    ITEM table
    ParcelID    ItemCode    CurrentLocation    Destination    UpdatingTime
    1010         GLS                ABC                     XYZ              
    2014-01-12
    1011         MMX               ABD                     XVB  
                2014-01-12
    1015        PHM                SSS                     ZZZ               
    2014-01-12
    ITEMUPDATE table
    ItemUpdateID    ParcelID    ItemCode    CurrentLocation    Destination    UpdatingTime
    1                         1010         GLS                
    ABC                     XYZ          2014-01-12
    2                         1015         PHM                SSS             
            ZZZ          2014-01-12
    3                         1015         PHM               
    KKK                      ZZZ          2014-02-12
    4                         1010         GLS                
    CDE                      XYZ          2014-02-12
    5                         1011         MMX               
    ABD                      YYY           2014-01-12
    Here 'ItemUpdateID' is identity column.
    The SELECT query can be written as below:
    SELECT A.ParcelID, A.ItemCode,
    B.CurrentLocation 'New_Location',
    ISNULL((SELECT CurrentLocation FROM ItemUpdate WHERE ItemUpdateID = (SELECT MAX(D.ItemUpdateID)
    FROM ItemUpdate D WHERE D.ItemUpdateID < B.ItemUpdateID AND D.ParcelID = B.ParcelID)), A.CurrentLocation) 'Old_Location'
    FROM Item A
    LEFT JOIN ItemUpdate B On B.ParcelID = A.ParcelID
    AND B.ItemUpdateID = (SELECT MAX(ItemUpdateID) FROM ItemUpdate C WHERE C.ParcelID = B.ParcelID)
    The result will be as follows:
    ParcelID    ItemCode    New_Location    Old_Location
    1010          GLS              CDE                   ABC
    1011          MMX             ABD                    ABD
    1015          PHM             KKK                     SSS

  • Export rows with all dependent rows

    Hello everyone!
    I have a rather complex database schema with a lot of parent-child-relationships. On demand, I want to export a single row identified by its primary key from a table 'TABLE_A' to another Oracle database which has got the same schema but is located on a different host.
    The problem here is that I'd like to "automatically" locate all of the dependent objects (foreign key relationships in 'TABLE_A') so that those rows get exported as well!
    Is sth like this possible using just database features?
    Thanks for hints!

    Well, you might find some script to locate all foreign keys and modify it to just output the tablenames, and all the other stuff for a proper parfile. A quick look at myoracle found Note:16414.1, haven't tried it personally.
    To see the "correct" way to do it these days, google on the following terms:
    dbms_metadata ref_constraint

  • CRM Open Interface Tables for Integrating with CRM

    HI all, We are evaluating integration with CRM from Telco Billing system. The TRMs of CRM talk about using some published open Interface table in CRM. I could not find any TRM or User manual where I can get this info.
    Also need to know API for CRM for intregation. PL. reply to [email protected] . Thanks - Pradip

    I think you also need V14496-01 Part 1 of 2 and V14496-01 Part 2 of 2 (English Language Extension Packs).
    Installation is explained in the Bookshelf: V29095-01

  • Incorrect data_length for columns with char semantics in 10g

    Hi,
    I was going through a few databases at my work place and I noticed something unusual.
    Database Server - Oracle 10g R2
    Database Client - Oracle 11g R1 (11.1.0.6.0 EE)
    Client OS - Win XP
    SQL>
    SQL> @ver
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    5 rows selected.
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                      Null?    Type
    A                                                  CHAR(3 CHAR)
    B                                                  CHAR(3)
    C                                                  CHAR(3 CHAR)      <= why does it show "CHAR" ? isn't "BYTE" semantics the default i.e. CHAR(3) = CHAR(3 BYTE) ?
    D                                                  VARCHAR2(3 CHAR)
    E                                                  VARCHAR2(3)
    F                                                  VARCHAR2(3 CHAR)  <= same here; this should be VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME   COLUMN_NAME  DATA_TYPE  DATA_LENGTH DATA_PRECISION DATA_SCALE
    T            A            CHAR                12                               <= why 12 and not 3 ? why multiply by 4 ?
    T            B            CHAR                 3
    T            C            CHAR                12                               <= same here
    T            D            VARCHAR2            12                               <= and here
    T            E            VARCHAR2             3
    T            F            VARCHAR2            12                               <= and here
    6 rows selected.
    SQL>
    SQL>I believe it multiplies the size by 4, because it shows 16 in user_tab_columns when the size is changed to 4.
    When I try this on 11g R1 server, it looks good -
    Database Server - Oracle 11g R1
    Database Client - Oracle 11g R1 (11.1.0.6.0 EE)
    Client OS - Win XP
    SQL>
    SQL> @ver
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                      Null?    Type
    A                                                  CHAR(3 CHAR)
    B                                                  CHAR(3)
    C                                                  CHAR(3)
    D                                                  VARCHAR2(3 CHAR)
    E                                                  VARCHAR2(3)
    F                                                  VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME   COLUMN_NAME  DATA_TYPE    DATA_LENGTH DATA_PRECISION DATA_SCALE
    T            A            CHAR                   3
    T            B            CHAR                   3
    T            C            CHAR                   3
    T            D            VARCHAR2               3
    T            E            VARCHAR2               3
    T            F            VARCHAR2               3
    6 rows selected.
    SQL>
    SQL>Is it a known bug ? Unfortunately, I do not have access to Metalink.
    Thanks,
    isotope
    Edited by: isotope on Mar 3, 2010 6:46 AM

    Anurag Tibrewal wrote:
    It is just because you have different NLS_LENGTH_SEMANTICS in v$nls_parameter for both the database. It is BYTE in R10 and CHAR in R11.
    I cannot query v$nls_parameter in the 10g database. I tried this testcase with the ALTER SESSION and checking with nls_session_parameter in both 10g and 11g. The client is 11g in each case.
    The DESCRIBE table looks ok, but the user_tab_column shows size*4.
    Testcase -
    cl scr
    select * from v$version;
    -- Try CHAR semantics
    alter session set nls_length_semantics=char;
    select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    drop table t;
    create table t (
      a    char(3 char),
      b    char(3 byte),
      c    char(3),
      d    varchar2(3 char),
      e    varchar2(3 byte),
      f    varchar2(3)
    desc t
    select table_name,
           column_name,
           data_type,
           data_length,
           data_precision,
           data_scale
      from user_tab_columns
    where table_name = 'T';
    -- Try BYTE semantics
    alter session set nls_length_semantics=byte;
    select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    drop table t;
    create table t (
      a    char(3 char),
      b    char(3 byte),
      c    char(3),
      d    varchar2(3 char),
      e    varchar2(3 byte),
      f    varchar2(3)
    desc t
    select table_name,
           column_name,
           data_type,
           data_length,
           data_precision,
           data_scale
      from user_tab_columns
    where table_name = 'T';In 10g R2 server -
    SQL>
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    SQL> -- Try CHAR semantics
    SQL> alter session set nls_length_semantics=char;
    Session altered.
    SQL> select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    PARAMETER            VALUE
    NLS_LENGTH_SEMANTICS CHAR
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                            Null?    Type
    A                                                        CHAR(3)
    B                                                        CHAR(3 BYTE)
    C                                                        CHAR(3)
    D                                                        VARCHAR2(3)
    E                                                        VARCHAR2(3 BYTE)
    F                                                        VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME        COLUMN_NAME  DATA_TYPE    DATA_LENGTH DATA_PRECISION DATA_SCALE
    T                 A            CHAR                  12      <==
    T                 B            CHAR                   3
    T                 C            CHAR                  12      <==
    T                 D            VARCHAR2              12      <==
    T                 E            VARCHAR2               3
    T                 F            VARCHAR2              12      <==
    6 rows selected.
    SQL>
    SQL> -- Try BYTE semantics
    SQL> alter session set nls_length_semantics=byte;
    Session altered.
    SQL> select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    PARAMETER            VALUE
    NLS_LENGTH_SEMANTICS BYTE
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                            Null?    Type
    A                                                        CHAR(3 CHAR)
    B                                                        CHAR(3)
    C                                                        CHAR(3)
    D                                                        VARCHAR2(3 CHAR)
    E                                                        VARCHAR2(3)
    F                                                        VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME        COLUMN_NAME  DATA_TYPE    DATA_LENGTH DATA_PRECISION DATA_SCALE
    T                 A            CHAR                  12    <==
    T                 B            CHAR                   3
    T                 C            CHAR                   3
    T                 D            VARCHAR2              12   <==
    T                 E            VARCHAR2               3
    T                 F            VARCHAR2               3
    6 rows selected.
    SQL>
    SQL>In 11g R1 server -
    SQL>
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL>
    SQL> -- Try CHAR semantics
    SQL> alter session set nls_length_semantics=char;
    Session altered.
    SQL> select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    PARAMETER                      VALUE
    NLS_LENGTH_SEMANTICS           CHAR
    1 row selected.
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                      Null?    Type
    A                                                  CHAR(3)
    B                                                  CHAR(3 BYTE)
    C                                                  CHAR(3)
    D                                                  VARCHAR2(3)
    E                                                  VARCHAR2(3 BYTE)
    F                                                  VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME   COLUMN_NAME  DATA_TYPE    DATA_LENGTH DATA_PRECISION DATA_SCALE
    T            A            CHAR                   3
    T            B            CHAR                   3
    T            C            CHAR                   3
    T            D            VARCHAR2               3
    T            E            VARCHAR2               3
    T            F            VARCHAR2               3
    6 rows selected.
    SQL>
    SQL> -- Try BYTE semantics
    SQL> alter session set nls_length_semantics=byte;
    Session altered.
    SQL> select * from nls_session_parameters where parameter = 'NLS_LENGTH_SEMANTICS';
    PARAMETER                      VALUE
    NLS_LENGTH_SEMANTICS           BYTE
    1 row selected.
    SQL> --
    SQL> drop table t;
    Table dropped.
    SQL> create table t (
      2    a    char(3 char),
      3    b    char(3 byte),
      4    c    char(3),
      5    d    varchar2(3 char),
      6    e    varchar2(3 byte),
      7    f    varchar2(3)
      8  );
    Table created.
    SQL> --
    SQL> desc t
    Name                                      Null?    Type
    A                                                  CHAR(3 CHAR)
    B                                                  CHAR(3)
    C                                                  CHAR(3)
    D                                                  VARCHAR2(3 CHAR)
    E                                                  VARCHAR2(3)
    F                                                  VARCHAR2(3)
    SQL> --
    SQL> select table_name,
      2         column_name,
      3         data_type,
      4         data_length,
      5         data_precision,
      6         data_scale
      7    from user_tab_columns
      8   where table_name = 'T';
    TABLE_NAME   COLUMN_NAME  DATA_TYPE    DATA_LENGTH DATA_PRECISION DATA_SCALE
    T            A            CHAR                   3
    T            B            CHAR                   3
    T            C            CHAR                   3
    T            D            VARCHAR2               3
    T            E            VARCHAR2               3
    T            F            VARCHAR2               3
    6 rows selected.
    SQL>
    SQL>isotope

  • Setting up a remote with ir-tables for use with XBMC

    My main goal is to use a remote with xbmc, but I'm having issues.
    Issue #1 (main problem): The directional keys and enter will work but no other keys seem to register.
    Issue #2: Even the keys that work have this weird usage issue, where pressing any of the same key twice loses the second key press. For example clicking up arrow 4 times results in only two actual "up's" being done. (first up works, second fails, third works, forth fails, etc)
    I've spent about four hours getting to this point and there is a lot of conflicting information out there on this subject which has had me very confused, but at this point I assume I can ignore any mention of Lirc as it seems like its not needed and if ir-keytable is used correctly things should just work?
    Quote from www.lirc.org: "Recent linux kernels make it possible to use some IR remote controls as regular input devices"
    What I have got/done:
    Machine: Zotac Zbox Nano AD10 with remote.
    Linux: Manjaro Openbox Addition
    Testing in applications: XBMC, Leafpad, Terminal
    [david@zotac ~]$ dmesg | grep CIR
    [    4.444693] ite_cir: Auto-detected model: ITE8704 CIR transceiver
    [    4.444701] ite_cir: Using model: ITE8704 CIR transceiver
    [    4.478490] input: ITE8704 CIR transceiver as /devices/virtual/rc/rc0/input8
    [    4.478531] rc0: ITE8704 CIR transceiver as /devices/virtual/rc/rc0
    [david@zotac ~]$ ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event6) with:
            Driver ite-cir, table rc-rc6-mce
            Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
            Enabled protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
            Name: ITE8704 CIR transceiver
            bus: 25, vendor/product: 1283:0000, version: 0x0000
            Repeat delay = 500 ms, repeat period = 500 ms
    #My keymaps file contains (I just put the keys that I would like to use with xmbc)
    0x8034045b KEY_RIGHT
    0x8034045a KEY_LEFT
    0x8034045c KEY_ENTER
    0x80348459 KEY_DOWN
    0x80340458 KEY_UP
    0x80348421 KEY_R
    0x80340420 KEY_F
    0x80348410 KEY_EQUAL
    0x80348483 KEY_ESC
    0x80348431 KEY_X
    0x8034842f KEY_T
    0x803404cb KEY_I
    0x8034845d KEY_M
    0x8034042c KEY_P
    0x80340411 KEY_MINUS
    I write my keymaps file: (I think /etc/keymaps/[file] would be a better location for this file but it shouldn't matter is that correct?)
    ir-keytable -c -w /home/david/Documents/keymaps --device=/dev/input/event6 --period=500 --delay=500
    I can verify the settings are registered:
    [david@zotac ~]$ ir-keytable --read --device=/dev/input/event6
    scancode 0x80340411 = KEY_MINUS (0x0c)
    scancode 0x80340420 = KEY_F (0x21)
    scancode 0x8034042c = KEY_P (0x19)
    scancode 0x80340458 = KEY_UP (0x67)
    scancode 0x8034045a = KEY_LEFT (0x69)
    scancode 0x8034045b = KEY_RIGHT (0x6a)
    scancode 0x8034045c = KEY_ENTER (0x1c)
    scancode 0x803404cb = KEY_I (0x17)
    scancode 0x80348410 = KEY_EQUAL (0x0d)
    scancode 0x80348421 = KEY_R (0x13)
    scancode 0x8034842f = KEY_T (0x14)
    scancode 0x80348431 = KEY_X (0x2d)
    scancode 0x80348459 = KEY_DOWN (0x6c)
    scancode 0x8034845d = KEY_M (0x32)
    scancode 0x80348483 = KEY_ESC (0x01)
    At this point is seems like everything is setup correctly but like I said only the direction keys and return work. If it did work my next step would be determining when to issue the ir-keytable write, and I'm assuming I can just do that in openbox's autostart file?
    Does anyone have any ideas as to what I might do to correct these issues?

    I also encountered davevallance's issue #1.  Directional and enter keys already work, as do volume keys.  If any other button is mapped to those working keys (using ir-keytable) then they also work, for example I can successfully map the useless "teletext" to "enter" and it produces a linefeed when pressed but I cannot get it to do the same with "space".  Interestingly it does produce a space keypress in a virtual terminal (Ctrl+Alt+F3), also "ir-keytable -t" shows the correct key event which proves the underlying OS is recognising the mapping.  The issue is somewhere in the X system instead.
    I refer now to HID Remotes which covers the situation well.  It explains that X does not process keycodes above 255 and at first that would seem to fit here.  All the keys which work (arrows, enter, volume) have keycodes less than 255.  So why don't other 'safe' keycodes work too?
    Xorg has it's own keycode map with "xmodmap" but I don't think that is responsible in this case.  From the Arch wiki it suggests exploring with:
    xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
    Unmapped keys should produce a "NoSymbol" message but for my non-working keys there is no response at all in X.  Is there another layer between kernal and GUI?

  • Table for finding out all the G/L accounts of a financial statement version

    Hi all,
      is there any table to find out the G/L accounts which will come under the tree of financial statement version(OB58). Please help.

    With FM FI_IMPORT_BALANCE_SHEET_POS, you will get the account list in the internal table I011Z.
    You will get a list of intervals  I011Z-VONKT -  I011Z-BILKT.

Maybe you are looking for

  • Why need do close posting period

    Hi, All, Why we need to close posting period, then we can do goods receipt? What means MMPV? What's the different material posting period and financial posting period? Thanks,

  • Bug? 4.0 EA1 Can't select all in Script Output window

    This seems to be a small bug. Open a worksheet and enter any query. Run as a script (F5) and the output appears in the Script Output window. Click in the Script Output window to give it focus and type Ctrl-A to select all the output. The text selecte

  • OSB to MQ, using Foreign Server

    Hi All,            I am working on OSB to MQ connectivity, using Foreign Server. I was able to establish the connectivity using Sun JDK 1.6. However when I JRockit 1.6 is used, connectivity is not working. There are stuck threads in Weblogic, when we

  • "requires unreachable" warning emitted when using static variables and the singleton pattern

    I'm implementing code contracts on an existing code base and I've come across this situation in a few places. Wherever we have additional logic with code contracts where a singleton instance is instantiated, all code contracts emit a "reference use u

  • Feature Request: Auto-Synchronize Folders

    Hi It is a hell of a palaver to synchronize a folder within LR when a new image is added. You have to go through the whole import dialog thing and then navigate back to the folder you want. Would love a more streamlined process, preferably in which L