Page 500 - Microsoft Office Excel 2003 Programming Inside Out
P. 500

Microsoft Office Excel 2003 Programming Inside Out

                             Using Null
                             You can determine if a column doesn’t have a value in a particular field by using the Is Null
                             expression. In this example, only the rows where the DateAdded field contains a Null value
                             will be returned.

                             Select *
                             From Customers
                             Where DateAdded Is Null
                             Using the Like Operator

                             The Like operator is a very powerful tool that lets you search for values in a column using
                             wildcard characters. For instance, the following Select statement matches every customer
                             where the value in the Name column starts with the letters Free:

                             Select *
                             From Customers
                             Where Name Like ’Free*’

                             Table 22-1 contains a list of wildcard characters that you can use with the Access database.
                             Remember that these characters can be used in any combination, as in the following Select
                             statement, which retrieves all customers whose names begin with D, E, or F:

                             Select *
                             From Customers
                             Where Name Like ’[D-F]*’

                             Table 22-1.  Wildcard Characters in Access
                             Character     Meaning                       Examples
             Chapter 22
                             *	            Matches zero or more characters.   A*
                                                                         True: A, AA, AB, ACC
                                                                         False: B, BA
                                                                         A*A
                                                                         True: AA, AAA, ABA, ACCA
                                                                         False: AB, AAB
                                                                         *A*
                                                                         True: A, AB, CAC,
                                                                         DADD
                                                                         False: B, BB, CCC
                             ?             Matches a single character.	  A?
                                                                         True: AA, AB, AC
                                                                         False: AAA, BA







                474
             Part 6:  Excel and the Outside World: Collaborating Made Easy
   495   496   497   498   499   500   501   502   503   504   505