The COUNT_BIG function performs the same function as the COUNT function. The only difference is that the COUNT_BIG function returns the BIGINT value while …
Read More »TSQL
COUNT Function in SQL Server(TSQL)
We find the number of records in a data set with the Count function. For example, we can find the number of records in …
Read More »GROUPING and GROUPING_ID Functions in SQL Server(TSQL)
We can create subtotal and grandtotal rows for the grouped data with WITH ROLLUP, WITH CUBE and GROUPING SETS operators. You can find details …
Read More »WITH ROLLUP and WITH CUBE Operators in SQL Server(TSQL)
We use the WITH ROLLUP and WITH CUBE operators with the GROUP BY statement. So before you read this article, I suggest you read the …
Read More »GROUPING SETS Operator in SQL SERVER(TSQL)
SQL Server supports grouping of data with GROUP BY since older versions, and also offers WITH ROLLUP and WITH CUBE operators for grand-total and sub-totals. …
Read More »CHECKSUM_AGG Function in SQL Server(TSQL)
Creates a checksum value of a data set. You can use it to check if data in a column is being modified. accepts int …
Read More »APPROX_COUNT_DISTINCT Function in SQL Server(TSQL)
This function returns an estimated number of non-null unique values in a data set. It came with SQL Server 2019. Let’s create a table …
Read More »Conversion failed when converting date and/or time from character string
You receive this error when you try to convert a string that is a not compatible with the datetime data type to a datetime. …
Read More »AVG Function in SQL Server(TSQL)
We use the AVG function to obtain the average value of the specified column. Its one of the most used SQL Server functions. Let’s …
Read More »OVER Clause in SQL Server(TSQL)
We send a dataset to a function by grouping it with the Partition By statement int the OVER Clause. We sort the groups by …
Read More »