gple Posted September 18, 2007 Share Posted September 18, 2007 how do i create a sql statement that orders only the first three characters of a particular column. ie if I have a column called products and I only want to sort by the first two characters of each product. how do i write that? Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 18, 2007 Share Posted September 18, 2007 Why? Sorting the whole thing would effectively sort the first three characters as well. Quote Link to comment Share on other sites More sharing options...
gple Posted September 18, 2007 Author Share Posted September 18, 2007 I have a column that has sizes and I want to sort (42 Regular, 42 Long and 42 Short). How would I sort this to be (42 Short, 42 Regular, 42 Long)? There are other sizes (44, 50) so I want to sort by the size number first and then sort by another column afterwards. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 18, 2007 Share Posted September 18, 2007 Have you considered putting "42" and "Short" in separate columns? 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.