9,410 reputation
1635
bio website
location
age
visits member for 3 years, 11 months
seen Dec 23 at 19:34

Dec
19
revised Get products of category plus all child categories till leaf nodes
Updated "further reading" comments
Dec
19
answered Get products of category plus all child categories till leaf nodes
Dec
15
comment for xml missing null columns
It feels dirty so there is probably a better way, but as the text you want gone is constant you could search and replace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to an empty string before stirring it anywhere.
Dec
9
answered Is it advisable to restart a SQL server box running Windows when disk space is low?
Dec
8
comment View designer strange join syntax
@ypercube: the way I read that, where an ON clause is present it always follows a source definition rather two ON clauses being able to directly follow each other (I'd expect that to be ON <condition> AND <condition> rather then ON <condition> ON <condition>. I'll have another look later and see what I might be missing.
Dec
8
comment View designer strange join syntax
The ordering does look odd with the ON filter not directly following the JOIN clause (the syntax defined in msdn.microsoft.com/en-GB/library/ms177634.aspx doesn't allow this) but I wouldn't expect simply reordering them to cause different results. You might need to be careful if switching from RIGHT to LEFT joins or reordering the table references though. Could you give a before+after example where you have altered the query layout and it has unexpectedly changed the output?
Dec
6
comment What are reasons *not* to use the MEMORY storage engine in MySQL?
@osa: assuming it allows concurrent access rather than serialising everything, you are going to want some form of integrity management for that.
Dec
4
comment Single SQL query to retrieve data in a particular order (not ASC/DESC)
That is not guaranteed to work: the row order resulting from any query (particularly when queries are combined with UNION rather than UNION ALL as without ALL it'll need to sort the rows to search for duplicates and may output the result in this new order it has picked) is not guaranteed unless you explicitly specify the desired order with an ORDER BY clause. Without ORDER BY it might work as you expect today, but at a later time (or in another DB entirely) the query planner may decide to take a different route and therefore emit the rows in a different order.
Dec
4
comment Single SQL query to retrieve data in a particular order (not ASC/DESC)
Using language_id = 4 directly like that isn't standard SQL syntax (or at least I can name a few DBs that will reject it) so for compatibility in case you ever need to move to another DB use the more verbose (but functionally equivalent) CASE WHEN language_id = 4 THEN 1 ELSE 0 END.
Nov
30
comment SQL server databases stuck in restoring state
Be very careful to understand the implications of that. If the DB is awaiting a log restore that could result in considerable data loss.
Nov
28
answered SQL Server 2008R2 - how to install replication components
Nov
25
answered SQL Server De-duplication Trigger
Nov
22
comment Query execute slowly when changed compatibility Level of my database
We can't help at all with this sort of question without seeing the affected SQL statements/procedure. The only generic thing I can suggest to try is to run the procedure each way in SMSS with query plan output turned on and see if you can see any significant difference there. As the results of that to your question too.
Nov
17
answered SQL Server Standard Edition Memory Limit
Nov
14
comment SQL Server: performance of IDENTITY vs INT as primary key
NUMERIC(10) would be stored as 9 bytes per value, so there will be some performance difference compared to an INT (4 bytes) and to a lesser extent BIGINT (8 bytes). This is in part because when hitting disk you are pulling more pages as the rows take more room, and in part because the CPU has more work to do as it doesn't natively support loading and comparing 9 byte values in single instructions (manipulating 8, 4 2, and 1 byte values is natively supported. Whether either difference will be visible in the performance of you r application is something you'd need to benchmark to be sure.
Nov
14
answered SQL Server: performance of IDENTITY vs INT as primary key
Nov
13
revised Passing info on who deleted record onto a Delete trigger
Clarified on user types
Nov
13
revised Passing info on who deleted record onto a Delete trigger
Clarified on user types
Nov
13
answered Passing info on who deleted record onto a Delete trigger
Nov
11
revised Getting Time Duration
further typo corrections