Order Time SQL Server

Let’s say you want to order these times below. of course  a simple “order by” will not do it,  what you need is the query  given below

1:00 PM,  1:30 PM,  10:00 AM, 10:30 AM, 11:00 AM,

11:30 AM, 12:00 PM, 12:30 PM, 2:00 PM, 2:30 PM,

3:00 PM, 3:30 PM, 4:00 PM, 4:30 PM, 5:00 PM,

5:30 PM, 6:00 PM, 6:30 PM, 7:00 PM, 9:00 AM, 9:30 AM

SELECT Time FROM tablename
ORDER BY CONVERT(SMALLDATETIME, '19990102 ' + Time )

Technically what you are doing is appending the time to a fixed date and let SQL handle the sorting.

List all Users Linux

List all Users Linux

Just copy the following to a file name “listusers” and move it to the “/usr/bin”  folder

gawk -F: ‘{ print $1 }’ /etc/passwd

Then you can run the command %listusers to see all your users without having to remember the command all the time.

 Important: Make sure you change the permission on the file to 755.

chmod 755 /usr/bin/listusers

Windows defaults to guest login

If your  microsoft windows xp keeps defaulting  to guest login you might have “simple file sharing” enabled.

To fix this issue,  make sure you “disable simple file sharing”  

“To disable simple file sharing yourself, follow these steps:

  1. Click Start, and then click My Computer.
  2. On the Tools menu, click Folder Options.
  3. Click the View tab.
  4. In the Advanced Settings section, click to clear the Use simple file sharing (Recommended) check box.
  5. Click OK.”

 Microsoft.com (http://support.microsoft.com/kb/307874)

If windows still defaults to the guest account when trying to access your samba shares for example try this work around:

1. Create a Mapped drive to the samba share

2. Click on “Connect using a different user”

3. Enter the user id and password of the samba user who has access to the resource that you are trying to access.

5.  That will be it until we find a permanent solution.