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, with SQL Server Drop Table only if exists? How to drop it only if it already exists in the database to avoid errors, use the DROP keyword. Indeed when running long SQL scripts or running scripts twice, it is much better to test the table existence. Indeed, we highly

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