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
Enable and configure the Native SQL view option in VDM for use with Universe databases, allowing enhanced SQL syntax support such as LEFT, RIGHT, and INNER JOIN statements.
What Is Native SQL?
Native SQL is a feature in VDM designed specifically for Universe databases. When enabled, it wraps your query in a {NATIVE}
command, which gives you access to advanced SQL capabilities that are otherwise unavailable in standard Universe SQL syntax.
Why Use Native SQL?
Using Native SQL allows:
-
Access to LEFT, RIGHT, and INNER JOIN functionality in Universe queries
-
More flexibility in how joins and conditions are structured
-
Better control over the SQL syntax passed to the Universe engine
⚠️ Note: This feature is only compatible with Universe databases. It should not be used with other database types.
Important Notes Before You Begin
-
Disable “Use Table Alias” when Native SQL is enabled — Universe databases do not support aliases when using Native SQL.
-
If
{NATIVE}
is being added and causing errors in your query, make sure Native SQL is turned off in the View Options. -
This option only applies to views built with the Standard Query Builder. For Advanced Queries, you must manually wrap your SQL statement like so:
{NATIVE "SELECT ... FROM ..."}
Example Advanced Query:
Steps for Using Native SQL in VDM
Step 1: Open the View Options Menu
Click the "View Options" ribbon at the top of VDM.
Step 2: Open Database Functions
Click on the "Database Functions" dropdown within the View Options ribbon.
Step 3: Enable Native SQL
Enable the check the box labeled "Native SQL".
🧠 This tells VDM to wrap the generated SQL statement with the
{NATIVE}
command, unlocking Universe-compatible join syntax.
Step 4: Disable Table Alias
Uncheck "Use Table Alias" to prevent query errors.
🚫 Table aliases are not compatible with Native SQL in Universe databases.
Step 5: Confirm the Native SQL Command
Click "View SQL Query" to verify that your SQL is wrapped correctly like this:
Article Summary
Native SQL in VDM allows you to extend query syntax for Universe databases, enabling complex joins and more advanced SQL structures. This must be enabled via the View Options ribbon and used without table aliases to function correctly.
Comments
0 comments
Please sign in to leave a comment.