when i save float data value 11.22 but this see in table
11.220000004758456 type ? how to save only two decimal point.



when i save float data value 11.22 but this see in table 11.220000004758456 type ? how to save onl..

Answer / guest

if u put 11.22 in a variable x, try this :

x=11.22;
printf("%2.2f",x);

2.2f specifies that ,it will print exactly 2 digits to the
left of decimal point and 2 digits to the right of the decimal
point.You can use any number according to ur requirement ,like
(%x.yf).

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More SQLServer Errors Interview Questions

hp asking for replication floppy to do reinstall 25254 server assistant

0 Answers  


what is meant by write off and write on in sap?

5 Answers   Reliance Communications, Wipro,


How to solve -805 error i.e. Bind issue. There are two conditions- 1) If you have access to the database table 2) If you don't have access to the table

0 Answers  


Does DBCC CHECKDB requires DB to be in SINGLE_USER mode?

2 Answers   TCS,


I have table name'temp' in that I wanted to add some partial data for a particular column name 'policyno' where data is existing in that column. Ex.Policyno like 'R-KT-SK- EA-134526' like 100 records. In that 100 records some policynos are just like 134527 I mean with out prefix like'R-KT-SK-EA-' now I wanted add this prefix as 'R-KT-SK- EA-134527' for some 50 records. How can I add partial data?

4 Answers   Syncfusion, TCS,






Difference between Bookmark lookup & RID lookup?

1 Answers  


What is live lock, deadlock and what is Lock escalation?

0 Answers  


when i save float data value 11.22 but this see in table 11.220000004758456 type ? how to save only two decimal point.

1 Answers  


definion of tcp

1 Answers   CA,


What is Mutex error in Triggers?

0 Answers  


i have created ODBC through Data sources and tests completed sucessfully. when i am Trying to connect SQL Server through ODBC (ODBC :Oracle Open Client Adapter for ODBC 2.0.2.15.0 Microsoft SQL Server 09.00.3054) unable to Connect to SQL*Plus: Release 8.0.4.0.0. it is given following error-message . Error: ORA-03121: NO interface driver connected- function not performed.

0 Answers   Investment Bank,


When you get following error? Error 3154: The backup set holds a backup of a database other than the existing database.

0 Answers  


Categories