Re: how to assigned float number to DB ?



Hello,

Use the below sample:-

declare @t numeric(2,1)

set @t = 0.1

select @t

Thanks

Hari

"guy" <guy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:590D1DF2-C360-45BB-9675-52533F59AABC@xxxxxxxxxxxxxxxx
but if its Numeric it cant save me the 0.1 ... (or maybe i dont know how
to
do this..) it save it like it was zero..

"Hari Prasad" wrote:

Hello,

Use Numeric instead of FLOAT datatype.

Thanks
Hari

"guy" <guy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:04D80E57-189C-4C31-8729-1511B073B490@xxxxxxxxxxxxxxxx
how can i assigned a float number with only one digit after the dot to
the
DB ?
i mean that i want to write this number 0.1 and not this 0.100000000
(that
what the sql does for me now..)
im using a storage procedure for this purpuse, so maybe the problem is
there..

thanks !!






.



Relevant Pages

  • Re: coding problem using salford FTN95
    ... values less than zero make no physical sense here. ... the code does not declare the types of any of its variables. ... the compilers implicit typing so that you will get an error message ... The program statement is supposed to ...
    (comp.lang.fortran)
  • Re: Base
    ... Moreover, if you only want to worry about typical machines, then the values ... but that would fail if the range of G_Int didn't include zero. ... Slightly less sloppy programmers would declare the counter as having the ...
    (comp.lang.ada)
  • Re: Numeric rounding not working?
    ... The data type decimal holds zero digits after the decimal point, ... declare @lat1 as float ...
    (microsoft.public.sqlserver.programming)
  • Re: which is better... SET or SELECT?
    ... FROM sysobjects ... SELECT @id -- Returns Zero ... > One important difference between SET and SELECT for variable assignment is> the behaviour when no rows are returned from the SELECT statement. ... > DECLARE @id INTEGER ...
    (microsoft.public.sqlserver.programming)
  • Re: cobol array editing output
    ... "Chuck Stevens" wrote: ... Much better to declare additional indexes to ... Judson McClendon ... judmc@sunvaley0.com (remove zero) ...
    (comp.lang.cobol)