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 meant by lookup caches?

2 Answers   Cap Gemini, Informatica,


HOW TO YOU LOAD TIME DIMENSION

1 Answers  


Suppose we have a csv file with contents as below which is used has a source file. C1,C2,C3,C4 100,200,A B,300 200,400,X,Y,299 ---> it should be 4 values but by mistake 300,600,C D,566 with a comma in between X & Y,its 5. My target takes only 4 columns, How to take care of the 2 record as above without rejecting it and loading in the target. Hope u guys have understood my scenerio

4 Answers   IBM,


In operator is used in which transformation in informatica 8.6.0

5 Answers   Virtusa,


what is worklet and what use of worklet and in which situation we can use it?

4 Answers   Patni, TCS,






In dimension and fact table? which one holds big data?

2 Answers  


in my source table i want to delete first and last records and load in between records into target? how can it possible?

3 Answers   HCL, Thomson Reuters,


can we create index and drop index in exsisting table while using infomatica

4 Answers  


What is a taget load order?

2 Answers   IBM,


how many new transformations are introduced in 8.1 which are not available in 7.1? any new transformation in 8.6?

2 Answers   emc2,


Hi, I want to do Informatica Designer certification. Can anyone help me by providing the details on this. Thanks in advance. Regards, Arnab

0 Answers  


Mention few power centre client applications with their basic purpose?

0 Answers  


Categories