Viewing 15 posts - 7,576 through 7,590 (of 8,731 total)
Where are you trying to see the names aligned? Remember that it will depend on your font type.
A similar approach to Bill's, would be:
SELECT LEFT( MonthName + SPACE(20), 20) +...
October 23, 2013 at 11:03 am
How would you even calculate the average of active patients? You could count them, but an average needs something from which we could calculate it. Average by doctor? by month?...
October 22, 2013 at 2:37 pm
As Koen said, date functions are much better for this than manipulating strings.
Based on your example, this is a way to calculate it.
DECLARE @para date = '20140201'
SELECT @para,
DATEADD( YEAR, -1,...
October 22, 2013 at 2:16 pm
Jeffrey Williams 3188 (10/22/2013)
Then in your query you...
October 22, 2013 at 1:52 pm
You don't need the RTRIM at all. Here's an example.
WITH Customer(Source) AS(
SELECT 'CREDITNEW' UNION ALL
SELECT 'CREDITNEW ' UNION ALL --Spaces added
SELECT 'CREDITNEW' UNION ALL...
October 22, 2013 at 1:43 pm
LTRIM and RTRIM won't chage values of a character string. The problem might be an implicit conversion if your Revenue column is not a character type. To avoid this problem,...
October 22, 2013 at 1:37 pm
I'm not really clear on how you want your query, but I believe that this article might help you.
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
October 22, 2013 at 8:57 am
This should give the expected results. However, it's no more than a shot in the dark.
Check the JOIN on PERSPCODE as I don't know to which table it belongs.
SELECT l.GROUPID,
l.POLICYID,
p.EVENTID,
RATE,
SUM(PERSPVALUE)...
October 21, 2013 at 11:41 am
Kurt W. Zimmerman (10/21/2013)
Luis Cazares (10/21/2013)
October 21, 2013 at 9:27 am
Locks will happen on both updates. The difference might be the JOIN type which uses different standards. The first query uses ANSI-92 standard and the second one uses ANSI-89 standard....
October 21, 2013 at 7:44 am
Hi,
I'm glad that you found how to solve your problem. However, we might be able to help you to eliminate the cursor and generate your results on a single statement...
October 21, 2013 at 7:39 am
The best advice I could give you is to normalize your tables. You have an awful design and you're repeating values with no sense. Table B should only have the...
October 21, 2013 at 7:28 am
This seems to work as desired.
WITH Scores AS(
SELECT EVL.Account,
EVL.Ident1,
EVL.EvalDate,
FIL.Module_ID,
AVG(CASE WHEN ANSWER_VALUE IN (0,1,2,3) THEN ANSWER_VALUE*1.0 ELSE NULL END)*10.0 AS Score,
DENSE_RANK() OVER(ORDER BY EVL.Ident1 DESC) ranking
FROM #evalanswers AS ANS
JOIN #filter...
October 18, 2013 at 1:21 pm
Here's a modification.
WITH SampleData(String) AS(
SELECT 'ADB' UNION ALL SELECT
'ADC. DCD.' UNION ALL SELECT
'ADC.' UNION ALL SELECT
'ABC DS.' UNION ALL SELECT
'AD.' UNION ALL SELECT
'DG@' UNION ALL...
October 18, 2013 at 10:26 am
Viewing 15 posts - 7,576 through 7,590 (of 8,731 total)