1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

How do i compare NUMBER to VARCHAR?

Discussion in 'SQL - Questions and Answers' started by Thomas Schenkeli, Dec 13, 2006.

  1. Dialect: Oracle
    I have to fields with numeric values that i want to compare, however one of this fields has not been declared as number but as varchar, what do i have to do?
  2. EvilOverlord New Member

    Use the CONVERT command:
    SQL:

    where mynumber = CONVERT(int,mycharacters)
  3. Unregistered Guest

    Hi

    you can use function to_number to convert varchar to number

    hope this works

    regds
    Ankur

Share This Page