Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

Navigation: Lesson 3 - Viewing Data

Modifying the Condition for a Query

Scroll Prev Top Next More

Let's say you would like to see the flights for March 3, 2022 only. You can easily change the condition.

 

To change the rows retrieved by the query:

 

1.In the "Query Builder" window, right-click over "Flights T1" from the list of "Tables/Views In Use" and choose WHERE Clause.
2.In "WHERE Builder" text, change the date to "03/03/2022".
3.Click the OK button.

 

To see the results of the query:

In the "Query Builder" window, choose Query: Browse Query from the main menu bar or select the "Browse Query" button on the toolbar.

 

R:BASE searches the Flights table for all the rows that meet the condition and then displays the data in the "Data Browser" window. Close the window when finished.

 

Specifying More Than One Condition

Now we would like to see the flights scheduled for May that have a price per letter greater than $45.00.

 

You can create a query that places multiple conditions on your data. We will change the condition in the FlightDate column and add a condition in the Price column.

 

To use multiple conditions to retrieve data:

 

1.In the "Query Builder" window, right-click over "Flights T1" and choose WHERE Clause.
2.In "Where Clause" text, delete "= 03/03/2022".
3.Click the BETWEEN button within "Operators and Keywords".

 

The "BETWEEN" operator is added to the WHERE Clause panel.

 

4.Enter "05/01/2022" in the "WHERE Clause" text.
5.Click the "AND" button within "Operators and Keywords".

 

The connector AND is added to the "WHERE Clause" text.

 

6.Enter "05/31/2022" in the "WHERE Clause" text.

 

By using the BETWEEN operator, we will display those flights that were scheduled from the 1st to 31st of May.

 

Now, we specify the second condition.

 

7.Click the "AND" button in "Operators and Keywords".

 

The connector AND is added to the "WHERE Clause" panel.

 

8.In the "Select Column" panel, select the "Price" column and click the "Add Column" button.

 

The column t1.Price is added to the WHERE Clause panel.

 

9.Click the ">" button within "Operators and Keywords"

 

The operator ">" (greater than) is added to the "WHERE Clause" panel.

 

10.Enter "45" in the "WHERE Clause" text.

 

You have finished building the WHERE clause. You can test the WHERE clause if you want by clicking the "Test Clause..." button. The query should test correctly.

 

WHEREBuilder_flightdate_price

 

 

11.Click the OK button to close the WHERE Builder.

 

To see the results of the new query:

In the "Query Builder" window, choose Query: Browse Query from the main menu bar or select the "Browse Query" button on the toolbar.

 

R:BASE displays the information you specified in the "Data Browser" window. As you browse the rows you should see only those flights scheduled in May with rates higher than $45.00 per letter. Close the Data Browser when you are finished.