I want to display the values that are between 0 and 10 and dont exist in the current table
For example :
Field 1 2 3 5 9 8
Result expected:
7 4
The problem is that the column field
is a varchar
, so i have first convert to number and then make the validations
SELECT TO_NUMBER(yy.ent_sub_dealer_code,'9') FROM a_entidades yy
where TO_NUMBER(yy.ent_sub_dealer_code,'9') not in (SELECT LEVEL n
FROM DUAL
CONNECT BY LEVEL <= 9 )
Any suggestions?