Group By and Having The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each dept". The GROUP BY statement is must be used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns. GROUP BY Syntax
How to convert null value to decimal in SQL Server?
While writing the sql queries s most issue coming when no value available in table and some calculation needs to perform.
in following scenario salary value is null but it needs to display in same format like wise other value appearing in table for salary.
First we need to handle the null value.
select empid,empname,dept, isnull(salary,0) as salary from k4coding_emp
select empid,empname,dept,cast(isnull(salary,0) as decimal(18,2)) as salary from k4coding_emp
nestsaspecra Judy Reuland https://wakelet.com/wake/XGyF-n055uRQLGXVaY3Sp
ReplyDeleteteaupetifens
lynoaYimke-Las Vegas Darrell Orlando Crack
ReplyDeleteVMware Player
WinZip
chihojehot