Re: to_number

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: Sun, 8 Oct 2000 21:35:08 -0700
Message-ID: <su2if53r575i64_at_corp.supernews.com>


"r_hao" <r_hao_at_hotmail.com> wrote in message news:8rr88a$dp3$1_at_slb3.atl.mindspring.net...
> Thank you Matt;
>
> My query is
>
> select emp_id
> from employee
> where emp_id in
> (select emp_id
> from job_title
> where to_number(job_level) > 10);
>
> I can run 'select emp_id from job_title where to_number(job_level) > 10'.
> However, I did not check all the rows. Maybe there is a row contains char.
> I'll check it.

Hmmmm...if you can run the "inner" query fine, I would think it's OK.

However, if it bombs out only when it's nested with the other query, I'd then check to make sure EMP_ID in EMPLOYEE and in EMP_ID in JOB_TITLE are the same datatype. If one of them is a CHAR or VARCHAR2 and the other is a NUMBER, the existence of something other than 0 through 9 will cause the invalid_number error.

-Matt Received on Mon Oct 09 2000 - 06:35:08 CEST

Original text of this message