graphic1

Exam 77-424: Microsoft Access 2013
3.0 Create Queries
3.3 Utilize Calculated Fields and Grouping Within a Query: Add Calculated Fields (LEFT)

Determine the Number of Days

This query has to determine if the DaysRented is greater than the rental agreement. The Description Field in tblRentalPrices is “3-day rental.”

 

Microsoft Access uses the Left() function to remove the text and just leave the first number.

Rental: (Left([Description],1))


Where Rental is the Alias,
Left() is the function,
1 is the first character in the data,
[Description] is the field in tblRental.

5. Try it: Use the Left Function
Click on a blank Field in the QBE Grid.
Right click to Zoom. Enter the Expression:


Rental: (Left([Description],1))

Click OK. Keep going…

 

Memo to Self: Yes, there is a Right() function that you can use to trim everything but the number of characters you want on the right.

Query Tools ->Design

graphic2