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

How to solve "The SQL Server service failed to start. For more information, see the SQL Server Books Online topics" error.

1 Answers   TCS,


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

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,


On which table the SSIS SQL Server logs are stored?

1 Answers  


I entered the data in SQL toad version 9.0.1 in English and Arabic language but when i do the query i get the data in Arabic language with (??? question mark) ,please your support.

0 Answers  






Does DBCC CHECKDB requires DB to be in SINGLE_USER mode?

2 Answers   TCS,


Is the company liable to deduct professional tax of directors?

1 Answers  


why we are using shift key in unix shell script

0 Answers   IBM, TCS,


When do you get "getwmicomexception"?

0 Answers  


What are the required/mandatory parameters that have to be passed with RAISEERROR statement?

1 Answers  


How will you Handle Error in SQL SERVER 2008?

0 Answers  


definion of tcp

1 Answers   CA,


Categories