Trouble Viewing Images? Right-click on any image and select "Open in new tab" to view a larger version. You can also zoom in using Ctrl + Mouse Wheel for easier readability.
Article Goal
Explain how to use Linking in VDM to connect multiple tables together, enabling effective multi-table queries in your views.
What Is Linking in VDM?
Linking defines the relationship between two or more tables in your view. It ensures the data returned from each table is connected correctly—based on a shared field—such as a CustomerID or OrderID.
Why Use Linking?
Linking is required when pulling data from multiple tables in a single view.
It ensures you retrieve related data by joining rows based on matching field values.
Linking improves accuracy and consistency in your query results.
Once created, links are remembered by VDM for future use, making repeated queries with the same tables easier.
Video Tutorial:
Example Use Case
You want to create a view combining data from the Customers table and the Orders table.
Common field:
ACCOUNT_NUMAction: Drag
ACCOUNT_NUMfromSQLUser_Call_Logging_AudittoACCOUNT_NUMinSQLUser_Dbtr_Clnt_General_InfResult: VDM now knows how to combine records from both tables where
ACCOUNT_NUMmatches
Steps to Create a Link Between Tables in VDM
Step 1: Open VDM
Open or create your view by adding fields, then click on the Linking page.
Step 2: Identify the Common Field
Determine the field both tables have in common, or you want to link on—this example uses ACCOUNT_NUM.
Step 3: Drag to Create the Link
Click and hold the field from the first table.
Drag it to the matching field in the second table.
Release to open the Linking Type window.
Step 4: Choose the Link Type
VDM will ask what type of join you want to create. Choose from:
Equal (=) – Implicit Join
Equal (JOIN) – Explicit Join
Left Join
Right Join
If you're unfamiliar with join types, see Understanding SQL Joins in VDM for definitions and use cases.
Step 5: Repeat for Additional Tables
If your view contains more than two tables, repeat the process to link all required tables. All tables should be connected by a link chain. If a table is not linked, VDM will not be able to combine its data in your query.
How Auto-Linking Works in VDM
Once you create a link between two tables, VDM remembers that relationship for future views.
The next time you add the same two tables to a view, the link is created automatically.
This saves time and ensures consistency in your report structure.
Article Summary
This article outlines how to link two or more tables in VDM. Linking is essential for combining related data across tables and ensures your view returns accurate and meaningful results. Once created, VDM will remember your links for future use.
Comments
0 comments
Article is closed for comments.