I need an oracle query for convert Char to Integer?. Can any
one help me how to do this?

Answers were Sorted based on User's Feedback



I need an oracle query for convert Char to Integer?. Can any one help me how to do this?..

Answer / rr

select to_number('5672345') from dual

Is This Answer Correct ?    4 Yes 0 No

I need an oracle query for convert Char to Integer?. Can any one help me how to do this?..

Answer / moorthy g

Hi Jey,

Please see the below procedures (integer to varchar or char).
SQL> CREATE TABLE DEPT1 AS SELECT *FROM DEPT
SQL> Truncate table dept1;
SQL> alter table dept1 modify(deptno varchar2(20));
SQL>insert into dept1 select *from dept;
SQL> SELECT *FROM DEPT1

Note:
1. If you want to modify in information please the load type
truncate load or not. (May it will be truncate load only)

Best Regards,
Moorthy. G

Is This Answer Correct ?    1 Yes 1 No

I need an oracle query for convert Char to Integer?. Can any one help me how to do this?..

Answer / ankit kansal

First of all Oracle supports implicit conversion between char to number if the specified text is of number type only.
*********************************************
Lets say sql>select '111'+1 as ans from dual;
ans
---
112
*********************************************
Here, 112 is the output you received it does not matter '112' as string.
But For precautions you can write your query as
***********************************************
sql>select to_number(trim('111'))+1 from dual;
***********************************************

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

What are the different options available for update strategy?

1 Answers  


what is correlated query?

2 Answers   IBM,


how we can load rejected record's at run time?(not through bad files)

1 Answers   TCS,


What are the phases in SDLC?

3 Answers  


Do you have knowledge in ralph kimball methodology

1 Answers  


is it reqire primary key and foreign key relation ship to join relational databases?if yes? explain?

3 Answers   IBM,


What is the need of etl tools?

1 Answers  


Can we use the mapping parameters or variables created in one mapping into another mapping?

1 Answers   Informatica,


How to eliminate duplicates in FF and oracle both

3 Answers   CSC,


Whatis the difference between View and Materialized View ?

11 Answers   Satyam, Syntel,


i have one table like cust_id ph1 ph2 ph3 1002 9290123526 97671927210 9876545232 we use Normalizer wt is o/p? sue normalizer we can generate three tables in single table/

4 Answers  


How many mapplets u have created? and what is the logic used

5 Answers   Mind Tree,


Categories