We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ErikEJ/SqlServer.Rules'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
SRD0020.md•1.21 KiB
# SQL Server Rule: SRD0020
| | |
|----|----|
| Assembly | SqlServer.Rules |
| Namespace | SqlServer.Rules.Design |
| Class | MissingJoinPredicateRule |
## Rule Information
| | |
|----|----|
| Id | SRD0020 |
| Friendly Name | Incomplete or missing JOIN predicate |
| Category | Design |
| Ignorable | false |
| Applicable Types | Procedure |
| | Scalar Function |
| | Table Valued Function |
| | View |
## Description
The query has issues with the join clause. It is either missing a backing foreign key or the join is missing one or more columns.
## Summary
Make sure you have all the columns for the JOIN relationship as conditions in the ON clause
### Remarks
<list type="bullet">
<item>It is either missing a backing foreign key or the join is missing one or more columns.
The rule checks the T-SQL code for queries having joined tables and missing join a predicate
for one of the tables. </item>
<item>It identifies the joined table sources which do not have any column
referenced neither in the join conditions nor in the WHERE clause. Without a join predicate,
the query result will include the Cartesian product of all rows.</item>
</list>
<sub><sup>Generated by a tool</sup></sub>