DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Long Datatypes

  1. #1
    Join Date
    Jan 2001
    Posts
    642
    Hi,

    I have to create a table based on another table containing a 'Long' datatype.

    I can't even insert a long column from one table into another table with long datatype.


    How do I go ahead to insert 'long' column of one table into another table

    Badrinath

  2. #2
    Join Date
    Jul 2000
    Posts
    53
    Hi,

    If your longs contain less than 4001 characters then you could write a little bit of plsql to extract from table1 and populate table2.

    HTH
    Steve

  3. #3
    Join Date
    Jan 2001
    Posts
    642
    The field is specified as Long. No length is specified. I think It can take beyond 4000bytes also.


    A) What to do, if it is > 4000bytes.

    B)
    For the long < 4000, can i write a pl/sql block to
    1) read from one table into a cursor
    2) open cursor
    3) from cursor insert into another table.
    Badrinath.

  4. #4
    Join Date
    Feb 2001
    Posts
    9
    There is Copy Command That can help you Create Table from Other table that have Long Data Type... On Long Datatype, you can not use any Operator and No Function.

    Beeter to See Copy Command that's SQL Plus Command.

    COPY FROM PMM/PMM@PMMQA CREATE NEWTABLE USING SELECT LOCATION_ID, FULL_NAME FROM LOCATION
    ............................
    COPY FROM SCOTT/TIGER@BOSTONDB -
    > CREATE EMPCOPY -
    > USING SELECT * FROM EMP
    ----------------------------
    COPY FROM SCOTT/TIGER@BOSTONDB -
    > REPLACE EMPCOPY2 -
    > USING SELECT ENAME, SAL -
    > FROM EMPCOPY -
    > WHERE DEPTNO = 30
    ---------------------
    COPY FROM PMM/PMM@PMMQA CREATE NEWLOC USING SELECT * FROM TEMPLOOK

    Hope will help You ... This is Only from Oracle 8i 8.1.5 or Higher
    The Great Certified DBA in Oracle 8i

  5. #5
    Join Date
    Jan 2001
    Posts
    642
    GreatDBA, that was really great, It worked and solved my problem Thanks.
    Badrinath

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width