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 is correlated query?

2 Answers   IBM,


I have 100 records in source table, but I want to load 1, 5,10,15,20…..100 into target table. How can I do this? Explain in detailed mapping flow.

0 Answers  


What is standalone command task?

0 Answers  


What is meant by incremental aggregation?

0 Answers  


why u go for dimensions ?

3 Answers   TCS,






why union transformation is active transformation?

6 Answers   IndiGo, TCS,


Can you use one mapping to populate two tables in different schemas

2 Answers  


what is shortcut in informatica? difference between shortcut,reusable object?

2 Answers   Virtusa,


in reporting we add some new objects,how we get the count of the newly added objects to the report

0 Answers   HP,


What is the exact difference b/w IN and EXIST in Oracle..?

4 Answers   Wipro,


Hi all,Can any one provide me Informatica Designer Certification dumps.I need all three papers dumps.If any one has these dumps then plz send it on this id:- nagesh.jujjuru@yahoo.com Thanks in advance

1 Answers  


Hi 2 every one. i dont have real time experience, and please suggest me for following questions. a) we get the source data from what type of source systems? b) In banking domain project what are the FACT & DIMENTION tables please list out them? c) please write some colomn names in a table? Please reply for aboue questions?..... Thanks in advance.

1 Answers   Amdocs,


Categories