4.7 Last Login Time Query

This example illustrates how to filter results using a comparison. The query below returns all users who have not logged in since June 10, 1999 at 8:00 am. Notice how the literal timestamp value is expressed. It is contained within braces which serve as escape sequence delimiters. The ts indicates the value is a timestamp. The actual string representing the timestamp is contained within the single quotes.

SQL Statement

 SELECT CN, “Last Login Time” FROM UserNDS 
 
 WHERE “Last Login Time” < {ts ’1999-06-10 08:00:00.00’}
 

Result Table

Table 4-5 Last Login Time Query Reslut Report

CN

Last Login Time

dward0

1999-06-04 07:05:36.000

dward1

1999-06-08 09:17:12.000

dward2

1999-06-06 10:15:47.000

dward3

1999-06-08 08:37:04.000

dward4

1999-06-08 10:45:16.000