Viewing 15 posts - 1 through 15 (of 325 total)
If you want to be able to impersonate it, you're going to need to create Logins (and now you have a new problem). If you just want different schemas to...
May 21, 2021 at 3:39 pm
SQL is probably the wrong tool for this. Not only do you need to unzip the data, but you then need to navigate the internal file structure, extract the relevant...
May 21, 2019 at 6:12 pm
Rather than a trigger, you could add a calculated column to handle the replace and convert the result to an actual date at the same time, e.g.
Drop...
May 18, 2019 at 8:07 am
Sometimes I find it helps to add something like:
[ClvInc].[Tx].query('.')
to the selected column list. It will output the XML your nodes() function has taken you to and can help diagnose if...
May 16, 2019 at 6:30 pm
If you want a quick "on disk" variant, you can take advantage of the fact your date stamps are sortable, i.e.
Select SubDirectory from #DirTree
Except
Select SubDirectory From
(Select Top (4) SubDirectory From...
May 15, 2019 at 5:25 am
You can also do an upsert using merge:
merge #data as target
using (select @username) as source(username)
on target.username = source.username
when matched then update set visits = visits + 1
when...
May 14, 2019 at 6:44 am
Percentile_Cont or Percentile_Disc (depending upon which type you want) would probably be the way to go.
May 10, 2019 at 6:48 am
@Job_Numbers is a single string of text, using NOT IN on it will not break it apart at commas - it's equivalent to writing:
WHERE ModelName0 <> @Job_numbers
I suspect you really...
May 10, 2019 at 6:38 am
We have SA so licensing costs aren't the biggest issue - though the constantly shifting charging model, particularly on virtual hardware, makes doing thing like upgrading cores unnecessarily painful (you...
May 10, 2019 at 6:31 am
We had this conversation just after 2017 was released, to replace our aged 2005 servers, and I pushed hard (and won) the decision to go with that over 2016. With...
May 10, 2019 at 6:19 am
Lots of things that aren't valid XML are allowed within CDATA sections, that's kind of the point of CDATA. So by wrapping it in that, you're basically not really converting...
December 12, 2018 at 3:17 pm
The usual methods for getting around escaped quoting are things like:
1) Second-order SQL injection. When the passed in string gets passed through multiple layers and the inner code isn't...
December 2, 2018 at 9:48 am
Yes, converting either of them to an iTVF will almost certainly be vastly better than using a scalar function. As to which is better, I'd suspect the second but testing...
December 1, 2018 at 11:50 am
I'm not sure ChrisM's solution works in the general case - the various MAX's operate independently and so unless you can guarantee the values all ascend in time (which seems...
December 1, 2018 at 11:41 am
Viewing 15 posts - 1 through 15 (of 325 total)