Jump to content

SQL help kavalenu


Cnu_rao0p

Recommended Posts

Hello brothers,

 

I have a column that stores height in inches, I need to convert that column to feet and inches.  
The inches will need to be rounded to a whole number.  If the height is stored as 63.55300 (5 ft 3.5 inches) then it should round to 64 and display 5 ft,4 in inches column.  

 

 

Link to comment
Share on other sites

use round function to get whole number 

then divide with 12 to get height and modulo 12 to get inches

Am I missing something? If you google it I'm sure the first result will be the solution

Link to comment
Share on other sites

19 minutes ago, jalebibai said:

use round function to get whole number 

then divide with 12 to get height and modulo 12 to get inches

Am I missing something? If you google it I'm sure the first result will be the solution

@gr33d

Link to comment
Share on other sites

step 1. round the heights . ( this will remain inches like 64, 65)

step2. divide resultant heights from step1 by 12

step3. round the resultant heights from step2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...