1,575 reputation
618
bio website
location Ukraine
age
visits member for 2 years, 5 months
seen 20 hours ago

Dec
23
revised Cast to date is sargable but is it a good idea?
removed a duplicate word, capitalised a name
Dec
23
suggested suggested edit on Cast to date is sargable but is it a good idea?
Dec
17
revised SQL Server: How to get the responsiveness of a trigger, without blocking the transaction that fires the trigger?
minor formatting & grammar, some punctuation & typos
Dec
17
reviewed Reviewed Cassandra - Query a column with collection type
Dec
17
comment Cassandra - Query a column with collection type
The only manual I've found so far doesn't seem to provide a direct answer to this, but perhaps this syntax would work: SELECT * from data_points WHERE properties['band'] = 'Beatles';?
Dec
17
suggested suggested edit on SQL Server: How to get the responsiveness of a trigger, without blocking the transaction that fires the trigger?
Dec
13
comment In SQL Server, how to launch a python script from an insert trigger?
If you are firing the Python script from the trigger, you will be firing it while the transaction is still not committed. The script will not know whether the transaction is going to complete successfully or not.
Dec
6
awarded  Critic
Dec
6
reviewed No Action Needed Is there are way to use Fine Grain Auditing to record Varray bind values?
Dec
3
comment Why does SQL Server require the datatype length to be the same when using UNPIVOT?
(Possibly unrelated but...) Same strictness is applied when comparing column types of the two parts of a recursive CTE.
Nov
23
comment How to do pivot for a particular result?
Have you tried PRINTing the @query instead of executing it to see what it looks like in the end? That could give you some ideas about what specifically could be going wrong when building the dynamic query.
Nov
11
answered MySQL temporary column in SELECT statement
Nov
7
comment Make “as” mandatory when create column alias?
My reasoning is this. If you forget about the rule altogether, your query ends up with columns unprefixed and you thus risk running into the original issue, so here the hardest part is probably getting used to the rule. When you do remember about it, then a missing table alias might be easier to spot at a glance than a missing comma because the former would probably stand out among the rest to a greater degree than the latter. It is still possible to happen, of course, but then I would expect the chance of missing both the alias and the preceding comma to be less than that of missing either.
Nov
6
answered Make “as” mandatory when create column alias?
Nov
4
comment Understanding Indexes and using them better
When you said you tried optimising your queries, did you mean you tried only fiddling with DB/server settings, table indices etc. or did you also try rewriting the queries themselves? You aren't offering us to take a look at them, I guess you must reckon you've optimised them as much as could be, or do you think there could still be room for more optimisation?
Nov
4
comment MySQL temporary column in SELECT statement
You seem to completely misunderstand the purpose of HAVING, and the indulgent nature of MySQL extensions to SQL doesn't help at all. Do you realise that using HAVING in this way you can only get one row out of the query? Did you mean the result to consist of just one row? I'm asking this because my answer, if I ever get round to writing one, would depend on that.
Nov
3
comment MySQL temporary column in SELECT statement
What is this query supposed to do? In particular, what do you mean by using HAVING without GROUP BY?
Oct
24
awarded  Quorum
Oct
14
comment SQL Server Decimal(9, 0) vs INT
Thank you for the offer. @Chris Chubb has already referred to that point in his answer, so I'm not posting mine until I find something to balance/complement it with. If that's the single aspect that you care most about, though, feel free to post your own answer. There may be additional value to your answer if you explain why that aspect is so important in your particular case.
Oct
14
comment Selecting the highest value in a column?
@billinkc: Their first take on the OVER clause was with the 2005 release. They didn't enhance it until the 2012 version.