Where clause to a subquery in SqlServer
There are cases we want to execute a query includes a WHERE clause which must look up in a subquery and join tables is not prefferable . Find this example…
K-Smart, IT Business Solutions
Find ideas to implement your IT enviroment
There are cases we want to execute a query includes a WHERE clause which must look up in a subquery and join tables is not prefferable . Find this example…
SQL Server 2000 Rebuild all indexes with keeping the default fill factor for each index USE EXEC sp_MSforeachtable @command1=”print ‘?’ DBCC DBREINDEX (‘?’)” Rebuild all indexes with specifying the fill…
This is how to convert an integer to string in SQL SERVER. Let’s suppose we want to present the year as a string SELECT CAST(dbo.Employees.HireYear AS nvarchar(4))
Below table contains the details of SQL Server Collations: Albanian_BIN Albanian, binary sort Albanian_BIN2 Albanian, binary code point comparison sort Albanian_CI_AI Albanian, case-insensitive, accent-insensitive, kanatype-insensitive, width-insensitive Albanian_CI_AI_WS Albanian, case-insensitive, accent-insensitive,…
Let’s say we have a table Employees with a field Time and we want to update all Null fiels to 0 This the right statement to identify and update null…
There is a major issue in SQL server 2008 when running queries from views having the ORDER by clause. The outcome is with random order. Example. We create the following…
This is how to convert a string to number to an SQL Server sentence. SELECT CAST(YourVarcharCol AS INT) FROM Table examples Convert to Integer Select Cast(Customers.CodeId as Int) from Customers…