Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
newbie16
Starting Member
8 Posts |
Posted - 2012-08-05 : 23:21:04
|
Hello,I have created a test table with the data type double precisionString sql = "create table doub1 ( value double precision)"; fCursor.execute(sql); sql = "insert into doub1 values(null)"; fCursor.parse(sql); fCursor.execute(); fSession.commit(); sql = "select value from doub1"; fCursor.executeQuery(sql); When I execute this in the Query Analyzer my output is null.This is given as "•When query results are viewed in SQL Query Analyzer, null values are shown as (null) in the result set." in the following linkhttp://msdn.microsoft.com/en-us/library/aa196106(v=sql.80).aspxBut when I execute the above through Junit, My outout is 0.0.I would like to know why this is happening.Could someone provide a clarification on this please?Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-06 : 00:39:48
|
whats Junit? you may be better off posting it in Junit forums as i dont think there are people familar with Junit here.Also is this t-sql? there's no datatype called double precision in t-sql------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
newbie16
Starting Member
8 Posts |
Posted - 2012-08-06 : 01:16:57
|
Junit is used for unit testing in Java.I have the set of statments in java and testing with a remote SQL Server 2000 system.This is a datatype in SQL 2000. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-06 : 11:04:03
|
quote: Originally posted by newbie16 Junit is used for unit testing in Java.I have the set of statments in java and testing with a remote SQL Server 2000 system.This is a datatype in SQL 2000.
Nope.. datatype corresponding to double precision in sql server is real------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-08-06 : 11:42:21
|
Isn't it float? I know the VB type single mapped to SQL real and double mapped to float. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-06 : 12:22:27
|
quote: Originally posted by robvolk Isn't it float? I know the VB type single mapped to SQL real and double mapped to float.
yep you're correctThe synonym for double precision is float(53).and synonym for real is float(24).------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|