Formatting SQL command better