Thursday, October 5, 2023

MS-SQL Server - Data Validation while Replication & Join Examples

Data Validation while Replication & Join Examples


 https://learn.microsoft.com/en-us/sql/relational-databases/replication/validate-data-at-the-subscriber?view=sql-server-ver16


Examples of Join


--SELECT ProductID, Purchasing.Vendor.BusinessEntityID, Name

FROM Purchasing.ProductVendor INNER JOIN Purchasing.Vendor

    ON (Purchasing.ProductVendor.BusinessEntityID = Purchasing.Vendor.BusinessEntityID)

WHERE StandardPrice > $10

  AND Name LIKE N'F%';

GO

//


--SELECT s.CustomerID,

       s.CustomerName,

       sc.CustomerCategoryName

FROM Sales.Customers AS s

LEFT OUTER JOIN Sales.CustomerCategories AS sc

       ON s.CustomerCategoryID = sc.CustomerCategoryID

OPTION (USE HINT('DISABLE_BATCH_MODE_ADAPTIVE_JOINS'));

//


Additionally,


CASE when

https://learn.microsoft.com/en-us/sql/t-sql/language-elements/case-transact-sql?view=sql-server-ver16


Subscription Type

https://learn.microsoft.com/en-us/sql/relational-databases/replication/subscription-type?view=sql-server-ver16




Any query will be considered.



T. Amit Vaid S.


Imp. Error 9718


No comments: