Viewing 15 posts - 1,231 through 1,245 (of 4,085 total)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 15, 2018 at 8:01 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 3:03 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 2:04 pm
The two...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 10:18 am
Reported.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 9:21 am
So I...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 8:38 am
I'm using the script below to calculate database growth based on the backup...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 14, 2018 at 7:51 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 13, 2018 at 11:27 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 13, 2018 at 8:32 am
Viewing 15 posts - 1,231 through 1,245 (of 4,085 total)