Viewing 15 posts - 1,231 through 1,245 (of 4,087 total)
February 15, 2018 at 8:01 am
February 15, 2018 at 7:19 am
It is guaranteed. From CASE (Transact-SQL)
The CASE statement evaluates its conditions sequentially and stops with the first condition whose condition is satisfied.
Drew
February 14, 2018 at 3:03 pm
February 14, 2018 at 2:04 pm
The two...
February 14, 2018 at 12:59 pm
If I understand your question correctly, you can't. SQL Server enforces first normal form which requires that all records have the same shape. That means that all records have to...
February 14, 2018 at 12:12 pm
You say you want to create records, but your code is updating records.
Also, I see absolutely no reason to use dynamic SQL here. Because you are using dynamic...
February 14, 2018 at 12:04 pm
You need to replace your COUNTIF with a COUNT(CASE .... WHEN ...)
For example, COUNT(CASE WHEN [Sub Product Line] LIKE '%HMO' THEN 1 ELSE NULL END).
While the...
February 14, 2018 at 10:18 am
Reported.
February 14, 2018 at 9:21 am
So I...
February 14, 2018 at 9:16 am
The main issue here is that you are using an iterative approach instead of a set-based approach. Also, inline table valued functions are going to perform much better than scalar...
February 14, 2018 at 8:38 am
I'm using the script below to calculate database growth based on the backup...
February 14, 2018 at 7:51 am
February 13, 2018 at 11:27 am
February 13, 2018 at 9:39 am
Use XML concatentation.
SELECT au.name, aau. firstname,aau.lastname,r.rolname,
STUFF(
(
SELECT ',' + CAST(AccID AS VARCHAR(MAX))
FROM [Admin] AS A
WHERE a.Id = Au.UserId
ORDER BY AccID
FOR...
February 13, 2018 at 8:32 am
Viewing 15 posts - 1,231 through 1,245 (of 4,087 total)