850 likes | 2.15k Views
Queries. Overview of basic Queries. Single Item And Query Or Query. Date. =Date() Todays date <Date()-30 This example will display all the records with a date more than 30 days old in the Invoice Date field. <Date()-30. Missing records or data.
E N D
Overview of basic Queries • Single Item • And Query • Or Query
Date • =Date() Todays date • <Date()-30 • This example will display all the records with a date more than 30 days old in the Invoice Date field. • <Date()-30
Missing records or data • Not "text" finds all records except those matching the specified text. • Not Like "X*" finds all records except those starting with the specified letter (or string of text). • Is Null • Is Not Null
WILD CARDS • Yor* would find York, Yorkshire and Yorktown but not New York. • Mar? would find Mark but not Mario, Martin or Omar. • F*d would find Fred and Ferdinand but not Frederick. • <"N" would find all entries beginning with a letter lower than the letter N in the alphabet. In other words, all entries starting with the letters A - M. • >"F" And <"H" would find all entries beginning with the letters F and G. • Not "Text" = finds all the records without that word
The Parameter Query • Sometimes you want to search for data but you don't know what it is • (Like looking in the TV guide to see what is on)
Expression Query • Sometimes you want to use numerical data from different tables together
What data / information might you need to find? • Write a list of al the information you might need to find • Think about the TYPE of query that would be useful for this task • List the data that would be required and the criteria