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

If we use only lookup transformation in a mapping ie, SourceQualifier-->Lookup --> Target. , here datas are taking very long time to load in target., so what are steps to improve the performance in that mapping???????

2 Answers  


If a table contains 100 records we have to fetch 50-100 records from source to target?how

7 Answers   CSC,


How to update a particular record in target with out running whole workflow?

0 Answers  


How can u stop a batch?

2 Answers  


Can we use the mapping parameter or variables developed in one mapping into any other reusable transformation?

0 Answers  


.prm wirh repalce .txt is possible?

2 Answers  


How to do the error handling of if ur source is flatfiles?

0 Answers  


What are the issues u have faced in ur project? Guys pls answer to dis question.Due to this question I have failed in 3 interviews.

3 Answers   Amdocs, Deloitte,


what is flat file override?

1 Answers   Cap Gemini, HP,


there is a comma separated flat file as source and there is a column in that one field is having space like "rama krishna" like that what happens when this is used as source

2 Answers   TCS,


Explain sessions. Explain how batches are used to combine executions?

0 Answers  


what is the predefined port in dynamic lookup

2 Answers  


Categories