Importing an SQL Server TEXT data type field in Oracle - problem with LONG

Hello,
I work in Oracle 9i and I created a view on a distant SQL Server database that contains a TEXT data type field. But I have a problem when I select that field in Oracle; I have the following error message: "ORA-00997: forbidden use of LONG data type".
Could anybody have a solution for me, to solve that problem?
Thanks a lot!

It is very difficult to suggest anything without seeing your code.  I don't even know if what you are seeing is the actual value or an error code.  Often, negative numbers are indicative of error codes. 
For instance -1 could mean that you have an invalid reference or path, etc...
Can you post your code?

Similar Messages

  • Convert MS SQL server image data type into oracle clob

    Hi all! I'm tryng to access to Microsoft SQL server with Oracle via ODBC. Oracle is not able to use the image data type of Microsoft SQL server. Do you know a way to convert this data type in an oracle format? The explicit casting converts image to long raw, but after the conversion Oracle is not able to manage these data type. Thank you very much!
    Stefano.

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Sql server 2000 data type

    In sql server 2000, what data type do I use for a field that
    needs to show two decimal places? It is a weight field, so the
    weight in ounces could be something like 12.25 and it needs to
    store it this way in the database. I'm kind of new to sql server,
    so any help would be greatly appreciated!

    You asked "In sql server 2000, what data type do I use for a
    field that needs to show two decimal places?" and I answered
    "decimal and numeric". How much clearer could I be?
    Numeric data types with fixed precision and scale.
    decimal[(p[, s])] and numeric[(p[, s])]
    Fixed precision and scale numbers. When maximum precision is
    used, valid values are from - 10^38 +1 through 10^38 - 1. The
    SQL-92 synonyms for decimal are dec and dec(p, s).
    p (precision)
    Specifies the maximum total number of decimal digits that can
    be stored, both to the left and to the right of the decimal point.
    The precision must be a value from 1 through the maximum precision.
    The maximum precision is 38.
    s (scale)
    Specifies the maximum number of decimal digits that can be
    stored to the right of the decimal point. Scale must be a value
    from 0 through p. The default scale is 0; therefore, 0 <= s
    <= p. Maximum storage sizes vary, based on the precision.
    I recommend that you load SQL Server Books Online on your
    computer, as it is available free from Microsoft as a download and
    it has everything you will probably need to know about SQL Server.
    Or you could just use the online version at
    SQL
    Server 2000 Books Online
    Phil

  • MS SQL Server 2005 data types

    Hi,
    I have some code that executes a stored procedure in SQL Server 2005 database from Weblogic 8.1. There is a Spring framework layer in between. I am having problems passing a datetime parameter to the SP (ther server thinks it's a varchar). According to the BEA documentation here http://edocs.bea.com/wls/docs100/jdbc_drivers/mssqlserver.html#wp1088746, a datetime parameter should be passed as java.sql.Types.TIMESTAMP. I've tried TIMESTAMP, DATE, TIME, and none of them work. But, that documentation says it's only for SQL Server 2000. What about 2005? Does anyone know?
    Thanks in advance.

    We use SQL2005 & WebLogic 8.1, but we use the Microsoft JDBC driver form here
    and it all works fine with timestamps. We use this datatype to pass them down java.sql.Timestamp
    http://www.microsoft.com/downloads/details.aspx?familyid=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en
    The MS driver has some enhancements specifically for SQL2005 for performance and handling the new data types. We've always been told to use the vendors driver in preference to the BEA supplied one - that came from BEA!
    Pete

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Where we can find Short Text data type attachment

    Hi,
    file type attachements are store in fnd_lob.
    Where we can find Short Text data type attachment in oracle apps.
    Regards

    Hi,
    You can find short text data type attachments in FND_DOCUMENTS_SHORT_TEXT table.
    Please also refer link:
    Oracle Apps Gurus: Attachments in Oracle
    Attachments in Oracle Applications
    Hope this helps!!!
    Best Regards,

  • DTS Import of MDB in SQL Server 2000 Drops Memo Field Data

    I have used DTS in SQL Server 2000 to import an MDB filed (MS ACCESS) of a table.  When the table is imported the primary key is lost and the memo field data is completely gone. 
    I use the tranformation option in the DTS wizard to add the primary key and make sure the data type for the memo field is varchar and has a size of 8000.  I need that large size since I am storing lots of html code. 
    When I preview the data I see the html code that is supposed to get imported.  However, when I return all rows from the table in Enterprise Manager the field is empty.
    So I tried to manually copy the data from the MS Access Database into SQL Server.  Could not figure out if SQL Server has an interface like MS Access to simply copy data into a table.  So I linked to the tables from MS Access to the SQL Server table. 
    When I opened the linked table I see the data in the description field.  However, if I return the rows from within SQL Server no data is present.
    I have some ASP code trying to read the data in the SQL Server table.  However, nothing is returned and when I run the SQL Statement, nothing gets returned.  The SQL statement returns all rows.  All the other data is present but nothing in the description field. 
    What am I doing wrong?  Any suggestions anyone, please!
    TIA 

    It is important to know the version of MS Access. I will recomend you to use nvarchar datatype instead of varchar. May be the description field contain unicode characters.
    Refer this link to understand more on datatype mapping between access source and sql server destionation.
    http://blogs.msdn.com/b/ssma/archive/2011/03/06/access-to-sql-server-migration-understanding-data-type-conversions.aspx?Redirected=true
    Regards, RSingh

  • Converting SQL Server text field containing XML string to XI XML via JDBC

    Hello
    My client has a SQL Server database containing a field of type Text which contains an XML string e.g.
    <DispatchJob> <DispatchDateTime>2003-09-29T13:29:15</DispatchDateTime> <AssignedFSE>F118</AssignedFSE> <DispatchJobPurchase> <DealerID>14C5</DealerID> <DateOfPurchase>1997-10-01T00:00:00</DateOfPurchase> </DispatchJob>
    I am using JDBC to access this but could someone please recommend the best and easiest solution for converting this string to XI XML for subsequent mapping to BAPI or IDOC or ABAP Proxy and transmission to SAP. There are other fields as well in the database table so thoughts at the moment are to use a normal graphical message mapping followed by an XSL mapping. Will an XSL mapping be able to do this and if so is that the best solution?
    Also I need to do the reverse of this and take fields coming from SAP via BAPI,IDOC etc. and convert them to a single database table field as an XML string also via the JDBC adapter. What is the best way to do this. Could it be done simply with functions in the graphical mapping e.g. concatenate?
    Thank you in advance.
    Trevor

    Hi Michal
    Thanks for the prompt reply.
    I was anticipating XSLT for reading from the SQL Server database and converting the XML string.
    But how would you convert the individual fields from SAP into a single field as an XML string for storing in the SQL Server database? What approach would you use?
    Regards
    Trevor

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • Text file import to sql server

    hello experts
    i am looking the best practise considering performance to import a text file to a sql server 2008r2. i have 1,500 files that need to be imported to sql server? thank you as usaual.

    efratb,
    SSIS would be an good option:
    http://www.codeproject.com/Articles/155829/SQL-Server-Integration-Services-SSIS-Part-1-Basics
    http://blog.sqlauthority.com/2011/05/12/sql-server-import-csv-file-into-database-table-using-ssis/
    in addition to ssis, you can also achieve the same thru bcp. check:
    http://databases.about.com/od/sqlserver/a/bcp.htm
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • PLEASE HELP!!!  Problem with Java and SQLServer Text data type

    Hi there,
    I have a java app. that reads from an MS SQLServer database. Originally, all long text fields were declared as NVARCHAR(200). The program worked fine.
    Someone then advised that I change all long text fields to the TEXT data type. The program now crashes out with the following Exception:
    "java.sql.SQLException: [JRun][SQLServer JDBC Driver]This ResultSet can not re-read row data for column 25."
    Basically, I have a method that retrieves a resulset and iterates through it. The resultset is passed to another method during each iteration. In the example below, the 'specialNote' field used to be NVARCHAR(200). The code worked fine. Then when it was changed to TEXT, the program no longer works with the above Exception thrown.
    Anyone know any special way SQLServer TEXT data types need to be handled?
    Thanks for any advice!
    The code looks something like this in functionality:
    <CODE>
    public void method1 (Connection conn)
    Resultset rs = conn.createStatement().executeQuery("SELECT * FROM ProductBB");
    while (rs.next())
    method2(rs);
    public void method2 (ResultSet rs)
    String str = rs.getString("specialNote");
    </CODE>

    Hi JWoods,
    Thanks for the suggestion. I originally had the code do what you suggested, ie, get the resultset then retrieve the data all within the same method. The data is then used to set properties in an object.
    When I had to create another method that also retrieved a resultset but using a different primary key, then also use the returned data to set the properties in the same type of object, I didn't want to repeat the setter code. That's why I decided to pass the resultsets to the same method that did the property setting.
    Unfortunately, it stopped working with the data type change.
    Any other thoughts?

  • How to Update Date data type field value in oracle

    I want to update records in a table that has a Date data type field. It's a oracle databse. I use the oracle thin drive to connect to the database. The everything works well, only when i try to update records that have date type value, something doesn't work.
    I use the following stmt to update DB:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Conn = DriverManager.getConnection("jdbc:oracle:thin:@hostname:portnumber:schname", "uid","pwd");
    stmt=Conn.createStatement();
    String updStr = "UPDATE Article SET Archive = ' Disable' WHERE ArticleDate = # " + sqlDate +"# " ;
    stmt.executeUpdate( updAStr ) ;
    But I always got the SQLException run time error, which is "ORA-00911: invalid character"
    Who can help me to find out how to write the above Update statement correctly? esp. that how to present the Date type variable in the statement.!
    BTW, sqlDate is a Java.sql.Date variable, Is it "# " + sqlDate + "# " the right way?
    Many thanks

    What do you get out of Oracle's TO_DATE that java.sql.PreparedStatement.setDate()
    won't give you? - MODWell, I don't know that I've used all capabilities of either, but when it comes to managing Date Strings my Oracle bias :) would be to code using Oracle's TO_CHAR and TO_DATE functions. Perhaps someone can tell me vendor neutral ways to do something simiilar to managing these input date/times (and hopefully just as easily, pretty much all done in a single line, single function)?
    WHERE aDATE > TO_DATE('2010','YYYY')
    WHERE aDATE > TO_DATE('2010 AUG 22','YYYY MMM DD')
    WHERE aDATE > TO_DATE( 'January 15, 1989, 11:00 A.M.', 'Month dd, YYYY, HH:MI A.M.')
    I believe most databases have something similar to this, although I have found Oracle's to be the most flexible and consistent, if not the most intuitive. Other vendors (DB2, SQL Server, Access) don't force you to always be explicit, and can accept a variety of date strings without masks. The problem is that while you might not be getting an error, it also may not be parsing your date as expected.
    One could argue that this vendor specific hodgepodge of literal date/time strings is only one program modification away from disaster. They might be right.
    Just to be clear. I'm not recommending using a vendor specific approach, but it's not a perfect world and somtimes you have to use what works easiest or best or fastest, and in some cases, that is the vendor specific alternatives.

  • Problem: load SQL Server 'varbinary' data

    Source database: SQL Server 2000
    OS: Windows 2003 (SP1)
    Oracle: 10g (R2)
    Datatype Mapping: SQL Server ‘varbinary(1000)’ to oracle ‘BLOB’
    With the help of OMWB, I created the oracle database schema for a SQL Server DB (offline capture). I have problems when I tried to populate the (destination) database with a table with ‘varbinary(1000)’ datatype:
    PlateX.expID (as on http://www.sdss.org.uk/mybestdr5/en/help/browser/description.asp?n=PlateX&t=U) and the with original data is like this: http://dsg.port.ac.uk/~hx/research/sdss/logs/SelectExpidFromPlatex
    The PLATEX.ctl file (generated by OMWB) is like this (http://dsg.port.ac.uk/~hx/research/sdss/logs/PLATEX.ctl):
    load data
    infile 'PLATEX.dat' "str '<er>'"
    into table PLATEX
    fields terminated by '<ec>'
    trailing nullcols
    <SKIP>
    EXPID)
    I failed to load the data with the sql_load_script.sh script, and the log file is like this:
    <SKIP>
    EXPID NEXT * CHARACTER
    Terminator string : '<ec>'
    value used for ROWS parameter changed from 64 to 12
    Record 1: Rejected - Error on table PLATEX, column EXPID.
    Field in data file exceeds maximum length
    <SKIP>
    Record 60: Rejected - Error on table PLATEX, column EXPID.
    Field in data file exceeds maximum length
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table PLATEX:
    9 Rows successfully loaded.
    51 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 238392 bytes(12 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 60
    Total logical records rejected: 51
    Total logical records discarded: 0
    Any help would be extremely appreciated.
    Helen
    P.S. previously, I mapped: SQL Server ‘varbinary(1000)’ to ‘RAW(1000)’ in Oracle but failed to populate the data (http://dsg.port.ac.uk/~hx/research/sdss/logs/PLATEX.log).

    Hi Emile,
    regading extracting data from MSSQL with OWB on Unix platform (using Generic Connectivity):
    Re: SQLServer access from AIX Warehouse builder
    Re: OWB on Solaris Connectivity with SQL SERVER on Windows
    We want to load aprox. 100 million records a day.
    I've read some articles about this and the advise was to dump the data from SQL Server to files and load the files with OWB.100 million records per day is not a problem for daily extracting from MSSQL Server if you have 1-2 hour.
    In my opinion dumping to text file is a bad practice and is unnecessary if customer don't have special requirements (for example for security reason).
    SQL Server source table and a Oracle target table without any difficult transformationsIn my opninion the best way process data from MSSQL is to extract data to staging area (schema) on Oracle DB with mappings as simple as possible (ONLY filters, without any join), and most of data processing prefom in Staging area or during moving from staging to DWH.
    Also look at OWB user guide (how to use Generic Connectivity in OWB)
    http://download.oracle.com/docs/cd/E11882_01/owb.112/e10582/loading_ms_data.htm#i1064950
    Regards,
    Oleg
    Edited by: added link to OWB doc with description of using Generic Connectivity

  • How to have a member formula to reference a text data type member?

    Hi there
    I am just wondering how do you use a member formula to grab the text in a text data type member?
    Our situation is that we have a text data type member in the Accounts dimension (called Project Manager). This is a free text field users can input a project manager's name. However, for our reporting purposes we want to report the Project Manager next to a list of Accounts (i.e. in the same row). The way we have tried to achieve this is to create dynamic calc text data type members in the Version dimension that simply refer to the Project Manager account using the reference function (->).
    Although this works, when we run a report we get a number (assuming this is just the reference ID to the RDBMS field) instead of the actual name. We have set the dynamic calc member to text data type as well. We are using a planning connection as well.
    Does anyone know how to make this work?
    Thanks

    Are you talking about FR reports, does it display the text if you reference the original member using a planning connection, if it does then it probably looks like you can't do it using the method you are trying as it is an essbase formula and in theory it will just return a number.
    Cheers
    John
    http://john-goodwin.blogspot.com

  • Using Calc Manager to update values for Members with Text Data Type

    Hi All,
    In my outline I have a member of text data type. The purpose is to allow users to be able to enter comments.
    Each line item is created through a business rule and I am prompting the user to enter the key values at the launch of the calc manager rules. I want to be able to prompt the user for the comments in the calc manager rule because I know that it supports variables of type string. However I am unable to assign this string variable directly to the member.
    I appreciate that essbase only stores numeric data and that all text data type members really store numeric values which are basically the id's of the text string stored in a relational table by planning. however I cannot update the database table through calc manager and then bring in the generated id. Is there any way I can do this?
    I don't want to skip this field in the calc manager rule and expect the user to enter the comments AFTER the line item has been created because the users want this to be a mandatory field and insist that a new line item not be created unless comments are specified.
    Many thanks in advance for any help I can get.
    Shehzad

    If the comments are a set definition you could you smart lists in your planning forms.
    create this in your smart list
    xxxx = 1
    yyyy = 2

Maybe you are looking for