Viewing 15 posts - 286 through 300 (of 1,193 total)
If no comparison in a CASE expression evaluates to TRUE, and you don't specify an ELSE argument for the CASE, then NULL is returned.
In this case, you've only...
May 18, 2017 at 11:42 am
It won't cause data loss in the sense of data going missing from your tables or anything like that.
What you are effectively saying, however, is that you're willing...
May 18, 2017 at 10:15 am
It's the reference to the pre-aggregation functional_amt in the ORDER BY that is the issue.
You'll need to order by the aggregated value (likely what you intended anyway).
May 18, 2017 at 10:00 am
May 18, 2017 at 9:19 am
Just to add to what Luis said, the trick is that the SELECT to check for existence is only taking shared locks.
Nothing prevents two instances of that code...
May 18, 2017 at 8:34 am
Every year I tell myself I'm going to make a point of going to several of these, and every year I realize that there are very few within my acceptable...
May 17, 2017 at 3:35 pm
As Phil indicated, there really isn't a one-size-fits-all trick that applies here.
Given what you've stated about your code, I'd suspect that the query is simply too complicated for...
May 17, 2017 at 3:04 pm
To tell you exactly what is going on would require examining the execution plan.
In general, though, what is happening is that in the second case, you are forcing...
May 17, 2017 at 12:11 pm
I'm not sure how much traction your request will get, but I suppose you could try.
The trick is that it's not an unusual behavior of undo that's at...
May 12, 2017 at 3:07 pm
A few points need to be made.
First, if you could post DDL for your table (the CREATE TABLE statement), sample data (in the form of INSERT statements), and...
May 11, 2017 at 3:00 pm
One straightforward way this can happen is adding some columns to a table.
Under some conditions, this is a metadata-only change and existing rows will not reflect the new...
May 10, 2017 at 3:49 pm
I'm not aware of such a thing, but that sounds like basically writing your own optimizer, so I'm not too surprised 🙂
On that note, with this particular query...
May 9, 2017 at 1:15 pm
You won't need a SET QUOTED_IDENTIFIER ON in the dynamic SQL here, just in the main batch.
Your problem is that SET QUOTED_IDENTIFIER takes effect at parse time, not...
May 9, 2017 at 8:50 am
When you do not specify a length for char or varchar in variable declaration, the variable will have a length of 1.
See https://docs.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql
If you run a...
May 1, 2017 at 9:58 am
This appears to me to be just plain wrong.
+1
Catching up after a lengthy unintended hiatus from the site, so just got to this QotD.
April 27, 2017 at 12:11 pm
Viewing 15 posts - 286 through 300 (of 1,193 total)