SQL Server

SQL Server Create Function

How to write an SQL Server Create Function query? This SQL Server function takes as a parameter the customer number and returns the customer name. Indeed, the function stores the customer name in the @CustomerName variable, and it returns it as a result.   SQL Server Create Function The different steps

SQL Server Tables

SQL Server Drop Table only if exists

How to drop a SQL Server table only if exists? How to drop it only if the existence check shows it already exists in the database to avoid errors, using the DROP TABLE keyword. Indeed when running long SQL scripts or running scripts twice, it is much better to test

SQL Server

Remove SQL Server new line

How to remove SQL Server new line? This post propose a simple SQL Server query to process a string variable and remove the new line character. Technically we replace the new line by nothing. The SQL Server code for a new line is CHAR(13)+CHAR(10).     You want to remove it to