I was having trouble with the Drupal Views module. I have a view of a CCK Node, and I wanted to sort the view by one of the CCK data fields. The view was sorting on node id by default.

Adding the CCK content field to the “Sort Criteria” gave no change in the SQL query. I struggled with this for a good hour before deciding to create my view from scratch.

Once I recreated the view, I found that sorting by columns is handled in the table style settings. The not correctly sorted view was using the table style; I went back to my original view’s table settings and was able to sort by other columns by default.