Converting 7.3.4 LONGs to 8.1.7 Varchar2(4000)

Hello all,
I have a table in 7.3.4 that has a long field because the data was just about 3500 characters long. Now we are upgrading to 8.1.7 and I want to change all the long fields to varchar2(4000) and insert the data. Can anyone tell me how to do this?
Thanks.

You can create column of CLOB datatype and use TO_LOB function to convert long into CLOB.
add a column with CLOB datatype then insert data from long to clob and then drop long column.
or create another table similar to original one but clob column instead of long column. insert data into new table then rename both tables accordingly.
Ajwat

Similar Messages

  • Convert from String to Long

    Hello Frineds I want to convert from String to Long.
    My String is like str="600 700 250 300" and I want to convert it to long and
    get the total value in to the long variable.like the total of str in long varible should be 1850.
    Thank You
    Nilesh Vasani

    Maybe this would work?
    StringTokenizer st = new StringTokenizer(yourString, " ");
    long l = 0;
    while(st.hasMoreTokens()) {
        l += Long.parseLong(st.nextToken()).longValue();
    }

  • How to convert clob column to long

    Hi,
    Is there any way to convert clob column to long.
    Here below is my scenario..
    Instead of using substr function
    CREATE OR REPLACE PROCEDURE proc AS
    sql2 clob := '';
    sqlstring1 LONG;
    sqlstring2 LONG;
    sqlstring3 LONG;
    sqlstring4 LONG;
    sqlstring5 LONG;
    sqlstring6 LONG;
    sqlstring7 LONG;
    sqlstring8 LONG;
    sqlstring9 LONG;
    sqlstring10 LONG;
    BEGIN
    FOR sql1 IN (SELECT info FROM emp)
    LOOP
    sql2 := sql1.sql_string;
    sqlString1 := dbms_lob.SUBSTR(sql2, 8000, 1);
    sqlString2 := dbms_lob.SUBSTR(sql2, 8000, 8001);
    sqlString3 := dbms_lob.SUBSTR(sql2, 8000, 16001);
    sqlString4 := dbms_lob.SUBSTR(sql2, 8000, 24001);
    sqlString5 := dbms_lob.SUBSTR(sql2, 8000, 32001);
    sqlString6 := dbms_lob.SUBSTR(sql2, 8000, 40001);
    sqlString7 := dbms_lob.SUBSTR(sql2, 8000, 48001);
    sqlString8 := dbms_lob.SUBSTR(sql2, 8000, 56001);
    sqlString9 := dbms_lob.SUBSTR(sql2, 8000, 64001);
    sqlString10 := dbms_lob.SUBSTR(sql2, 8000, 72001);
    EXECUTE IMMEDIATE sqlString1 || sqlString2 || sqlString3 ||
    sqlString4 || sqlString5 || sqlString6 ||
    sqlString7 || sqlString8 || sqlstring9 ||
    sqlstring10;
    END LOOP;
    COMMIT;
    END proc;
    Any help really appreciated
    Thanks

    We cannot execute clob dynamically.That's what I said: execute immediate doesn't support CLOB!
    But you can concatenate two long's:
    SQL> DECLARE
       l_stmt1   LONG;
       l_stmt2   LONG;
    BEGIN
       l_stmt1 := RPAD ('BEGIN ', 32500, ' ');
       l_stmt2 :=
           RPAD ('  dbms_output.put_line(''Hello World'');', 32500, ' ')
           || 'END;';
       DBMS_OUTPUT.put_line ('Length of statement: '
                             || LENGTH (l_stmt1 || l_stmt2)
       EXECUTE IMMEDIATE (l_stmt1 || l_stmt2);
    END;
    Length of statement: 65004
    Hello World
    PL/SQL procedure successfully completed.So if you strip some extra spaces or try to compact your statement somehow, you might be able use above method.

  • Converting byte[] to short, long, etc.

    I need to packetize the data with my own header embedded in the data. The header field is composed of data types: short, byte, and long. Since the header will be transported over the network using UDP socket, it will have to be converted to type byte[].
    Is there a clean way to convert from byte[] to short, and long data types? Or do I have to concatenate bytes and type cast them? How do I even type cast byte[] to short? Thanks.

    Have a look at the ByteBuffer class. You can wrap a byte
    array in such a buffer and write other types (like ints or longs etc)
    to the byte array through the buffer. Of course you can read those
    values back again using the buffer.
    kind regards,
    Jos

  • How to convert string date to long (or Unix date)?

    I'm having difficulty in converting a user supplied date in the format mm/dd/yyyy to a long format such as 1035462807000. Since it's being entered by the user I can't just use the current system date. Any suggestions? Thanks!
    Dave

    Hi man, tsith Gave a good beggining, why dont you try the next code
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class DateToUnix{
        public static void main(String args[]){
            getDateAsLong();
        public static void getDateAsLong(){
            String sStartDate = "12/01/2002";
            Date theDate;
            DateFormat sdf= new SimpleDateFormat("MM/DD/yyyy" );
            try {
                theDate = sdf.parse( sStartDate );
            }catch(ParseException e ){
                theDate = new Date();
            System.out.println( "Converted Start Date:" + theDate.getTime());
    }No mather how you get a Date object, the value you are looking for is a long, and you can get it from such object with the getTime() method.
    Take a look at the Java API @ [http://java.sun.com/j2se/1.4.1/docs/api/java/util/Date.html#getTime()]

  • Converted YouTube videos no longer work

    I have been converting some YouTube videos for my own offline use for some time to view on my iPod Touch. I use a little program called TubeSock.
    Since 2.0 software was released for both iPod Touch and the iPhone 3G all of my converted videos no longer work. Apple changed something. I also have an e-mail into TubeSock to see if they have an update in the works.
    Anyone else experience this problem and if so any solutions?
    Ken

    If it happens again then you can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Converting jlong to unsigned long

    Hi Everyone,
    I am calling a interface from a dll file which need a unsigned long or long as a parameter. In the C program side, how can I convert the jlong to unsigned long or long and then call the interface from the dll file? Also, how can I convert the long back to jlong and return back to Java side? Thank you.
    Jacky

    Straight cast - BigInteger would be overkill.

  • How to convert short timestamp to long time stamp.?

    Can anybody help on converting a short time stamp into long timestamp?
    Regards
    Nitin

    Hi,
    CONVERT: DATE p_date TIME p_time INTO TIMESTAMP l_timestamp TIME ZONE sy-zonlo.
    thanks\
    Mahesh

  • IMac Intel 10.6.7 dont convert my blendfiles any longer

    Hello
    For years I have animate on Blender 2.4 - 2.5.7 64 bits  and have converted plenty of blendfiles to videos at Vimeo and YouTube. But after Apple upgrade iMac from 10.6.6 to 10.6.7 64 bits  there is no longer any possible way to get my blendfiles converted to videos.
    Thanks
    Karl

    Ignore all these suggestions from the post above. They won't help, may be harmful and slow down your computer even more. Do try a Safe Boot, SMC and PRAM Resets, remove any login items, and test from another account.
    Remove all items in your:
    /Library/Caches
    /Library/LaunchAgents
    /Library/LauncDaemons
    ~/Library/Caches [~ - Signifies your user level, the others were the main computer folders]
    ~/Library/LaunchAgents
    I finally found the Activity Monitor.  I selected All Processes and see the %CPU but I don't know what I am exactly looking for.  I clicked System Memory Free: 419.7 MB Wired 144.4 MB  Active 261.6 MB Inactive: 202.4 MB  used: 607.9 MB  VM size;  40.98 GB  Page ins: 62.19 GB  Page outs: 33.42 GB  Swap used: 1.76 GB
    You do not have enough RAM to run Snow Leopard. 1 GB is not enough. It is clear from the Page ins/Page outs, you are starved for memory.
    Also, these symptoms might indicate a failing drive, which the native SMART won't necessarily detect until much too late.
    Get the free demo of SMART Utility.
    http://www.volitans-software.com/smart_utility.php
    And if you don't already have one, make sure you have a full, reliable backup on an external drive to restore if and when the drive does fail completely.

  • How to convert Works doc no longer having Works?

    I have been sent a large Works document. No longer having Works, I am trying to figure out how to convert it into .rtf of some other form that is readable.

    Since you've posted in the AppleWorks forum, by "Works" I assume you mean AppleWorks. There are a few options to get to the contents of that file.
    The easiest & most reliable option other than using AppleWorks or Pages 4 or earlier would be to open the file with LibreOffice. It's a free, open source, Office clone that does a very good job of opening AppleWorks & ClarisWorks files. You can then save them as RTF or Word.
    Second would be to open the file with TextEdit that comes with OS X. You will get a lot of "garbage" formatting text before & after the actual text. That formatting can be many pages long.
    Third would be to look at the options available from Panergy Software. They do have demo software to try.

  • [Q-Pro] Converting video taking incredibly long?!

    Hi,
    I'm using quicktime pro to convert some MKVs with subtitles to AVIs. The input MKVs are about 140mb in size, and 24 minutes long. Quicktime gives me this information about the videos:
    http://img12.imageshack.us/img12/5286/picture7ks0.png
    I am converting them with these settings:
    Video Settings: http://img22.imageshack.us/img22/9579/picture5uo2.png
    Audio Settings: http://img19.imageshack.us/img19/6564/picture6nk5.png
    Doing this takes about 3 - 4 HOURS per file! Why so high? Are there any alternative methods that will preserve the subtitles (Convert them to video)? At this rate, it would be quicker to capture the screen video with something like Snapz X and convert it from there...
    My hardware is a 2.4ghz Early 08 Macbook Pro, so I doubt it's a hardware limitation.
    Thanks,
    Dave.

    So. You're trying to take some "out of date" Matroska files into another silly format like AVI?
    What a waste of time and your resources.
    The Cinepak codec (AVI export codec) was written for 1993 machines and is so out of date that it has been ended by its creators (Microsoft). The audio codec is equally deprecated and shouldn't be use for modern machines.
    If the files still "play" what is the need for the conversion? If you need a converted file why use such outdated codecs?
    What is your goal?

  • Output_text converter in EA4 no longer working

    I have been using the NumberFormat converters in EA3 for output_text with no problem. Now I am trying out EA4 and the standard converters have stopped working. So, I have build my own converter and registered it in faces-config.xml just like in cardemo. my jsp looks like:
    <h:output_text id="monQuota" converter="swampCurrency" valueRef="TCompCalc.monQuota" >
    </h:output_text>
    the faces-config.xml section looks like:
         <converter>
         <description>Currecny Converter</description>
         <converter-id>swampCurrency</converter-id>
         <converter-class>swamp.webbeans.SwampCurrencyConverter</converter-class>
         </converter>
    The class is not even being invoked and I double checked the spelling of everything many times over. I am at a loss here. Please help. Thanks.

    Following code is working.
    Try it.
    <h:input_text id="ritsu" valueRef="waribikiBean.rate" converter="Number">
         <f:attribute name="numberStyle" value="percent"/>
    </h:input_text>
    <br>
    <h:output_number id="urine" valueRef="waribikiBean.price">
         <f:attribute name="numberStyle" value="integer"/>
    </h:output_number>
    Katsumi Kawasaki
    Tokyo

  • Converting Date-Time to Long Date in a string that is stored in a formula

    The following are 2 verions of formulas that I've tried in placing the long date on a report.  I want the JUD_T_MEETING_NOTICE.MEETING_DATE to be displayed on the letter if Outcome_ID = 3.00 as April 29, 2009.  The field's fomat in the table is 04/29/2009 and neither of the formula's below worked.  I tried formatting the date as a separte formula, as shown in Formula #2 below, but the formatting defaults to the original DataType.  Anyone have any ideas on how to format the date within the string in the formula?
    FORMULA #1:
    IF {JUD_T_MEETING_NOTICE.FK_OUTCOME_ID} = 3.00
    THEN 'I received the enclosed report(s) for review.  To resolve this matter, you must contact the office at ' & {@HallPhone} & ' to schedule a meeting to discuss the incident with me.  This meeting must occur by ' & DATETIMETODATE({JUD_T_MEETING_NOTICE.MEETING_DATE}) & '.  If you have a conflict with this deadline, please let me know as soon as possible to make alternative meeting arrangements.'
    ELSE IF {JUD_T_MEETING_NOTICE.FK_OUTCOME_ID} = 9.00
    THEN 'You missed your scheduled meeting.'
    FORMULA #2:
    IF {JUD_T_MEETING_NOTICE.FK_OUTCOME_ID} = 3.00
    THEN 'I received the enclosed report(s) for review.  To resolve this matter, you must contact the office at ' & {@HallPhone} & ' to schedule a meeting to discuss the incident with me.  This meeting must occur by ' & ({@FormatMeetingDate}) & '.  If you have a conflict with this deadline, please let me know as soon as possible to make alternative meeting arrangements.'
    ELSE IF {JUD_T_MEETING_NOTICE.FK_OUTCOME_ID} = 9.00
    THEN 'You missed your scheduled meeting.'

    Assuming JUD_T_MEETING_NOTICE.MEETING_DATE is a date field, modify your formula to:
    totext(({JUD_T_MEETING_NOTICE.MEETING_DATE}),"MMMM dd, yyyy")
    If it is not a date field but a string, then
    totext(cdate(JUD_T_MEETING_NOTICE.MEETING_DATE ),"MMMM dd, yyyy")

  • Field UMSA1 cannot be converted in type CURR - long Text

    Hi All,
    I am getting the following error
    Error records written to application log
    Error in an arithmetic operation in record 489
    Record 489:Contents 四川省长江滥曝扇备总 from field UMSA1 cannot
    Record 489 :Contents 四川省长江滥曝扇备总 from field UMSA1 cannot be converted in type CURR ->lo
    This happened for the customized master data Z********(customer number). Data source; 0CUSTOMER_ATTR
    I have undertaken the following actions but all failed.
    1. Replicated the data source, activated the transfer structure through a program and the load was run but the load failed with the same issue.
    2. Pushed the data till PSA and tried to edit it in the PSA, but here too the load failed with the same issue.
    It is understood that the data source 0CUSTOMER_ATTR is obtained from the Funtion Module: MDEX_CUSTOMER_MD
    Out of 5 data packages, I could find only 3 data packages in PSA which are successful, the remaining had error and could not be found in PSA. Checked in R/3 but could not catch the correct record, since, did not had proper info. UMSA1 refers to Annual Sales, which are empty in R/3 and BW as well.
    The UMSA1 field in data source 0CUSTOMER_ATTR in BW.
    Data Type: CURR, Length: 15, Decimal: 2, curr/unit: UWAER
    The UMSA1 field in R/3
    Data Type: CURR, Length: 15, Decimal: 2
    Request your timely suggestions.
    Raj

    Dear Veerandra,
    I have already checked in R/3 as you had mentioned. But as I said earlier, could not catch the correct record, since, did not had proper info. UMSA1 refers to Annual Sales, which are empty in R/3 and BW as well.
    I have undertaken the following actions but all failed.
    1. Replicated the data source, activated the transfer structure through a program and the load was run but the load failed with the same issue.
    2. Pushed the data till PSA and tried to edit it in the PSA, but here too the load failed with the same issue.
    It is understood that the data source 0CUSTOMER_ATTR is obtained from the Funtion Module: MDEX_CUSTOMER_MD
    3. Error Handling option.
    Regards.
    Raj

  • How to convert double to unsigned long integer for cRIO analog output?

    All,
    Having issues sending out my arbitrary waveform to my cRIO analog output. My values are doubles and by the time I send them out, they have been converted to U32 values and are all turning out as zeroes. This led me to assume two things: 1) That cRIO analog output can only output integers since the values need to be deployed in the memory first and 2) that I'm missing a step in the conversion process. My values range from 0-8, therefore I don't expect that the simple conversion tool in labview should make everything into zeroes.
    Any help?

    Since we are using the cRIO's FPGA interface, you really should be doing most of this inside of the FPGA.  Use DMA FIFOs to pass your data between your RT and the FPGA (and visa versa).
    On your FPGA, you can have a loop that just reads the analog inputs at whatever loop rate you want.  You just send the data to the RT using a DMA.
    Similarly, use a DMA to send your analog output values to the FPGA.  The FPGA can have another loop that reads the DMA and writes the value to the analog output.  This should be done in the FPGA since you can have the FPGA send out the values at a given (and deterministic) loop rate.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for