Why can’t I add a foreign key constraint? ANSWERED!

Reading Time: 4 minutes When attempting to create a foreign key constraint on a table, you may receive an error message very similar to the following: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint “constraint_name”. The conflict occurred in database “DatabaseName”, table “TableName”, column ‘ColumnName’. This may be happening because you are Continue Reading

SQL Server CHOOSE: Explained

Reading Time: 3 minutes The SQL Server CHOOSE function is a simple decision structure you can use to simplify an otherwise complex expression. The syntax for CHOOSE is extremely simple: CHOOSE(<integer>, <expression1>, <expression2>,……<expressionN>) All you do it outline an integer as the first parameter, followed by a comma-separated list of expressions. The expressions can Continue Reading