Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 0 Tue Jan 16, 2018 10:49 pm
No new posts reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us