Articles in this section
Category / Section

How to hardcode the value while performing the joining condition

Published: Jan 03, 2025

This article explains how to hardcode values without having the comparison column in another table when performing join conditions in SQL, using an example involving three tables: Customers, Orders, and Product.

Use Case

In this use case, we have the following three tables to join:

  1. Customers Table
    image.png
  2. Orders Table
    image.png
  3. Product Table
    image.png

CustomerID from the Customers table with CustomerIDOrders from the Orders table, and OrderedProductID from the Orders table with ProductID from the Product table. Additionally, we want to filter the results to only include records from the UK country by hardcoding the value in the OrderedCountry column from the Orders table.

image.png

Steps to add Hardcode Values in Joining condition
Step 1: Create a New Data Source

Refer to this help document to successfully create a new data source by connecting to your database.

Step 2: Create an Expression

Use the expression design icon present on the data source page to create an expression with the hardcoded values.

image.png

image.png

Step 3: Join the Tables

Join the tables using the expression you created for hardcoding the values.

image.png

image.png

Step 4: Save the Data Source

After completing the join, save the data source.

image.png

Step 5: Bind Widgets

You can bind suitable widgets to view the results of your data source.

image.png

Additional References:
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
TV
Written by Thulasi Venkatesan
Updated Jan 03, 2025
Comments (0)
Please  to leave a comment
Access denied
Access denied