September 15, 2005 at 5:59 am
Hello friends
I have one little problem regarding sql query
I have table having one column datatype float and when i am saving some value to it from my front end application it goes in table as 2.070000 (I come to know when i saw this in E.M)
But i want this value should go as 2.07 only how that might be possible
if i change my datatype then as this column already containing value it cannot allow me to change my datatype
any solution for this
if it possible me to set some precision by changing that datatype to other like that.....
please help me out
T.I.A
Shashank
Regards,
Papillon
September 15, 2005 at 6:26 am
You needn't be concerned with the fact that you stored it as 2.07 and EM is showing it to you as 2.070000. The database itself is storing that value in yet a different form anyway; what it displays is unimportant so long as it contains the value you require.
> if it possible me to set some precision by changing that datatype to other like that.....
Actually, the problem seems more like you don't want as much precision as the 'FLOAT' datatype is offering you. If you want a datatype that is only precise to the second digit past the decimal point, you could change the datatype to NUMERIC (3, 2) or DECIMAL (3, 2) -- same thing. SQL Server should allow you to run an ALTER TABLE... ALTER COLUMN to change the datatype.
September 21, 2005 at 10:24 am
shashank - afaik, this is the third post you have with display problems in Enterprise Manager - as I explained earlier, EM picks up the regional settings and Query Analyzer will display values as stored by the database (unless you set the connections options under "Tools" to "use regional settings when displaying currency, number, dates and times" )
...don't let EM display mislead you into thinking that the data is not being stored as it should...raise the red flag only when your application/QA displays values other than what you want to see...Actually, it would be in your best interests to use only QA for some time...my 2 Cs...
**ASCII stupid question, get a stupid ANSI !!!**
September 21, 2005 at 11:39 am
I'd go further... It would be in your best interest to stop using EM manager for a few days/week just to see all you can do in QA (assuming your production can slow down a bit with the learning curve )
September 21, 2005 at 12:18 pm
5000 posts - quelle est la différence entre..
Actually, it would be in your best interests to use only QA for some time
et
stop using EM manager for a few days/week just to see all you can do in QA..
**ASCII stupid question, get a stupid ANSI !!!**
September 21, 2005 at 12:32 pm
Looks like I read too fast .
Maybe I should have written, I'll go as far as saying to same thing as ten centuries .
September 21, 2005 at 12:36 pm
that's right 5000 posts - almost 6000 posts...that's pretty impressive remi - I think you were neck-to-neck with frank only about 2 wks ago...that makes it about 600 posts in 2 weeks....GOOD GRIEF MAN - DON'T YOU HAVE A JOB ?!?!....
**ASCII stupid question, get a stupid ANSI !!!**
September 21, 2005 at 12:48 pm
Ya I got one... didn't you notice I'm posting less lately??
September 21, 2005 at 3:40 pm
now that you mention it - I do remember thinking..."hmm, hope all's well with remi - his posts seem to have reduced from one a minute to about 1 in 30 minutes.." - at this snail's pace it may well be another month before you overtake Steve to be the POSTER KING (not to be confused with poster guy or pinup guy)...
**ASCII stupid question, get a stupid ANSI !!!**
September 21, 2005 at 9:54 pm
Hey Sushila and my dear friend RGR'us
Thanks for ur interest , now i cleared everything @ that datatype!!!!
Thanks for your reply from both so heavely!!!
Shashank
Regards,
Papillon
September 22, 2005 at 7:06 am
Not in a hurry here... Got a job to do and I just know it's gonna happen .
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply