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

Partition, what happens if the specified key range is shorter and longer

0 Answers   Cap Gemini,


i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 and even no.of recordds into t2. what is the procedure and whar t/r's are involved and what is the mapping flow

4 Answers   Wipro,


What is the difference between a router and a filter transformation?

1 Answers   TCS,


what is runtime variable?

3 Answers   TCS,


After draging the ports of three sources(sql server,oracle,informix) to a single source qualifier, can you map these three ports directly to target?

6 Answers  






case and like function in informtica (my source is XML). case when OS Like'%Windows%' and OS Like '%200%' then 'Windows 200' case when OS Like'%Windows%' and OS Like '%200%'and OS like '%64%' then 'windows 200 64 bit' etc.,,

1 Answers  


can you please explain me pre session and post session options?

3 Answers   BTBP,


WAT IS TEXT LOAD?

3 Answers   Wipro,


Any one can tell me how to explain puss-down optimization ? explain me with example plz?

1 Answers  


Consider two cases: (1) Power Center Server and Client on the same machine (2) Power Center Sever and Client on the different machines what is the basic difference in these two setups and which is recommended?

2 Answers  


what is rank and dense rank in informatica with any examples and give sql query for this both ranks

4 Answers  


what is the hint? how to use it to reduce the query processing in program?

3 Answers   Cegedim,


Categories