Oracle 11g- Straing behaviour of query after importing from Oracle 10g

Hi,
I have a table in Oracle 10g as follows:
Create Table xyz (col1 varchar2(50), col2 varchar2(50));
With following Data
Col1     Col2
A     320
A     110
A     290
A     380
B     ABC
B     256
B     LMN
I am running following Query
select * from xyz
Where Col1='A' and Col2=110
It works fine. But when I export this table and import it in Oracle 11g. It says invlid identifier.
But if I enclose 110 in single quotes. It works fine.
Also If I recreate this table in Oracle 11g like
Create table xyz1
as select * from xyz;
Now alos I am able to run this query smoothly.
select * from xyz1
Where Col1='A' and Col2=110
What is wrong exporting this table from 10g to 11g.
Any comments/suggestion??
Aarbi

The check in your where clause
Col2=110Is comparing a string (Col2 is defined as a VARCHAR) with a numeric literal, so there will be an implicit conversion taking place from character to number. The query then fails due to the B LMN row when 'LMN' fails number conversion.
I'm guessing there was there an index on the table in your 10g installation which would allow the query to be satisfied without checking the B ABC or B LMN rows but is not present or not used in the 11g installation so a full table scan results in an attempt to convert 'ABC' and 'LMN' to a number. Check the explain plans.
Or it could even just be a difference in the order in which the two conditions in the where clause are evaulated between the two versions.
The solution, as you have already found is to do a string comparision
Col2='110'Edited by: Cyn on Dec 7, 2009 12:38 PM

Similar Messages

  • Tns problem with Oracle 11g ODAC 11.1.0.6.21 with Oracle Developer Tools

    I installed the full
    Oracle 11g ODAC 11.1.0.6.21 with Oracle Developer Tools for Visual Studio
    now I am at the good old "[ORA-12154: TNS:could not resolve the connect identifier specified]" error.
    I copied the same tnsnames.ora as used on the db server
    onto the client "C:\Oracle\product\11.1.0\client_2\Network\Admin".
    The host name is right since a normal ping works. TNSping is not available.
    but I get the [ORA-12154: TNS:could not resolve the connect identifier specified] error.
    The listener is running and the instance as well since it all works on the source server.
    I tried it with
    SET path=c:\oracle\product\11.1.0\client_2\bin
    but tnsping is still not recognized.
    sqlplus works on the other hand when I set it to
    SET path=c:\oracle\product\11.1.0\client_2\
    what is going on...

    hey
    u can post your query here, and i think everyone here is to share opinion so do not hesitate to do so and please try to google before posting here,
    and we know no one is expert like some people saying 'boring questions' you just try to overcome your problem and you will definitly get your problem solved .
    some mpeople ar still there who answeres hopeless questions and say nothing about them but when a fresher askin a qustion is not tolarated by them they think everyone is born DBA here
    they always tend to discouraging people here on forums,and i think they are vvolunteers to reduce crowd here on forums, inspite of there experience and people respect them they can not control their anger
    so please post you tns here, i think there are ways to ask people to google and search docs first, but not like this
    thanks and regards
    VD
    Edited by: vikrant dixit on Jun 29, 2009 4:33 AM

  • How to know query is fired from Oracle froms or Reports

    Hi,
    I am using oracle database 11g Release 2.
    I use oracle enterprise manager to find which query requires more time to execute but how can i find which user is firing this query and this query is fired from oracle form or from oracle reports.
    Database: 11g R2
    O.S: Windows 7 professional
    Forms & reports : 11.1.2
    Need Help..

    But how can i frind the query is run by user is from oracle forms or from oracle reports.
    How can i get the name of form or report from where user is running.did you read the document about v$session attached in the other post?
    You have the answer there.
    If you want the exactly query, this is not the place. We try to help, not do your job.

  • Oracle Online Library's dmp cannot be imported to Designer 10g

    I am member of Oracle Online Libray. I have studied the module "Oracle9i Designer New Features".
    I download the zip file "Des9iNFeClassSetup.zip" and unzip the files.
    I follow th instruction to import dmp file "nfRepository.dmp" but I encounter the following error after I import the dmp file:
    RME-02105 Oracle error occurred
    ORA-01986: OPTIMIZER_GOAL is obsolete
    Any help is appreciated.

    I tried to import the dmp file to Designer 9i Version 9.0.2.91.9 Release 9.0.2.4 and the import is successful after enabling Version Support.
    I did the same using Designer 10g but with the import error.
    I am going to export the repository from Designer 9i after import from the dmp file and see if the re-export dmp file can be imported into Designer 10g.

  • All clips missing after import from camcorder!

    All clips are missing after import from camcorder - Canon ZR20.  For some tapes all clips are there, for others there are none.  All the files are there in the finder, but I don't know how to have them show up in Final Cut Pro X.
    Any suggestions?

    Ok - this is frustrating.  I have been importing my old miniDV tapes again into FCPX as I wasn't able to transfer all of these projects from iMovie - don't get me started...  After importing about 7 of the tapes the first 3 came in fine, but the last 4 didn't have any clips as I said in my original posting.  Now after restarting FCPX a couple of times all of a sudden the clips are all coming in!  Strange!  Guess I'm OK now.

  • Need sql query to import from excel sheet

    Hey , i need sql query to import from excel sheet.
    i work in a company where i need to daily update the data from excel sheet.
    if i get a shortcut method i ill be very thank full to you guys to reduce my work upto 10 %.

    any query which can inert from excel file?
    Sort of. Certainly not anything as simple as what you seem to hope for. Check out this very good PHP class:
    PHPExcel - Home

  • Merge JPEG and RAW after import from iPhoto

    Hi,
    camera is set to shoot JPEG + RAW, iPhoto manages after import from camera as two separate files.
    I want to transition from iPhoto to Aperture.
    After importing from iPhoto into Aperture, is there any chance to merge the files in a way similar to how Aperture merges jpeg + raw when importing directly from camera?
    Thx
    Axel

    When I click on Faces, it's empty, the import from iPhoto forget to import faces?
    Hello Kris,
    How did you imort from iPhoto? If you import using the Aperture Apllication menu
         File -> Import -> iPh.oto Library
    then all your Faces should be transferred from iPhoto.
    Which of the two buttons in Aperture do you use to show your "Faces"? There is the "Faces" button in the Library panel and the "Faces" Button in the Toolbar. Both behave differently. The "Faces" button in the Library panel  will reveal all faces, whereas the "Faces" Button in the Toolbar will only show the faces detected in the in the currently selected item (folder, project). So it may appear that faces are missing, even if they are included in the Aperture Library.
    Regards
    Léonie

  • Oracle 11g database can we update patch directly from 11.2.0.3.0 to 11.2.0.4.0?

    Hi,
    I have installed Oracle 11g database.
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    I want to update the patch.
    Oracle 11g database can we update patch directly from 11.2.0.3.0 to 11.2.0.4.0?
    Is any impact on the database?
    Kindly suggest,
    Regards,
    Sachin

    11.2.0.4 is nothing but a patchset of 11.2.0.3, in-place upgrade is allowed :
    http://docs.oracle.com/cd/E11882_01/server.112/e23633/preup.htm#UPGRD12370
    "You cannot install the new software into the same location for Oracle home as your current release, unless you are installing an Oracle Database 11g patchset release. For a patchset release, you can use the same Oracle Database 11g Oracle home."
    And since it's a patchset, a direct upgrade is ok.
    Lastly, yes, every upgrade has an impact (e.g. perf.), it has to be tested.
    Nicolas.

  • How do I delete the media after import from camera?

    How do I delete the media after import from camera?

    The usual procedure with video is you backup the card contents onto an archive drive. You import from the archive drive making a copy (professionals on set make two copies), and once the backups and import are verified, the card is reformatted in the camera.

  • How to Export after import from minidv?

    How do you export after importing from a minidv source?
    My movie is in the Event Libary > 2008 however I can't figure out how to export it now.

    export back to tape? not supported any more with vers7/iMovie08 anymore..
    you can only export Projects.. drag your clips into a Project..
    http://www.apple.com/ilife/tutorials/#imovie
    http://manuals.info.apple.com/en/iMovie08_GettingStarted.pdf

  • After import from dump, i must provide user in order to access tables

    Hello,
    I fully imported to oracle enterpirze 11.2.0.1.0, a dmp file extracted from oracle 9.2 DB.
    I performed the import logged in as sys as sysbba.
    After an initial error of 'missing user' (sth like that), I created also a user like the one I wanted to import and then the import was succesful (with a few errors)
    After the import I can see all the tables. Thw owner of the tables (checked from all_all_tables) is the schema I created, but i cannot perform a simple select neither from the sys or from the new schema, unless i provide the schema name.
    For example:
    "select * from mytable" is not working,
    I have to query:
    "select * from schema_name.mytable"
    Why did this happen? Can it be corrected?

    in few words what was done:
    - export schema from 9 user A
    - create user B in 11
    - import dump of schema A into new created schema B
    then you connected to 11g as user B and tried to query it's schema
    Am I right?
    With which instrument have you performed exp/imp? Can you provide exact commands?

  • Problem after upgradation from Oracle 8.1.7 to Oracle 9i

    Hello ,
    I currently installed Oracle 9i, and i m using Mapx 4.5,
    and in the executable I am adding serverlayer
    (a layer formed by querying the geoloc column from oracle
    table), which was working fine with Oracle 8.1.7, but after
    installation of Oracle 9i , i encounter the following error
    while adding a serverlayer
    ORA-13373 Element of type Extent is not supported for Geodetic
    data
    Cause: Element type extent for a polygon geometry is not
    supported for
    geodetic data.
    Action: Convert the extent type polygon to a regular 5 point
    polygon
    and set
    etype accordingly.
    ORA-06512 at string line string
    Cause: Backtrace message as the stack is unwound by unhandled
    exceptions.
    Action: Fix the problem causing the exception or write an
    exception
    handler
    for this condition. Or you may need to contact your application
    administrator or database administrator
    Can anybody tell me what's going wrong ?
    As I urgently got to fix it.
    Thanks in advance
    Binoy.

    Hi,
    Oracle9i has a geodetic data model. Your data has a geodetic
    srid, which means that the data will need to conform to the rules
    associated with geodetic data. These rules include:
    No optimized rectangles are supported (my guess is the app is
    using an optimized rectangle as a query window, but the data
    could be the issue also).
    No arcs or circle types are supported.
    A single line segment cannot be equal to or greater than 1/2 the
    great circle distance.
    A polygon cannot have an area equal to or greater than 1/2 the
    surface area of the earth.
    You should try to find what version of Mapx supports Oracle9i.
    Regards,
    dan

  • Error while table Import from Oracle (OBIEE server 64bit & Client 32bit)

    Hi All,
    Problem : ODBC/OCI Connectivity Issue between OBIEE 11.1.1.6.2 BP1 (64-bit) server and OBIEE 11.1.1.6.2 BP1 Client (32-bit) local machine.
    We have an OBIEE 11.1.1.6.2 BP1(64-bit) setup on a 64-bit ‘Windows Server 2008 R2 Enterprise’ machine.
    OBIEE dev team members have 32-bit local machines.
    OBIEE “Admin team member” (who will work on RPD) has OBIEE 11g client (BP1) installed on their *32-bit local machine*(which is common client software for 32/64 bit.)
    Now, two ODBC connections were created on this 32-bit local Client machine, with OBIEE 11g client installed on it.
    One with “BI server driver” for connection to OBIEE server machine(64-bit) to open RPD and other with “Oracle database driver” to connect to the Oracle database on 64-bit machine, to import tables.
    With this setup done, I am able to open the RPD in online mode and view the existing sampleapp related objects present in it.
    But when I try to import metadata from OBIEE client admin tool using OCI or ODBC, it gives an error that “Connection fails! “
    I have the required tns entry in my tnsnames.ora file and I am able to connect to this database from the local client machine, using sqlplus.
    Kindly let me know if there are any restrictions in using this type of a setup combination of 32-bit and 64-bit machines for OBIEE 11.1.1.6.2 BP1 setup.
    If not then, what steps are to be followed to do the setup btw 64-bit OBIEE server and 32-bit OBIEE client to make table import working.

    Hi Veeravalli.. Thanks for your response.
    I have my tns file residing in both the location you mentioned on the server machine. (64-bit)
    •     {Oracle_BI1}\network\admin directory
    •     {oracle_common}\network\admin directory
    And also in the below Oracle_home path of oracle_client in the local machine. (32-bit, Oracle 11g R2 database client)
    •     {oracle_Home}\product\11.2.0\client_1\network\admin
    Also, I have used the full expanded tnsnames as you mentioned. Still issue persists.
    When I use , “DataDirect 6.0 ODBC Oracle Wire Protocol” driver, for creating the system DSN and try to import tables from OBIEE client admin tool on local client machine, the connection happens and table list comes up, but it’s an SAP product and hence it throws a msg to purchase the tool to go further with table import.
    I am wondering if I any other configuration steps need to be carried out, with the ODBC/OCI set up between 64-bit OBIEE server and 32-bit OBIEE client.
    Also, the source database that I am trying to connect to is yet again on a 64-bit machine(Oracle 11g R2).
    Please suggest.

  • Access violation after changing from OCCI 10g to OCCI 11g

    I am moving my program from OCCI 10g and Visual Studio 2005 (VC8) to OCCI 11g and Visual Studio 2008 (VC9). I have downloaded the new instant client and SDK files (11.2.0.1), and everything builds OK. Using OCCI 11g, my program can write a spatial table to our Oracle Spatial 10g database, but when I try to read the data back, I get an access violation reading a spatial object (SDO_GEOMETRY). I am able to read the spatial table I created using OCCI 11g successfully using an earlier version of my application that uses Instant Client 10g.
    I used OTT from 10g to create the class that wraps SDO_GEOMETRY. I tried generating new code from OTT in 11g, but the result matched the code generated in 10g.
    The crash happens in a call to oracle::occi::ResultSet::GetObject(), and the top method in the call stack that has source code is:
    // Note: this is part of the object wrapper generated by OTT.
    void SdoGeometryBase::readSQL(void ctxOCCI_)
    SdoGeometryBase *objOCCI_ = new(ctxOCCI_) SdoGeometryBase(ctxOCCI_);
    oracle::occi::AnyData streamOCCI_(ctxOCCI_); <--- Access violation happens on this call.
    This happens on the first attempt to read an SDO_GEOMETRY object.
    Has anyone run into a similar problem?
    Thanks,
    Bob

    I am bumping this thread in hopes that someone might have run into this same problem or be able to give me some suggestions as to how to go about solving it. My program can connect to the database and query the list of tables or other non-spatial data, but when I try to read an SDO_GEOMETRY object I get the crash described below. The crash happens on both Windows XP and Windows 7. As far as I can tell, I am using the latest instant client and SDK files for Oracle 11g.
    Were there any changes between 10g and 11g that would force me to change my code?
    Thanks,
    Bob

  • Hebrew Characters...Chars display as junk after import from 8i to 10g

    Gurus,
    I have a problem with a customer upgrade...
    Background of the issue... the customer is an Agile PLM customer of version 8.5 (Agile PLM version 8.5). The database was hosted on oracle 8i. He is intending to upgrade from Agile 8.5 to Agile 9.2.2.4. During this process he has upgraded he db from Agile 8.5 to Agile 9.2.2.4, and has also shifted the DB platform from 8i to 10g.
    Problem: There were hebrew characters entered in Varchar2 columns (Oracle 8i), which after upgrade are not displaying correctly. Newly entered hebrew characters after upgrade display correctly in UI...
    Customer DB Parameters : The nls parameters on the source db before upgrade(8i) are American_America.WE8ISO8859P1, and the destination db parameters are American_America.UTF8.
    What i have done to deal with the issue: i have tried exporting the db using UTF8 and importing the db to 10g on UTF8, but still the characters show as garble characters..., have tried various options of exporting/importing using the combinations of WE8ISO8859P1 char set as well as IW8ISO8859P8 charsets, as i have learnt during my research abt the charsets that Hebrew Characters are supported in IW8ISO8859P8 charset and not WE8ISO8859P1. My suspicion here is that the problem is with the export and import from 8i to 10g, and the Char conversion which is happening during this process..(this is my guess and i might be wrong tooo...)
    Currently this is a hot issue with the customer, and needs an immediate fix (to display the Hebrew characters properly after upgrade)
    I am a layman on the NLS Settings and couldnt figure out what else to do....I would request all the Gurus out there to help us figure out the problem and try resolve it...
    Thanks for your Help in Advance
    Regards,
    Raja.

    Hebrew characters aren't supported using the ISO 8859-1 character set. In the original system, what must be happening is that the NLS_LANG on the client matches the database character set, which tells the Oracle client not to do character set conversion. This causes Oracle to treat character data just as a binary data stream and to store whatever bits the client sends. So long as the client is really sending ISO 8859-8 data, telling Oracle it is ISO 8859-1, and on the return side asking Oracle for ISO 8859-1 and treating it internally as ISO 8859-8 while Oracle is doing no character set conversions, this will appear to work. But the data in the database is fundamentally wrong. You can configure things so that you can, apparently, store Chinese data in a US7ASCII database using this sort of approach, but you end up with screwed up data.
    This sort of problem usually comes to light when you start using tools (like export) that don't know how to mis-identify the data they are sending and retrieving like your application is doing or when character set conversion is necessary. Since the data in the database isn't valid ISO 8859-1, Oracle has no idea how to translate it to UTF8 properly.
    As previously suggested, the safest option is to move the data with a solution that replicates the behavior of the application. So
    - Set the client NLS_LANG to match the database character set (WE8ISO8859P1)
    - Extract the data to a flat file using SQL*Plus or a C/C++ application
    - This data file will, presumably, really be ISO 8859-8 encoded
    - Use SQL*Loader to load the data into the UTF8 database, specifying the actual character set (ISO 8859-8) in the control file.
    If you're rather more adventurous and working with Oracle Support, it is potentially possible to change the character set of the source database from ISO 8859-1 to ISO 8859-8 and then export and import will work properly. But this would require some undocumented options that shouldn't be used without Oracle Support being involved and introduces a number of risks that the flat file option avoids.
    Justin

Maybe you are looking for

  • Lumia 900 - My view

    Hello all, so after long debate I had finally decided to upgrade my Nokia N8 (Brilliant phone) I now own a Nokia Lumia 900 - white. I don't want to start of like most do on forums with problems here and there but a nice list of nice features I have c

  • Vendor Invoice verification  payment terms

    Hi Experts, PO is having one item with Gross price,freight . Freight vendor is different from main vendor. Main vendor-PAYMENT TERMS-1% discount- 5 days Freight vendor--PAYMENT TERMS- pay immidiatly After making GRN and when i tried to post invoice i

  • Export to PDF with Options

    Hi, I would like to export the active document to PDF with options [Standard options] using vbscript. Is there any sample or references for this? Thanks, Shailesh

  • ADF Javascript error in MS IE v 8.0.6001.18702

    Hi, I'm using jdeveloper v11.1.2.0.0. I have a login page with language, username, password fields. Language is af:selectonechoice and is using ppr to re-render the page on language change. It's working fine with FireFox 4 and chrome. But when I open

  • Missing Deployment Descriptor

    Hi.. have a little Web-Project (in Eclipse with Sun Application Server 9.1_01) for Persistence i Use Toplink. All work fine, until i change a jsp for example and eclipse do a redeploy. After this Redoploy i got the following error: [#|2008-03-03T16:3