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

Mention few power centre client applications with their basic purpose?

0 Answers  


Issue with Update override at Target table in Informatica.

2 Answers  


How to create the source and target database connections in server manager?

0 Answers   Informatica,


Differences between connected and unconnected lookup?

0 Answers  


how to load dimension table and fact table. plz tell me the steps.

0 Answers   Cognizant, IBM,


In informatics server which files are created during the session rums?

0 Answers  


How you prepared reports for OLAP?

0 Answers  


difference between top down(w.h inmon)and bottom up(ralph kimball)approach?

2 Answers   PayPal,


connected and unconnected lookups?

4 Answers  


I have three same source structure tables. But, I want to load into single target table. How do I do this? Explain in detail through mapping flow.

0 Answers  


what are the difference between Informatica 7.1 and 8.1?

6 Answers  


What is target designer and target load order?

0 Answers  


Categories