is there any way to convert number into integer? [message #639025] |
Tue, 30 June 2015 00:26 |
|
mvrkr44
Messages: 132 Registered: December 2012
|
Senior Member |
|
|
hi All,
Is there any way to convert number field into integer??
i tried below code but still it returing as number in my .Net application.
---code start
create or replace procedure p_integer(v1 out int)
as
iv_doc int;
begin
select 1 into iv_doc from dual;
v1:=iv_doc;
end;
/
---code end
|
|
|
|
|
|
|
|
|
|
Re: is there any way to convert number into integer? [message #639034 is a reply to message #639033] |
Tue, 30 June 2015 00:49 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
mvrkr44 wrote on Tue, 30 June 2015 11:17Thanks Lalit,
So column type need to change as INTeger in database (or) .net application need to handle this one?
There is nothing to do at database side, your application should handle it. Pass the number from database to the client as it is, in the client side hold it as INT.
|
|
|
|
|
Re: is there any way to convert number into integer? [message #639039 is a reply to message #639025] |
Tue, 30 June 2015 01:42 |
John Watson
Messages: 8929 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
In the Oracle daabase, an integer is not a data type, it is just a number with no decimals:
orclz>
orclz> create table t1(c1 int);
Table created.
orclz> desc t1
Name Null? Type
----------------------------------------------------------- -------- -----------------
C1 NUMBER(38)
orclz> you'll have to do any conversion in your client code.
|
|
|
|
|
|
|
|