Viewing 15 posts - 4,036 through 4,050 (of 4,087 total)
You're going to need to use a PIVOT (or equivalent). If you want a more detailed answer, I suggest that you follow the forum etiquette guidelines and post the...
August 11, 2009 at 1:17 pm
The following query only queries #tmp once.
WITH Z_cte AS (
SELECT id FROM #tmp
GROUP BY id
HAVING Min(value) = 'Z'
...
August 11, 2009 at 1:05 pm
There's actually another reason. SQL returns (a) result set(s). The blank line is simply not part of the result set, so your options are to separate your single...
August 11, 2009 at 12:19 pm
You shouldn't be doing formatting in T-SQL. You should be using a formatting tool like SSRS.
You can trick T-SQL into doing this by adding a COMPUTE BY clause (which...
August 11, 2009 at 10:18 am
Think of Translations as a big CASE statement. CASE Language
WHEN 'French' THEN [French Description]
WHEN 'English' THEN [English Description]
WHEN 'Spanish' THEN [Spanish Description]
etc.,
Translations simply picks which columns to display based...
August 11, 2009 at 8:11 am
sarvesh singh (8/9/2009)
How do you connect eventide to MeasuerID? Is it only by inserting order? Also how did you get the values for EventMeasureID?
Eventmeasure table gets eventid from event...
August 9, 2009 at 10:54 am
yaya1899 (8/4/2009)
It's working! Thanks a lot, Lynn Pettis and Allen 😀
Who is this "Allen" that you are referring to?
Drew
August 4, 2009 at 9:37 am
If you can get those values, then probably the easiest thing to do is to create two calculated columns: one for Total Amount and one for Rate Amount. Populate...
August 4, 2009 at 9:16 am
One other thing. You do not need the TOP 100 PERCENT. It does absolutely nothing for you and might cause a performance hit.
Drew
August 3, 2009 at 5:43 pm
For an EXISTS clause to work, you almost always want to have a correlated subquery. If you can run the subquery alone, then it's not a correlated subquery. ...
August 3, 2009 at 5:30 pm
Yeah, I noticed that the alias would not be recognized after I posted. I really should have tested before posting. I still prefer a CTE to a derived...
August 3, 2009 at 3:38 pm
I don't think it's necessary to use both a CTE and a derived table here. The following is untested, but should work.
WITH SQLPaging AS (
SELECT...
August 3, 2009 at 2:54 pm
How about an EXCEPT?
SELECT t1.col1
FROM T1
EXCEPT
SELECT t2.FkCol
FROM T2
Drew
August 3, 2009 at 1:22 pm
There are two variants of the CASE statement
CASE <Expression>
WHEN <Value Expression> THEN <Result Expression>
or you can use
CASE
WHEN <Boolean Expression> THEN <Result Expression>
You...
August 3, 2009 at 9:21 am
lduvall (8/3/2009)
August 3, 2009 at 9:11 am
Viewing 15 posts - 4,036 through 4,050 (of 4,087 total)