To_char in 10g and 11g

Hi I am running a select query with to_char conversion in the where field but it is not giving any output even though there are rows for the specified value. to do with itBut I am getting output in 11g..Does characterset has anything

You've defined the column as a CHAR.  That would make it a fixed-width column.  The value '2' inserted would have two blanks appended (rpadded) to it.  So, the resulting string cannot be compared to '2'.
Use VARCHAR2.
See the demo.  Note the difference in the number of characters stored (VSIZE):
SQL> create table hkc_test_10 (id char(3));
Table created.
SQL> insert into hkc_Test_10 values ('2');
1 row created.
SQL> select vsize(id) from hkc_Test_10;
VSIZE(ID)
         3
1 row selected.
SQL> create table hkc_test_11 (id varchar2(3));
Table created.
SQL> insert into hkc_test_11 values ('2');
1 row created.
SQL> select vsize(id) from hkc_test_11;
VSIZE(ID)
         1
1 row selected.
SQL> select * from hkc_test_11 where id = to_char(2);
ID
2
1 row selected.
SQL> select * from hkc_test_11 where id = to_char(002);
ID
2
1 row selected.
SQL>
Hemant K Chitale

Similar Messages

  • Difference in select for update of - in Oracle Database 10g and 11g

    Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
    DECLARE
      v_ename bonus.ename%TYPE;
    BEGIN
      SELECT b.ename
        INTO v_ename
        FROM bonus b
        JOIN emp e ON b.ename = e.ename
        JOIN dept d ON d.deptno = e.deptno
       WHERE b.ename = 'Scott'
         FOR UPDATE OF b.ename;
    END;
    /While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
    Edited by: Libor Nenadál on 29.4.2010 21:46
    It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11g

    The behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).

  • How to Install oracle 10g and 11g on aix 6.1

    Can we install oracle 10g and 11g Enterprise Editions on IBM aix 6.1 ? If so how
    Chetan
    Edited by: chetan0926 on Jan 11, 2012 2:56 AM

    Hi;
    Can we install oracle 10g and 11g Enterprise Editions on IBM aix 6.1 ? If so how Yes you can,both version is certified
    I agree Sybrand, Please check installation guide. All your questions will be answered in it
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage
    Also see:
    Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
    Regard
    Helios

  • Differences between Oracle Discoverer  10g and 11g .

    we would like to know if they are any differences between Oracle Discoverer 10g and 11g and any issues with 10g that are overcome in 11g.
    Please make us aware of any merits in going for 11g over 10g.
    apps version 11.5.10.2
    Regards

    Please see these links for the list of new features, bug fixes, certification, and installation of Discoverer 11g on 11i instance.
    Discoverer 11.1.1.4 Certified with E-Business Suite
    http://blogs.oracle.com/stevenChan/2011/02/discoverer_11114_ebs.html
    EBS Sysadmin Primer: Oracle BI Discoverer 11gR1
    http://blogs.oracle.com/stevenChan/2010/08/discoverer_11gr1_primer.html
    Oracle Business Intelligence Discoverer 11g
    http://www.oracle.com/technetwork/developer-tools/discoverer/overview/index.html
    Oracle Business Intelligence Discoverer 11g documentation
    http://www.oracle.com/technetwork/developer-tools/discoverer/documentation/index.html
    Thanks,
    Hussein

  • Important differences between oracle 10g and 11g

    Hi friends, can anyone tell me (pointwise) what are the major (and minor) differences between Oracle 10g and 11g.
    Please point me to some documents if possible.
    Thanks in advance

    The name of the link says it all: "top_features."
    In short it is Oracle's list of what they have for marketing and sales reasons designated "top features."
    It is not intended to be, and is not, a complete list of features. Often the features Oracle does not
    talk about are the most important.
    Let me give you some examples. I have never seen Oracle announce DBMS_XPLAN as a new feature
    yet you should not run an explain plan without it. Neither have I ever seen Oracle announce the new
    NO_DATA_NEEDED predefined exception. I have listed literally hundreds of new features you will not
    find in Oracle's new features docs.
    I did a presentation at OpenWorld this year as part of the unconference titled "New Features in
    Database 11gR2 that Oracle will not announce." It was easy to prepare a one hour presentation with
    little fear of being proved incorrect. As I turned out only one of the features I presented was mentioned
    by Oracle.
    You can find the presentation slides here:
    http://www.morganslibrary.org/pres/oow09_ucnf.pdf

  • Running Oracle database 10g and 11g on same 5 RAC nodes

    Hello Gurus,
    Could any body throw light if I can install and sucessfully run Oracle database 10g and 11g on the same Oracle RAC installation setup.My setup is below
    Number of nodes-5
    OS- windows 2003 or RHEL5
    storage- DELL EMC SAN
    Clusterware- oracle version11g
    File system-Automatic storage management(ASM)
    After I successfully setup clusterware,ASM on the nodes,I would want to install 11g database on all 5 nodes .
    Then Install 10g database on only 3 of the nodes using the same clusterware.
    What are your views on the same.
    Also FYI... as per metalink node 220970.1(RAC: Frequently Asked Questions) one can do such a setup.
    what iam looking for is practical experience if anyone has implemented this in production system,if yes any issues faced and how tough it is to support.
    Thanks,
    Imtiyaz

    You could run an 11g database and 10g database on the same cluster as long as you use Clusterware 11g.
    The administration aspect will drastically change according to the platform you run on. As of now, it appears you don't know whether it will be Linux or Windows.
    It would be practical to support the same database release.

  • Difference between Materialised view in 10g and 11g

    Hi,
    I am beginner . I want to know the difference between Materialized view between 10g and 11g. Is there any impact if the materialized view used in 10g gets upgraded to 11g ?
    awaiting ur response.Please and Thanks

    In addition to the documentation, you might want to look at the blog of Alberto Dell'Era:
    http://www.adellera.it/blog/
    Alberto writes quite a bit about materialized views, including this important change in 11GR2:
    http://www.adellera.it/blog/2009/11/03/11gr2-materialized-view-logs-changes/

  • Difference between oracle bpm 10g and 11g

    Newbie: I am trying to understand 10g. The basic questions I have is
    1)What is the difference between 10g and 11g?
    2)What is the infrastructure & skillset needed for me to do implementation in 10g?
    3)How is migration from 10g to 11g is accomplished?
    Any resource links that would help me to get started with 10g would be appreciated.
    Chaitanya

    Hi,
    Please follow the below mentioned link to find your answer.
    Re: Main differences between oracle bpm 10.3 vs 11g
    Migration from ALBPM 5.7 to BPM 11g
    Bibhu

  • Diff between oracle 10g and 11g

    Can any one could tell me what is the main diff between oracle 10g and 11g ?
    Thanks in Advance
    Venkat

    Hi,
    You can read
    http://www.oracle.com/technetwork/articles/sql/index-082320.html
    http://www.oracle.com/technetwork/articles/sql/index-099021.html
    Anand

  • Difference-  Architenture of 10g  and 11g

    Hi All,
    Pls just let me know is ther any huge difference between architecture of Oracle 10g and 11g ?.
    Kindly suggest in very brief or just yes/no.
    Thanks,

    Nimish Garg wrote:
    There r no major difference b/w 10g & 11g Architecture
    check this link out for new features of 11g
    http://www.dba-oracle.com/oracle11g/oracle_11g_new_features.htm
    I'm sure I've mentioned before about being careful when using that site to demonstrate answers. It's notoriously lacking information and only gives partial answers, mainly because it's trying to get people to purchase the books it sells for complete answers.
    Far better would be to link to Oracle's own resources... e.g.
    http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/index.html

  • Oracle 10g and 11G on RHEL 6

    Hi,
    Is it fine to install oracle 10g and 11g on RHEL 6?
    Please guide!!
    thanks

    Hi;
    Is it fine to install oracle 10g and 11g on RHEL 6?Its not certified as mention. But if you want to make installation on that release see Tim's site:
    http://www.oracle-base.com/blog/2011/02/13/oracle-11gr2-on-oracle-linux-6/
    Regard
    Helios

  • Diffrence between OBIEE 10g and 11g Architecture

    Hi
    Please help me by providing either the differences between the OBIEE 10g and 11g Architecture or a pointer/link.
    Thanks

    Hi,
    There are some!!
    Check here;
    http://www.rittmanmead.com/obiee11g/
    http://www.biconsultinggroup.com/images/VideoAlbum/WhitePapersFAQ10-31-10.pdf
    http://blogs.oracle.com/robreynolds/2010/12/security_in_obiee_11g_part_1.html
    http://blogs.oracle.com/robreynolds/2010/12/security_in_obiee_11g_part_2.html
    This will give an indication of all the changes.
    Cheers,
    Daan Bakboord
    http://obibb.wordpress.com

  • Golden Gate 32bit for Oracle 10g and 11g

    Does oracle released Golden Gate 32bit for Oracle 10g and 11g, i could not able to find out 32bit http://edelivery.oracle.com or OTN.
    Thanks

    never mind, i was able to download from e-delivery.

  • Installing oracle 10g and 11g client  on the same Linux RHEL 5.4 host

    Is it possible to install Oracle 10g and 11g client on the same Linux RHEL 5.4 host and have the application switch between 10g and 11g? and how would the 10g and 11g be installed?

    Thanks for your reply.
    Typeically if 10g is installed in /home/roacle/product/10.2.0, are you saying that for 11g, it would be /home/oracle/product/11.0.0 ?
    How about switching the application? Does changing the ORACLE_HOME and PATH environment variable setting enough ? Let's say from
    ORACLE_HOME=/home/oracle/product/10.2.0/client_1 to /home/oracle/product/11.0.0/client_1

  • Oracle 10g and 11g April PSU

    Hi,
    Can you please tell when Oracle releases April 2013 PSU for 10g and 11g databases?
    Thanks,
    ...

    Released last week.
    *Patch Set Update and Critical Patch Update April 2013 Availability Document [ID 1525152.1]*

Maybe you are looking for

  • How to crate a page template for multiple page instances?

    Hello, When I use the Administration Portal to create a page with portlets in the Portal Resource Library, I can choose to use that page it in my portal. The problem is that I can use it only once. How can I crate a page template with portlets so I c

  • Problems with java interface on my website.

    I have a website (a BluDomain site) that I used to be able to upload photos to an image gallery for clients to view and purchase. At the control page, I believe it's java based...when the page opens, the little java wheel spins and then the windows r

  • Freezing problems with brand new Toshiba P500.

    Hi All; I bought a brand new Toshiba Laptop from Myers Melbourne in June 2010 and its running the base version of WINDOWS-7 64 bit. Its a Satellite P500 PSPGSA-01G003 ( large 18.4 inch screen ) which "does not exist" in the model product listing on t

  • Help with Update Query -

    I am trying to run the following update query: update emp set emp.COMM = 500 where emp.deptno = (select dept.deptno from dept where dept.loc = 'BOSTON' or dept.loc ='NEW YORK') SQL/Navigator returns: ORA-01427 - Single Row Subquerty Returns More than

  • Computer won't restart!

    For some reason after doing an update last night, my computer won't restart. I did 3 updates, one for iTunes, one that said "Pro Support for QuickTime" I think, and a 3rd one that I really don't remember. Here's a detail of what happened: 1. Did the