Verbat Posted January 19, 2008 Share Posted January 19, 2008 I need 1 of the fields in the table to save numbers in it, and it includes all kind of numbers like 100, 0.22, 5.67 and so on. Now when i sort this field it shows the 5.67 first then the 100 and then the 0.22. I tryed to change the Type of the field to INT but then it removes everything after the . so it shows me 100, 0, 5. How can i solve this? Thanks Quote Link to comment Share on other sites More sharing options...
beansandsausages Posted January 19, 2008 Share Posted January 19, 2008 tyr using decimal for the value Quote Link to comment Share on other sites More sharing options...
Verbat Posted January 19, 2008 Author Share Posted January 19, 2008 tyr using decimal for the value When i make it decimal then it removes everything after the . aswell. Quote Link to comment Share on other sites More sharing options...
beansandsausages Posted January 19, 2008 Share Posted January 19, 2008 i know i will get told off here but see if it works with varchar i know its not fir numbers. Quote Link to comment Share on other sites More sharing options...
Verbat Posted January 19, 2008 Author Share Posted January 19, 2008 i know i will get told off here but see if it works with varchar i know its not fir numbers. No it doesnt work with Varchar but i fixed it All you have to do is use DECIMAL for the Type and Change the Length/Values to 10,2 the number after the , means number of numbers after the . Quote Link to comment Share on other sites More sharing options...
beansandsausages Posted January 19, 2008 Share Posted January 19, 2008 missed edit time, select decimal where says Length/Values* types 100,5 that will make the 1st number max of 100 numbees long and number after the . 5 numbers long EDIT : must of posted at same time Quote Link to comment Share on other sites More sharing options...
Verbat Posted January 19, 2008 Author Share Posted January 19, 2008 missed edit time, select decimal where says Length/Values* types 100,5 that will make the 1st number max of 100 numbees long and number after the . 5 numbers long EDIT : must of posted at same time Thanks man. Quote Link to comment Share on other sites More sharing options...
beansandsausages Posted January 19, 2008 Share Posted January 19, 2008 Np Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.