SQL help - Need help to rotate the columns to rows

I have a HughesNet to divide the columns into multiple lines. For example:

EMP_DEPT

ROWID empid1 ename1 empid2 ename2 empid2 ename2 empid4 ename4 dept4 dep3 dep2 dept1
100001 1 'SCOTT' 10 2 'DAVE' 20 3 10 4 20 SMITH "MILLER"
100002 1 'SCOTT' 10 2 'DAVE' 20 3 'MILLER' 20

Note: EMP_DEPT do not always have information about the 4 employees settled for example in info only 3 employees rank 2 are there

I need to convert and insert it into the EMPLOYEE table as follows:

EMPLOYEE

EmpID ename dept
1 SCOTT 10
2 20 DAVE
3 MILLER 10
4 SMITH 20

1 SCOTT 10
2 20 DAVE
3 MILLER 20

Thank you
KeV

Hey Kevin,

Here's one way:

WITH t AS (
  SELECT level i FROM dual CONNECT BY level <= 4
)
SELECT enty_type, enty_name, enty_id
FROM (
  SELECT case when mod(t.i,2) = 0 then 'DEPARTMENT'
              else 'EMPLOYEE'
         end as enty_type
       , case t.i
           when 1 then emp_name1
           when 2 then dept_name1
           when 3 then emp_name2
           when 4 then dept_name2
         end as enty_name
       , case t.i
           when 1 then emp_id1
           when 2 then dept_id1
           when 3 then emp_id2
           when 4 then dept_id2
         end as enty_id
  FROM emp
       CROSS JOIN t
)
WHERE enty_id IS NOT NULL
;

Another using the MODEL clause:

SELECT *
FROM (
  SELECT enty_id, enty_name, enty_type
  FROM emp
  MODEL
  RETURN UPDATED ROWS
  PARTITION BY (pk)
  DIMENSION BY (0 i)
  MEASURES(
     emp_id1, emp_name1
   , emp_id2, emp_name2
   , dept_id1, dept_name1
   , dept_id2, dept_name2
   , cast(null as number(10)) enty_id
   , cast(null as varchar2(200)) enty_name
   , cast(null as varchar2(30)) enty_type
  )
  RULES (
     enty_type[1] = 'EMPLOYEE' , enty_id[1] = emp_id1[0], enty_name[1] = emp_name1[0]
   , enty_type[2] = 'EMPLOYEE' , enty_id[2] = emp_id2[0], enty_name[2] = emp_name2[0]
   , enty_type[3] = 'DEPARTMENT' , enty_id[3] = dept_id1[0], enty_name[3] = dept_name1[0]
   , enty_type[4] = 'DEPARTMENT' , enty_id[4] = dept_id2[0], enty_name[4] = dept_name2[0]
  )
)
WHERE enty_id IS NOT NULL
;

Published by: odie_63 on 8 Dec. 2010 21:00

Tags: Database

Similar Questions

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

  • Need help to update the column 'TIMESTAMP '.

    Hello

    Here is my description of the table, I want to update the timestamp column, but I could not able to do, please help me with that.

    ID VARCHAR2 (4 BYTE),
    TYPE VARCHAR2 (1 BYTE),
    DATET TIMESTAMP (6).
    TYPE NUMBER

    Currently, I have value "01/05/2009 9:00:00.000000 AM" for the column DATET, now I want to update «9:00:00.000000 PM 01/05/2009» Please help me.

    Thank you.

    Hello

    Here's one way:

    UPDATE     table_x
    SET     datet     = datet + INTERVAL '12' HOUR
    WHERE     datet     = TO_TIMESTAMP ( '01/05/2009 09:00:00'
                          , 'DD/MM/YYYY HH24:MI:SS'     -- or whatever
                          );
    
  • SQL Server Oracle Migration: semantics of the column

    I'm testing a migration to SQL Server 2012 to Oracle 12 c using SQL Developer 4.0.0.13 migration Assistant. The problem that I am facing is that all the generated table creation scripts have CHARACTER semantics for character columns. I wish that the semantic bytes. As the generated tables and columns are several thousand it is not possible to manually change the semantics.

    CREATE TABLE account_dod)

    account_ID VARCHAR2 (16 CHAR) NOT NULL,

    I can't find any possibility to change the semantics when generating. Anyone know of any option that I can set so that the migration wizard will generate all of the columns in the form of BYTES?

    Thank you very much

    Hello

    If you email me, I can provide an extension changed to use unity BYTE CHAR and VARCHAR2 columns.

    My email address is my [email protected]

    Kind regards

    Dermot ONeill

    SQL development team

  • Get the name of the column of row

    All,

    In my Jdev 11.1.2 app I want to know the name of the attribute column that is modified. I am able to get the attribute name that currently use the getAttrbute() on the line (if you open the VO we see name |) Type of | Column, etc.). How can I get the name of the column?

    For example: the name of the attribute is Nom_tiers, column name can be Party_Name. I am able to do Nom_tiers but not Party_Name.

    thnks

    Published by: in the line of fire on 14 December 2011 14:13

    getEntityAttrForAttribute("attribute_name_here").getColumnName)

  • Create the help text for the column tabular APEX region

    Hi guys,.

    Please see the screen - shot below.

    I have to do two things:

    1. this "5000" value is passed in the URL, for example P_41_TOTAL_LEAD_VALUE and I want to display in the currency format, i.e. 5 000.
    If the value is 60000, it should be displayed as 60 000.

    2. I am required to display the help text for column of tabular form - expected quarterly value, how to proceed with that?

    Thanks in advance

    Arpit

    Capture.JPG

    Hi David,

    I have not tried to use the Format mask, however there is no change in the display format.

    Even I tried in a different format, nothing happens.

    Try the steps given, which will solve your problem

    1. create a hidden item I say P41_LEAD_VALUE

    Protected value: No.

    Pass the URL value on this element hidden instead of P_41_TOTAL_LEAD_VALUE.

    2 create a calculation on the point P_41_TOTAL_LEAD_VALUE

    Type: SQL Expression

    Point calculation: after region (s)

    Calculation: TO_CHAR (: P41_LEAD_VALUE, '999G999G999G999G999G999G990')

    Hope this helps you,

    Kind regards

    Jitendra

  • SQL Help: Derive from 'News' columns based on condition

    Hi all

    Can someone help me with this please? I am trying to achieve in a SQL (no), if this can be done in two different stages, even that is fine too...

    Thanks in advance,
    Chavigny
    SELECT * FROM
    (
    SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
    ) T_BATCH;
    For a "batch - id", there are several Transactions that are denoted by (cr_crncy_cd, dr_crncy_cd, recvr_cntry_cd), and the "NEW_BTCH_NM" column is basically a concatenation of 'BTCH_NM' + above 3 columns (with a ~)

    I'm trying to derive two new columns "SEQ" & "Output_Batch_name".

    The SEQ column:
    For every batch_id, the first row will be assigned by sequence.nextval.
        For all transactions within BTCH_ID, 
                       all the rows with same NEW_BTCH_NM, share the same sequence number
                        if different, then SEQ.nextval for all distinct rows
    Output_BTCH_NM:
       for a given batch_id, 
             if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) ,  
                             then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id,
            Else 
                Output_BTCH_NM = New_BTCH_NM
         END if
    EXPECTED RESULTS
    *BTCH_ID     BTCH_NM             NEW_BTCH_NM          TMPLT_ID     SEQ         Output_BTCH_NM*
    2765       payroll                payroll~EUR~EUR~DE     1234         1          payroll~EUR~EUR~DE
    2765       payroll                payroll~GBP~GBP~GB     1237         2          payroll~GBP~GBP~GB
    2765       payroll                payroll~USD~USD~US     1235         3          payroll~USD~USD~US
    2765       payroll                payroll~USD~USD~US     1236         3          payroll~USD~USD~US
    
    2766       SALARY                SALARY~USD~USD~US     1238         4          SALARY
    2766       SALARY                SALARY~USD~USD~US     1239         4          SALARY
    Published by: user10711957 on 25 Sep, 2010 16:37

    An extension of the solution of the (slightly modified) jiq

    function my_sequence(whichval in varchar2) return number is
    begin
      if whichval = 'currval' then
        return your_sequence.currval;
      else
        return your_sequence.nextval;
      end if;
    end my_sequence;
    
    WITH t AS
    (
    SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
    UNION
    SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
    UNION
    SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
    )
    select btch_id,btch_nm,new_btch_nm,tmplt_id,
           case when lag(seq,1) over (order by tmplt_id) = seq
                then my_sequence('currval')
                else my_sequence('nextval')
           end seq,
           out_btch_nm
    select btch_id,btch_nm,new_btch_nm,tmplt_id,
           dense_rank() over(partition by btch_id order by new_btch_nm) seq
           case when count(distinct new_btch_nm) over (partition by btch_id) = 1
                then btch_nm
                else new_btch_nm
           end out_btch_nm
      from t
    

    Concerning

    Etbin

    Posted before you see the following

    the sequence # must be continuous, must avoid any shortfall or gaps with the numbering.

    the foregoing must be the only user of its own sequence somehow and maybe...
    Search for "sequence free gap"... http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4343369880986
    Edited by: Etbin on 26.9.2010 08:21

  • Help in the data in the column of row data conversion

    Hi Oracle experts

    I have an output of the table that need to reformat. I want the output to be in an as columns show the OUTPUT REQUIRED article I know someone might have fact/accomplished before too, I tried in the open but could not find one.

    I would be grateful if someone answer this question or guide me how to start or direct me to the thread where this type of question is Huckleberry. I tried to do the rotation but could not get the success.

    Thank you

    Rajesh


    INPUT DATA

    YEAR OF THE SSN
    A1111111 2001
    A1111111 2002
    A1111111 2003
    A1111111 2004
    A1111111 2005
    B2222222 2005
    B2222222 2007
    B2222222 2008
    C3333333 2005
    C3333333 2006

    The REQUIRED POWER

    A1111111 (2001,2002,2003,2004,2005)
    B2222222 (2005,2007,2008)
    C3333333 (2005, 2006)

    Maybe this,.

    SQL> With t As
      2  (
      3  SELECT 'A1111111' SSN, 2001 "YEAR" From Dual Union All
      4  SELECT 'A1111111' SSN, 2002 "YEAR" From Dual Union All
      5  SELECT 'A1111111' SSN, 2003 "YEAR" From Dual Union All
      6  SELECT 'A1111111' SSN, 2004 "YEAR" From Dual Union All
      7  SELECT 'A1111111' SSN, 2005 "YEAR" From Dual Union All
      8  SELECT 'B2222222' SSN, 2005 "YEAR" From Dual Union All
      9  SELECT 'B2222222' SSN, 2007 "YEAR" From Dual Union All
     10  SELECT 'B2222222' SSN, 2008 "YEAR" From Dual Union All
     11  SELECT 'C3333333' SSN, 2005 "YEAR" From Dual Union All
     12  SELECT 'C3333333' SSN, 2006 "YEAR" From Dual
     13  )
     14  SELECT SSN
     15       , '(' || Rtrim(xmlagg(xmlelement(y,"YEAR" || ',').Extract('//text()')),',') || ')' "YEAR"
     16    FROM t
     17   Group BY SSN;
    
    SSN      YEAR
    -------- --------------------------------------------------------------------------------
    A1111111 (2001,2002,2003,2005,2004)
    B2222222 (2005,2007,2008)
    C3333333 (2005,2006)
    

    Kind regards
    Christian Balz

  • Help - lines of the columns in the query

    I have table-
    CREATE TABLE group_device
    (group_id NUMBER (8) NON NULL
    member_id NUMBER (4) NOT NULL
    device_id NUMBER (10) NOT NULL
    , install_date DATE NOT NULL
    remove_date DATE
    );

    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 1, 123, TO_DATE (May 23, 2012 "," mm/dd/yyyy"), TO_DATE (May 28, 2012","mm/dd/yyyy"));
    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 1, 456, TO_DATE (May 28, 2012 "," mm/dd/yyyy"), TO_DATE (June 1, 2012","mm/dd/yyyy"));
    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 1, 789, TO_DATE (June 1, 2012 "," mm/dd/yyyy"), null);

    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 2, 999, TO_DATE (May 4, 2012 "," mm/dd/yyyy"), TO_DATE (May 17, 2012","mm/dd/yyyy"));

    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 4, 1123, TO_DATE (January 22, 2012 "," mm/dd/yyyy"), TO_DATE (January 27, 2012","mm/dd/yyyy"));
    INSERT INTO group_device (group_id, member_id, device_id, install_date, remove_date) VALUES (10, 4, 1456, TO_DATE (January 27, 2012 "," mm/dd/yyyy"), TO_DATE (January 28, 2012","mm/dd/yyyy"));
    commit;

    Select * from group_device;

    Current output does look like in below
    10 1 123 23 MAY 12 28 MAY 12
    10 1 456 28 MAY 12 1ST JUNE 12
    10 1 789 1 JUNE 12
    10 2 999 4 MAY 12 MAY 17, 12
    10 4 1123 22 JANUARY 12 JANUARY 27, 12
    10 4 1456 27 JANUARY 12 28 JANUARY 12



    Device_id - Replaced_device_id - remove_date: for group_id = 10

    for example, if member_id = 1, device_id = 123A replaced by device_id = 456 on 28 May 12
    DEVICE_ID = 456 was replaced by device_id = 789 on June 1, 12


    If the output should look like this

    10 123 456 28 May 12 - replaced
    10 456 789 1 June 12 - replaced
    10 789 - active


    Similarly there are many groups, so it should list group_id based on

    Thank you

    That match your desired output?

    select a.group_id, a.device_id, a.rep_device_id, a.rep_date, decode(NVL(a.rep_device_id, -1), -1, 'ACTIVE', 'REPLACED') rep_active
      from (
              select group_id, device_id, lead(device_id) over (partition by member_id order by install_date) rep_device_id,
                     lead(install_date) over (partition by member_id order by install_date) rep_date
                from group_device
           ) a;
    
    GROUP_ID  DEVICE_ID REP_DEVICE_ID REP_DATE  REP_ACTIVE
    -------- ---------- ------------- --------- ----------
          10        123           456 28-MAY-12 REPLACED
          10        456           789 01-JUN-12 REPLACED
          10        789                         ACTIVE
          10        999                         ACTIVE
          10       1123          1456 27-JAN-12 REPLACED
          10       1456                         ACTIVE     
    
     6 rows selected 
    

    Oracle 11g is not a version. Therefore, please do not forget to post the output of

    select * from v$version;
    
  • Need logic to update the column in a Varchar table

    Hello

    Could you tell me logic below.

    I have a xx_dbc of the table where one of the Attribute1 column is varchar2 (240).

    Attribute1 has values such as

    ==================

    (AIN, PUP, GRI, NINE)

    (AIN, PUP)

    (AIN)

    (GRI, NINE)

    I have to update this column for each record with values AIN = 10, PUP = 20, GRI = 30, NINE = 40

    Columns must be updated as below

    (10,20,30,40)

    (10.20)

    (10)

    (30, 40)

    Thank you.

    Hello

    Here's one way:

    WITH the replacements AS a

    (

    SELECT "AIN" AS old_str, '10' AS new_str FROM dual UNION ALL

    SELECT 'PUP', '20' FROM dual UNION ALL

    SELECT 'GRI', '30' FROM dual UNION ALL

    SELECT 'NEW', '40' DOUBLE

    )

    normalized_data AS

    (

    SELECT p_key

    LEVEL AS sort_key

    REGEXP_SUBSTR (attribut1,

    , '[^(,)]+'

    1

    LEVEL

    ) AS str

    OF xx_dbc

    -WHERE... - If you need any filtering, put it here

    CONNECT BY LEVEL<= 1="" +="" regexp_count="" (attribute1,="">

    AND PRIOR p_key = p_key

    AND PRIOR SYS_GUID () IS NOT NULL

    )

    SELECT '(' ||) LISTAGG (NVL (r.new_str, n.str)

    , ','

    ) (ORDER BY sort_key) group

    || ')' AS new_attribute1

    n.p_key - if wanted

    OF normalized_data n

    LEFT OUTER JOIN replacements r ON r.old_str = n.str

    GROUP BY n.p_key

    ORDER BY n.p_key

    ;

    Like everything else, it depends on your version of Oracle.

    In the above query, p_key can be any unique key of xx_dbc, including attribute1 or ROWID.

    Relational databases, such as Oracle, work best when each column of each row contains 1 single piece of information, not a list delimited a number of parts.  It is so fundamental to the design of the table what he called the first normal form.  Most of the work to this problem is to convert your data denormalized in first normal form, and then convert back again.  This problem, like many others, would be much simpler and more effective if your table is in first normal form.

    The above query assumes that the replacement of the chains (for example 'AIN' and '10') are not already in a table.  If they are, or they can be derived from a table, then you need not replacements subquery; Use your actual table.

  • SQL puzzler: Line rankings according to the columns

    We have a table that looks like the following:

    COL_1_RANK COL_1_VALUE COL_2_RANK COL_2_VALUE
    1AAA3HHH
    2BBB2GGG
    3CCC5JJJ
    4DDD1FFF
    5EEE4III

    We want to extract a *single* rank for each case where COL_1_RANK and COL_2_RANK are equivalent. Then we want the values corresponding to this mutual rank to be contained in the same line. Thus, the desired output is as follows:

    MUTUAL_RANK COL_1_VALUE COL_2_VALUE
    1AAAFFF
    2BBBGGG
    3CCCHHH
    4DDDIII
    5EEEJJJ

    The other condition is that we want to do this in a *table single pass*. So we are aware of the solutions using two different CLAUSES and by joining in the ranks. It's not what we're looking for here.

    We are suspecting that some analytic function can be used here, but can't seem to find, he. Basically, for each line, take the value of COL_1_RANK and, then, on the set of all values of COL_2_RANK , locate the line where COL_2_RANK = s COL_1_RANK. Pull the COL_2_VALUE of this line.

    No matter what SQL Smarties out there who have a solution for this?

    Thank you

    -Joe

    SELECT col_1_rank,

    col_1_value,

    REGEXP_SUBSTR (listagg (col_2_value, ",") THE Group (ORDER BY col_2_rank) (),

    '[^,]+',

    1,

    col_1_rank)

    col_2_value

    T

    order by 1;

  • display the columns as rows in the table of non-unique key

    Hi OTN/users, I hope you can help me

    Given a table:

    create table t (varchar2 (30), int b, int, date c);

    with these data in:

    insert into values t (a1, 40, to_date (December 1, 2012 '));
    insert into values t (a1, 50, to_date (December 1, 2012 '));
    insert into values t (a1, 60, to_date (December 1, 2012 '));
    insert into values t (b1, 10, to_date (December 1, 2012 '));
    insert into values t (b1, 20, to_date (December 1, 2012 '));
    insert into values t (b1, 30, to_date (December 1, 2012 '));
    insert into values t (c1, 60, to_date (December 1, 2012 '));
    insert into values t (c1, 70, to_date (December 1, 2012 '));
    insert into values t (c1, 80, to_date (December 1, 2012 '));

    -I want the output columns for each of the 'a' as a single line ex:

    A1 40 50 60 1 December 2012
    B1 10 20 30 December 1, 2012
    ...

    I was almost right, but "a" neck repeats 4 times for each line of output:

    A1 40
    50 A1
    A1 60
    A1 1 December 2012

    -I want to exit repeat delete the first column "a" but see the rest in a straight line.

    I tried various things (Pivot, Rollup, etc.), but the fact that I'm in overlay on a table with no unique lines complicated things maybe.
    Any help would be appreciated

    Hi Kim,

    Kim Berg Hansen wrote:
    Even [url http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:5658416800346527104] Tom agrees with Nicosa ;-)

    Very honored that Tom has decided to use my solution. ;-) ;-) ;-)
    But I guess that means that the OP may not like here to mark the thread as an answer.

  • How to convert the column of ROW using DBMS_REDIFINITION object type column

    Hi all
    Suppose I have the following table to convert:
    create table customer as select customer_id cid, cust_first_name name, cust_address street from customers;
    alter table customer modify cid primary key;
    I created the table based on the customers of the OE schema table, while the street column has cust_address_typ with the following attribute object type
    SQL> describe cust_address_typ
     Name                                     Null?     Type
     ----------------------------------------------------- -------- ------------------------------------
     STREET_ADDRESS                               VARCHAR2(40)
     POSTAL_CODE                                   VARCHAR2(10)
     CITY                                        VARCHAR2(30)
     STATE_PROVINCE                               VARCHAR2(10)
     COUNTRY_ID                                   CHAR(2)
    I want to convert the object attribute adresse_rue in a column of RDM. Consider the following temporary table:
    CREATE TABLE INT_CUSTOMER(
    CID NUMBER,
    NAME VARCHAR2(30),
    street varchar2(100)
    );
    First of all, I checked if the table can be redefined:
    --Verify if the table can be redefined
    BEGIN
    DBMS_REDEFINITION.CAN_REDEF_TABLE('OE','CUSTOMER',DBMS_REDEFINITION.CONS_USE_PK);
    END;
     4  /
    
    PL/SQL procedure successfully completed.
    But when I started the redefinition, I got an error:
    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME, STREET CUST_ADDRESS_TYP(STREET_ADDRESS)'
    );
    END;
      9  /
    BEGIN
    *
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 2
    What seemed to be the problem?

    Best regards
    Val

    Published by: Valerie good-natured October 9, 2011 21:43

    Have you tried this one:

    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET'
    );
    END;
    

    Looking at your trace file, I claim that when you use the call above to START_REDEF_TABLE, the inner workings of this procedure will create this SQL statement:

    select CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET from "OE"."CUSTOMER" "CUSTOMER"
    

    (You can prove or disprove my claim by tracing it ;-)))

    And this statement has had an alias - even if the alias is the same as the name of the table...

  • Need help to sort a column in the classic report

    Hi I'm creating and classic report and I need to sort on the columns. I also use a selection list to filter the records in the column. When I do not use the list selection sorting works but when I'm on the selcet list and select the sort option, then it is showing error. If anyone can help...

    Thnaks,
    Rik

    Hello

    Is it possible see the source code?
    If you create the developer user to your workspace and post login information.
    Or you can send information to connect to me by e-mail. My email is in my profile

    Kind regards
    Jari

  • remove the column

    Hi all

    I want to remove a column from a table, but the column have already given.
    can someone help me? The column also is een FK.

    ALTER TABLE test_table
    DROP COLUMN test_column

    Edited by: sake1 7 February 2012 08:16

    Your ALTER TABLE table_name DROP COLUMN column_name; command should work.

    Have you tried to use it? You have an error?

Maybe you are looking for