Moving a table with long data type column

hi
1.how to move a table with a long data type column in 8.1.7.3.0 ver database.
alter table APPLSYS.FND_LOBS_DOCUMENT move lob(BLOB_CONTENT) store as (tablespace testing)
ERROR at line 1:
ORA-00997: illegal use of LONG datatype
2. and a table with varray type column
alter table APPLSYS.WF_ERROR move lob("USER_DATA"."PARAMETER_LIST") store as (tablespace testing)
ERROR at line 1:
ORA-22917: use VARRAY to define the storage clause for this column or attribute
table description is:
SQL> desc applsys.wf_error;
Name Null? Type
Q_NAME VARCHAR2(30)
MSGID NOT NULL RAW(16)
CORRID VARCHAR2(128)
PRIORITY NUMBER
STATE NUMBER
DELAY DATE
EXPIRATION NUMBER
TIME_MANAGER_INFO DATE
LOCAL_ORDER_NO NUMBER
CHAIN_NO NUMBER
CSCN NUMBER
DSCN NUMBER
ENQ_TIME DATE
ENQ_UID NUMBER
ENQ_TID VARCHAR2(30)
DEQ_TIME DATE
DEQ_UID NUMBER
DEQ_TID VARCHAR2(30)
RETRY_COUNT NUMBER
EXCEPTION_QSCHEMA VARCHAR2(30)
EXCEPTION_QUEUE VARCHAR2(30)
STEP_NO NUMBER
RECIPIENT_KEY NUMBER
DEQUEUE_MSGID RAW(16)
SENDER_NAME VARCHAR2(30)
SENDER_ADDRESS VARCHAR2(1024)
SENDER_PROTOCOL NUMBER
USER_DATA APPS.WF_EVENT_T
lob column:
SQL> select owner,table_name,column_name from dba_lobs where table_name='WF_ERROR';
OWNER TABLE_NAME COLUMN_NAME
APPLSYS WF_ERROR "USER_DATA"."PARAMETER_LIST"
APPLSYS WF_ERROR "USER_DATA"."EVENT_DATA"
pls help me
thanks and regards
srinivas

1. Export and import
2. Sql*Plus 'copy' command
It is a good idea to move from 'LONG' to 'CLOB'.

Similar Messages

  • Materialized view on table having LONG data type column

    Hi ,
    We have two Database with different version as below.
    Master Database site : 9.2.0.8.0
    Materialized view site : 10.2.0.1
    We want to create MV ( materialized view) for below table in Materialized view site.
    SQL> desc longdescription;
    Name Null? Type
    LDKEY NOT NULL NUMBER
    LDOWNERTABLE NOT NULL VARCHAR2(18)
    LDOWNERCOL NOT NULL VARCHAR2(18)
    LDTEXT LONG
    ROWSTAMP NOT NULL VARCHAR2(40)
    SQL>
    Here's the error that we got.
    SQL> create materialized view MV_LONGDESCRIPTION REFRESH ON DEMAND with rowid as
    select * from LONGDESCRIPTION@CBUM_REPL;
    create materialized view MV_LONGDESCRIPTION REFRESH ON DEMAND with rowid as sele
    ct * from LONGDESCRIPTION@CBUM_REPL
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    SQL>
    CBUM_REPL - > is dblink which connections to remote oracle 9i database where we have MV log created for table LONGDESCRIPTION

    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:349809082244#25744259997345

  • How to insert in long data type column

    I would like to know how could I insert data in a long data type column.
    Thanks

    Don't use LONG, use CLOB instead. You can write to CLOBs using the DBMS_LOB package.
    Cheers, APC

  • Using DBMS_DATAPUMP with LONG data type

    I've got a procedure below that calls the DBMS_DATAPUMP procedure using a REMOTE_LINK to move a schema from one database to another. However, a couple of the tables within that schema have columns with the LONG data type. And when I run it I get an error saying that you cannot move data with the LONG data type using a REMOTE LINK. So no data in those particular tables gets moved over.
    Has anyone else had this issue? If so, do you have a work around? I tried adding a CLOB column to my table and setting the new CLOB to equal the LONG, but I couldn't get that to work either...even when I tried using a TO_LOB. If I could get that to, then I could just drop the LONG, move the schema, then recreate the LONG column on the opposite side.
    Here's my procedure....
    DECLARE
         /* EXPORT/IMPORT VARIABLES */
         v_dp_job_handle                    NUMBER ;          -- Data Pump job handle
         v_count                              NUMBER ;          -- Loop index
         v_percent_done                    NUMBER ;          -- Percentage of job complete
         v_job_state                         VARCHAR2(30) ;     -- To keep track of job state
         v_message                         KU$_LOGENTRY ;     -- For WIP and error messages
         v_job_status                    KU$_JOBSTATUS ;     -- The job status from get_status
         v_status                         KU$_STATUS ;     -- The status object returned by get_status
         v_logfile                         NUMBER ;
         v_date                              VARCHAR2(13) ;
         v_source_server_name          VARCHAR2(50) ;
         v_destination_server_name     VARCHAR2(50) ;
    BEGIN
         v_project := 'TEST' ;
         v_date := TO_CHAR(SYSDATE, 'MMDDYYYY_HHMI') ;
         v_source_server_name := 'TEST_DB' ;
         v_dp_job_handle := DBMS_DATAPUMP.OPEN(
              OPERATION     => 'IMPORT',
              JOB_MODE     => 'SCHEMA',
              REMOTE_LINK => v_source_server_name,
              JOB_NAME     => v_project||'_EXP_'||v_date,
              VERSION          => 'LATEST') ;
         v_logfile := DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE ;
         DBMS_DATAPUMP.ADD_FILE(
              HANDLE          => v_dp_job_handle,
              FILENAME     => v_project||'_EXP_'||v_date||'.LOG',
              DIRECTORY     => 'DATAPUMP',
              FILETYPE     => v_logfile) ;
         DBMS_DATAPUMP.METADATA_FILTER(
              HANDLE          => v_dp_job_handle,
              NAME          => 'SCHEMA_EXPR',
              VALUE          => '= '''||v_project||''' ') ;
         DBMS_DATAPUMP.START_JOB(v_dp_job_handle) ;
         v_percent_done := 0 ;
         v_job_state := 'UNDEFINED' ;
         WHILE (v_job_state != 'COMPLETED') AND (v_job_state != 'STOPPED')
         LOOP
              DBMS_DATAPUMP.GET_STATUS(
                   v_dp_job_handle,
                   DBMS_DATAPUMP.KU$_STATUS_JOB_ERROR + DBMS_DATAPUMP.KU$_STATUS_JOB_STATUS + DBMS_DATAPUMP.KU$_STATUS_WIP,
                   -1,
                   v_job_state,
                   v_status) ;
                   v_job_status := v_status.JOB_STATUS ;
              IF v_job_status.PERCENT_DONE != v_percent_done THEN
                   DBMS_OUTPUT.PUT_LINE('*** Job percent done = '||TO_CHAR(v_job_status.PERCENT_DONE)) ;
                   v_percent_done := v_job_status.PERCENT_DONE ;
              END IF ;
              IF BITAND(v_status.MASK, DBMS_DATAPUMP.KU$_STATUS_WIP) != 0 THEN
                   v_message := v_status.WIP ;
              ELSIF BITAND(v_status.mask, DBMS_DATAPUMP.KU$_STATUS_JOB_ERROR) != 0 THEN
                   v_message := v_status.ERROR ;
              ELSE
                   v_message := NULL ;
              END IF ;
              IF v_message IS NOT NULL THEN
                   v_count := v_message.FIRST ;
                   WHILE v_count IS NOT NULL
                   LOOP
                        DBMS_OUTPUT.PUT_LINE(v_message(v_count).LOGTEXT) ;
                        v_count := v_message.NEXT(v_count) ;
                   END LOOP ;
              END IF ;
         END LOOP ;
         DBMS_OUTPUT.PUT_LINE('Job has completed') ;
         DBMS_OUTPUT.PUT_LINE('Final job state = '||v_job_state) ;
         DBMS_DATAPUMP.DETACH(v_dp_job_handle) ;
    END ;

    But the application we have that uses the database cannot be changed to read from a CLOBWhy can't you change the application?
    Well, anyway you should point out to your superiors that Oracle documented years ago to not use LONGS anymore...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#sthref3806
    It clearly states:
    LONG Datatype
    Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases.
    How do I go from CLOB to LONG?I'm sorry, cannot help you on that one, I don't think you can do that at all (Oracle wants us to stop using LONGS, so, it's a one-way conversion...):
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1037232794454#15512131314505
    So: NO built_in, you'll need to write a program if the clob is ALWAYS LESS THAN 32k in size, you can use plsql..but is that the case in your case? Only you know that.
    I believe that question is still unanswered on this forum, but you might try searchin for answers on this forum, and
    the 'Database-General' forum: General Database Discussions
    Perhaps you can google a Q&D workaround...
    ( And consider convincing your collegues to just convert your LONGS to LOBS)
    Edited by: hoek on Apr 8, 2009 5:43 PM

  • How to deal with LONG data type in RTF template

    Hi,
    I'm developing a PO request report in which I should print some attachments. The attachments are stored in the database in table fnd_attachments_long_text in column long_text which data type is LONG. In my case the content of the column long_text is always plain text.
    The query I use to get the text from the table is something like:
    select long_text
    from fnd_documents_long_text
    where <some_conditions....>
    The query runs fine in SQL developer but when I run the XML report I get following error: "Stream has already been closed". The XML file generated is complete in its structure but the XML node which should contain the text of the attachment is empty, therefore I cannot print the attachment in the report.
    I made some researches on metalink and I've found note 832903.1 which explains the same error I'm getting. Looks like I cannot execute more than 1 query using the same JDBC connection if one of these queries retrieves a LONG data type.
    Any advice on how can I get the attachment text to show correctly in my report?
    Thank you

    Hi,
    Thank you for your reply,
    Yes, I tried to get the text as described in that article but maybe I'm missing something because my data template doesn't show the attachment text.
    The article talks about support for BLOB, CLOB and RAW and at the end it states "but we do not have support for RAW and LONG column types at the moment - we're looking into that for a future release". So this makes me think that I won't be albe to retrieve my text since it's stored in a LONG column.
    I think that the error I'm getting is not strictly related to XML publisher but it is in some way related to the JDBC connection used to get the data. Infact I have an old version of the same report I'm trying do develop which is made in Report Builder and it is retrieving the attachment text correctly.
    Right now I'm trying to use the Report Builder engine to get the XML data and then use XML Publisher to create the PDF output. Anyway, if it is possible, I would like to avoid Report Builder and use only XMLP.
    Thanks

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • Working with long data type

    i have table named as testdata in that table
    columns are
    id , data
    id is number,data is long type.
    i want to print the id values which conatains the ' HI H R u' string in data column.

    check this.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:839298816582

  • Copy a table with long data

    I have a table in which one column is long. The table also contains some record.
    How can I make another exactly same as this one (same structure/data)??

    hagrid wrote:
    I have a table in which one column is long. The table also contains some record.
    How can I make another exactly same as this one (same structure/data)??
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifierLONG datatype has been deprecated for at least a decade.
    STOP using it it NOW!

  • How can I retrieve a LONG data type using ADO

    In VB I am using an ADODB object to retrieve data from an Oracle table that has a LONG data type column...
    specifically: SELECT TRIGGER_BODY FROM USER_TRIGGERS WHERE TRIGGER_NAME = 'MYTRIGGER'
    I have tried using the GETCHUNK method but it only returns the first 150 or so characters no matter how
    many times I call it???? here is the sample code I'm using........
    Dim Cn As ADODB.Connection, Rs As ADODB.Recordset, SQL As String
    Dim sChunk() As Byte
    Set Cn = New ADODB.Connection
    Set Rs = New ADODB.Recordset
    Cn.CursorLocation = adUseServer
    Cn.Open "Provider=OraOLEDB.Oracle.1;Password=hrzadmin;Persist Security
    Info=True;UserID=hadmin;Data Source=xxx.local"
    SQL = "SELECT trigger_body from user_triggers where trigger_name = 'MYTRIGGER'"
    Rs.Open SQL, Cn, adOpenStatic, adLockReadOnly
    Debug.Print Rs!trigger_name
    Debug.Print Rs!trigger_body
    sChunk = rs.Fields("trigger_body").GetChunk(500)
    Debug.Print sChunk

    I have a similar code which works for chunk size >400,
    The image I am trying to retrieve is huge so the chunksize is also more.
    Did you try with any non meta table?
    For your reference I am pasting my application code below.
    Hope it helps.
    --Jagriti
    Private Sub cmdGetImage_Click()
    Dim bytchunk() As Byte 'variable to store binary data
    Dim destinationFileNum As Integer 'variable for filenumber
    'recordset for fetching Product Image for the product selected form the list
    Dim recProductImage As New ADODB.Recordset
    Dim offset As Long
    Dim totalsize As Long
    Dim roundTrips As Long
    'variables used in calculation of time taken to fetch the image
    Dim startTime As Currency, EndTime As Currency, time As Currency, Freq As Currency
    Dim i As Integer 'counter variable
    i = 0
    On Error GoTo ErrorText 'redirect to error handler
    '** Step 1 **'
    'validating if product is selected from the list
    If cboSelectProduct.Text = "" Then
    MsgBox "Select product from the list!"
    Exit Sub
    End If
    '** Step 2 **'
    'validating if "optChunk" optionbox is selected then
    '"txtChunksize" textbox should contain a value
    If optchunk.Value = True Then
    'validate if chunksize value is null
    If txtChunkSize.Text = "" Then
    MsgBox "Enter value for chunksize "
    Exit Sub
    End If
    'validating that the chunk size entered should be a positive value
    If CInt(txtChunkSize.Text) < 1 Then
    MsgBox "ChunkSize value should be positive!"
    Exit Sub
    End If
    End If
    '** Step 3 **'
    'open image column from product_information table using m_Oracon connection
    recProductImage.Open "SELECT product_image FROM product_information " & _
    " WHERE product_id =" & cboSelectProduct.ItemData(cboSelectProduct.ListIndex) _
    , m_Oracon, adOpenStatic _
    , adLockOptimistic, adCmdText
    'check if product image exists for the product selected
    If Not IsNull(recProductImage!product_image) Then
    'setting mouse pointer on the form "frmChunkSize" to wait state
    frmChunkSize.MousePointer = vbHourglass
    '** Step 4 **'
    'assigning "desitinationFileNum" variable to next file number
    'available for use
    destinationFileNum = FreeFile
    'allocates a buffer for I/O to the temporary file "tempImage.bmp"
    'at the current application path
    Open App.Path & "\tempImage.bmp" For Binary As destinationFileNum
    '** Step 5 **'
    'Get the frequency of internal timer in Freq variable
    QueryPerformanceFrequency Freq
    'start the timer
    QueryPerformanceCounter startTime
    'clear "imgProduct" imagebox
    imgProduct.Picture = LoadPicture("")
    '** Step 6 **
    If optValue.Value = True And optchunk.Value = False Then
    '** Step 7 **
    'using ADO Value property
    bytchunk = recProductImage("product_image").Value
    'appending byte arrary data to the temporary file
    Put destinationFileNum, , bytchunk
    'displaying "No. of Round Trips" in a label to 1
    lblRoundTrips = 1
    ElseIf optchunk.Value = True Then
    '** Step 8 **
    'converting the value entered "txtChunkSize" textbox to long
    'and assigning it to chunksize variable
    m_chunksize = CLng(txtChunkSize.Text)
    'assigning the actual size of the image retrieved to a variable
    totalsize = recProductImage("product_image").ActualSize
    'calculating and assigning the "No. of Round Trips" to a variable
    roundTrips = totalsize / m_chunksize
    'in case fragment of data left, incrementing roundtrips by 1
    If (totalsize Mod m_chunksize) > 0 Then
    roundTrips = roundTrips + 1
    End If
    'In this loop the image is retrieved in terms of chunksize
    'and appended to the temporary file
    Do While offset < totalsize
    '** Step 9 **
    'retrieving product_image from the recordset, in chunks of bytes
    bytchunk = recProductImage("product_image").GetChunk(m_chunksize)
    offset = offset + m_chunksize
    'appending byte arrary data to the temporary file
    Put destinationFileNum, , bytchunk
    Loop
    'displaying "No. of Round Trips" in a label
    lblRoundTrips = roundTrips
    End If
    '** Step 10 **'
    'stop the timer after image retrieval is done
    QueryPerformanceCounter EndTime
    'close the opened file handle
    Close destinationFileNum

  • Error in getting Long data type from Table

    Hi All,
    I have one table say xx_long. In this table one column is having Long data type.
    Now I want this values will get in to the PL/SQL variable. I taken variable data type as long but it is showing error "ORA-00997: illegal use of LONG datatype".
    Sample code with which I tried:
    declare
    a long;
    begin
    select slno into a from xx_long where slno = 100;
    dbms_output.put_line('Value:'||a);
    end;
    Please help me on this.
    Thanks in advance.
    Regards,
    Hari

    LONG columns cannot appear in certain parts of SQL statements:
    WHERE clauses, GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
    The UNIQUE operator of a SELECT statement
    The column list of a CREATE CLUSTER statement
    The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
    SQL functions (such as SUBSTR or INSTR)
    Expressions or conditions
    SELECT lists of queries containing GROUP BY clauses
    SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators
    SELECT lists of CREATE TABLE ... AS SELECT statements
    SELECT lists in subqueries in INSERT statements

  • Help! Update a column in LONG data type

    I am looking for help on how to update a column with the long data type in a oracle 7.34 table on sun Solaris 2.6.:
    SQL> desc searchengine;
    Name Null? Type
    ENGINE_ID NOT NULL NUMBER(38)
    ENGINEHTML LONG
    SQL> set long 10000
    Then when I run the following update statement I always get the error
    ERROR at line 1:
    ORA-01489: result of string concatenation is too long
    Here is the update statement:
    SQL> update searchengine set enginehtml = '<FORM ACTION="../ndClickMe/pgSearchEng" METHOD="GET" target=_top><TR><TD COLSPAN=2>
    <IMG SRC=/gifs/start/looksmart_websearch.gif width=85 height=25 ALIGN=BOTTOM BORDER=0><BR>
    </TD></TR><TR><TD HEIGHT=20 VALIGN=TOP COLSPAN=2><INPUT TYPE=hidden NAME=URL VALUE=http://www.looksmart.com/r_search>
    <input type=hidden name=search value=0><input type=hidden name=comefrom value="izbx-search">
    <input type=hidden name=isp value=zbx><INPUT NAME=key SIZE="22"><br><center>
    <INPUT TYPE="IMAGE" SRC=/gifs/start/search.gif WIDTH=53 HEIGHT=15 ALIGN=BOTTOM border=0 NAME=search
    value="Search!"><br></center></TD></TR></FORM><FORM name="Go3"><tr><td>
    <SELECT name="select" onChange="dropDown(document.Go3.select.options[Go3.select.selectedIndex].value);">
    <option value="">...or select a category</option>
    <option value="http://www.looksmart.com/eus1/eus53930/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53930" target=_top>Automotive</option>
    <option value="http://www.looksmart.com/eus1/eus65300/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus65300" target=_top>Business</option>
    <option value="http://www.looksmart.com/eus1/eus151538/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus151538" target=_top>Chat</option>
    <option value="http://www.looksmart.com/eus1/eus53832/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53832" target=_top>Computing</option>
    <option value="http://www.looksmart.com/eus1/eus52213/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus52213" target=_top>Entertainment</option>
    <option value="http://www.looksmart.com/eus1/eus53671/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53671" target=_top>Family</option>
    <option value="http://www.looksmart.com/eus1/eus53940/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53940" target=_top>Health</option>
    <option value="http://www.looksmart.com/eus1/eus141561/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus141561" target=_top>Hobbies</option>
    <option value="http://www.looksmart.com/eus1/eus53706/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53706" target=_top>Reference</option>
    <option value="http://www.looksmart.com/eus1/eus74544/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus74544" target=_top>Shopping</option>
    <option value="http://www.looksmart.com/eus1/eus51605/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus51605" target=_top>Society</option>
    <option value="http://www.looksmart.com/eus1/eus62704/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus62704" target=_top>Sports</option>
    <option value="http://www.looksmart.com/eus1/eus62920/r?' &#0124; &#0124; '&' & #0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus62920" target=_top>Travel</option>
    </select><hr noshade size="1"></td></tr></form>' where engine_id = 0;
    Is there any way to resolve it?
    Thanks,
    Judy

    Yes Prathap, I need to update a single column of type number in the search results table.but each of that column value would be updated with different values like one row in that column will take a value 325 while another will take 500 etc based on user input.
    Your help in this is very much appreciated, Thanks in advance !

  • How to insert data in a column with uniqueidefier data type

    Guys,
    I need insert data in a column with uniqueidefier data type, when i am trying to that getting error.
    error message says: "Conversion failed when converting from a character string to uniqueidentifier."
    I have data in table a col1,col2,col3,col4 - col3,col4 has datatype as varchar and i am updating table b columns col1,col2 with table a col3 and col4.
    Please guide how to do it.

    Hi,
    Not any String can be convert to uniqueidentifier.
    1. you have to make sure u use a value which is fir to be uniqueidentifier
    2. Use convert or cast in the insert query in order to convert the string into uniqueidentifier
    insert X ... convert(uniqueidentifier, 'string which fit to be convert to uniqueidentifier')
    Please post DDL+DML for more specific help
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
    to identify issues, clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Reverse columns with GUID Data type

    Hi All,
    I want to reverse some of the SQL tables in Sunopsis to create the datastores. One column in these SQL tables has GUID data type and when i reverse this table, all other data being properly displayed but the reversed data store is not displaying data under the column.
    I have added GUID data type in topology in Physical Schema but still it is not working.
    Can you please suggest what should I check?
    Thank you so much in advance.
    Monalisa

    For some reason, this sounds like a technical question and not a comment or issue with the documentaiton.
    Can you suggest a more appropriate place to ask your question?

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • Need to convert long data type to varchar2

    I need to convert a long datatype in an existing table to a
    varchar2, in either another table or view. I have a 3rd party
    application which needs to query the data in the long data type,
    but it can "handle" the long.
    What is the best way to do this? I tried to make a trigger, but
    I must be missing something. Here is the trigger.
    CREATE OR REPLACE TRIGGER "PROD".SV_GET_RTG_COMNT
    BEFORE INSERT OR UPDATE ON PROD.RELS_RTG_SEQ_COMNT
    FOR EACH ROW
    WHEN (OLD.rels_rtg_no = NEW.rels_rtg_no)
    DECLARE
    -- DECLARE VARIABLES
    RTG_COMNT_VAR VARCHAR2(32);
    RTG_COMNT_LONG LONG;
    BEGIN
    Select COMNT_TXT into RTG_COMNT_LONG
    from rels_rtg_seq_comnt;
    RTG_COMNT_VAR := 'TEXT' || substr(RTG_COMNT_LONG,1,32);
    -- If INSERTING
    Insert into SV_RTG_SEQ_COMNT (print_cd, comnt_no,
    seq_no, rtg_no, comnt_txt) values
    (:new.print_cd, :new.comnt_no, :new.seq_no, :new.rels_rtg_no,
    rtg_comnt_var);
    END;
    I tried to use the substr command on the comnt_txt in view but
    received an invalid datatype error.
    Any help would be greatly appreciated.
    Doug

    create another table with clob datatype
    1)create table clob_tab(pkval number,clob_col clob);
    2) insert into clob_tab (select pkval,to_lob(long_col) from
    long_tab);
    3) use dbms_lob package to do string manipulation using
    substr,instr functions on clob column.

Maybe you are looking for