Viewing 15 posts - 91 through 105 (of 458 total)
The max list is easy enough to produce. Sorry, I don't fully understand the 'OK' part well enough yet to add that to the query. 'OK' just meaning that...
September 1, 2020 at 7:13 pm
SELECT a, MAX(CAST(b AS varchar(2)) + c)
FROM (VALUES
('A', 1, 'a'),
('A', 1, 'b'),
('A', 1, 'c'),
('A', 2, 'a'),
('B', 1, ''),
('B', 1, 'a'),
('B', 1, 'b'),
('B', 2, ''),
('C',...
September 1, 2020 at 12:45 pm
Okay, I made up a few sample rows. If you need more, let me know. The code is what I'm using now, and you can see both what it produces,...
September 1, 2020 at 12:19 pm
Would you please provide directly usable data, i.e. CREATE TABLE and INSERT statement(s) for the sample data. [A splat of data on the screen does us no good to...
September 1, 2020 at 10:38 am
... we get companies that require NOLOCK in every query (and yeah, run across this one many times now).
Seriously? An official, company-wide mandate to DB coders to use this? That...
September 1, 2020 at 8:45 am
It's amazing what you sometimes find, but we probably shouldn't be too harsh on the author. I've certainly found my share of garbage in my own code on later reviews....
May 9, 2020 at 9:34 pm
Maybe I'm missing something, but I have to wonder why this was ever done in dynamic. I use a fair amount of dynamic, but only after first trying without. Only...
May 9, 2020 at 10:53 am
I've thought a few times about applying for a job at Microsoft, not in the normal way, that I want to work for the company, but with the specific goal...
April 2, 2020 at 8:21 am
Anyone?
The documentation for STGeomFromText only lists strings as possible inputs. How about using STUFF and FOR XML to build that string? It's a bit clunky, but it probably beats...
April 1, 2020 at 9:33 am
How well does this perform? I admit it's interesting, and shows techniques I didn't even know existed, but is it more complex than necessary?
I have always used a simple self-join...
March 30, 2020 at 9:59 pm
Thank you. Losing all data is NOT going to happen – I've got multiple backups all over the place, on-site and off. Transaction log every 15 minutes, differential every hour...
March 9, 2020 at 3:04 pm
Yes, I was trying to upgrade in place, over the existing installation, to avoid having to migrate everything. It's a fairly simple setup, but still, copying everything over manually is...
March 9, 2020 at 12:22 pm
But I think you've answered my question. If the indexed view will only be considered in Enterprise, then the extra columns are pointless, and my indexed view would be better...
March 4, 2020 at 10:32 pm
I'm still using 2008 R2 standard edition. But I'm looking at upgrading to 2014. Nothing newer will run on the OS this server has, and I don't know if I...
March 4, 2020 at 10:30 pm
The requirements are to look up and filter by conditions in the data, almost always at least partly by the letter. I would not use this filtered view directly, I...
March 4, 2020 at 10:03 pm
Viewing 15 posts - 91 through 105 (of 458 total)