Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

If we give the sub query as SELECT SQRT(144)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
naveen_kumar

New User


Joined: 03 Dec 2005
Posts: 1
Location: coimbatore

PostPosted: Sat Dec 03, 2005 12:23 am    Post subject: If we give the sub query as SELECT SQRT(144)
Reply with quote

if we give the sub query as SELECT SQRT(144) (or any other square numbers) <= the ans displayed is with an exponential type.

like for 144 must be 12 but ans displayed is +144.00000000+03
Back to top
View user's profile Send private message

reachsenthilnathan

New User


Joined: 20 Nov 2005
Posts: 15

PostPosted: Sat Dec 03, 2005 4:05 pm    Post subject: Re: If we give the sub query as SELECT SQRT(144)
Reply with quote

Hi,

I hope u mean to say that answer is +0.1200000000000000E+02 and not 12.
(thou u have given the answer as +144.00000000+03)

Use the following query to get it as integer.
SELECT CAST (SQRT(144) AS INTEGER) FROM SYSIBM.SYSDUMMY1;

Hope it helps.

Regards,
Senthil Nathan.R
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 1 Sun Mar 12, 2017 5:35 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us