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

suppose if we have dublicate records in a table temp n now i want to pass unique values to t1 n dublicat values to t2 in single mapping?how

4 Answers   CTS,


What is native users?

0 Answers  


Does Facttable Normalized or Denormalized?

2 Answers   IBM,


What is status code?

2 Answers  


my source contain data like this cno cname sal 100 rama@gmail.com 1000 200 karuna@yahoo.com 2000 i want load my data to the target is cno cname sal 100 rama 1000 200 karuna 2000 plz send the answer

5 Answers   IBM, TCS,






Please let me know how to make encryption and decryption with example?

0 Answers  


What is union transformation?

0 Answers  


Hi, Can someone send me the DWH and Informatica FAQ's at vanibv6@gmail.com Thanks in Advance, Vani

2 Answers   Wipro,


What is a parameter When and where do you them when does the value will be created

0 Answers  


what is the logic will you implement to laod the data in to one factv from 'n' number of dimension?

3 Answers  


How do you use reject loader.

0 Answers  


lookup is passive y can't it be active? let us say i have some records in my source like 101,rohit,1000 101,rohit,1000 102,kumar,2000 like wise now as it is having multiple matches i return only first,last value it can't return bouth the values that means lookup is acting as select distinct right by default what means it is active?

5 Answers   IBM,


Categories