Viewing 15 posts - 22,141 through 22,155 (of 59,098 total)
Eirikur Eiriksson (12/27/2014)
Just brilliant as always Jeff, Chapeau!Quick modification, mainly dropping the ISNULL as the set will not contain any nulls
😎
Thanks, Eirikur. You're the consummate Gentleman and I'm frequently...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 12:07 pm
I use the terms "refactor" and "redact" as politically correct terms to explain what the effort will be when I'm going to fix some crap code. "Refactor" means that...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 11:34 am
TomThomson (12/28/2014)
Stefan Krzywicki (12/22/2014)
Steve Thompson-454462 (12/22/2014)
Stefan Krzywicki (12/22/2014)
When did we all start calling rewriting/reworking code "refactoring"?
I'm using that term here to describe changes to a code base that affect/improve the...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 11:30 am
Man, I feel for you. Those are some pretty heavy restrictions and they're not unlike the restrictions one will find in SQL Server CE (Compact Edition). You covered...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 10:16 am
Dave Ballantyne (12/28/2014)
If you can SELECT from a table you can SELECT from a view.
Just make sure you ORDER BY on...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 10:10 am
GilaMonster (12/28/2014)
Jeff Moden (12/27/2014)
It's actually difficult for me to believe that the front end can't produce or use a UNION ALL
You'll probably find that the senior guru expert development lead...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 10:08 am
Hugo Kornelis (12/24/2014)
DrKiller (12/23/2014)
wow what a complex way of doing it.I'm usually just doing this 🙂
DECLARE @tmpString VARCHAR(MAX)SELECT @tmpString = COALESCE(@tmpString + ', ' + productname, productname) FROM Header
SELECT @tmpString
Others...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 28, 2014 at 12:00 am
DrKiller (12/23/2014)
wow what a complex way of doing it.I'm usually just doing this 🙂
DECLARE @tmpString VARCHAR(MAX)SELECT @tmpString = COALESCE(@tmpString + ', ' + productname, productname) FROM Header
SELECT @tmpString
My only hang-up...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 11:52 pm
Guess I'll have to do my own testing because no one (unless I just missed it) has de-entitized the data in the XML method and the variable overlay method doesn't...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 11:47 pm
Michael L John (12/23/2014)
DrKiller (12/23/2014)
I'm usually just doing this 🙂
DECLARE @tmpString VARCHAR(MAX)
SELECT @tmpString = COALESCE(@tmpString + ', ' + productname, productname) FROM Header
SELECT...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 11:22 pm
Apologies. Forgot to post the code to create the clustered index. SQL Server REALLY likes unique indexes and REALLY likes NOT NULL columns. With that in...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 11:09 pm
As always, the documentation is in the code. First, the run results.
OPERATION ...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 10:40 pm
The following code will do it. It uses one form of dynamic SQL for most of it and another form for passing the impassible database name for the FROM...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 5:37 pm
I read the title and went into a panic! Heh... don't scare us like that!
We have room on our electronic timesheets to make notes for each entry. I...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 3:45 pm
The answer would be to convert your string-based dates to real ones to get the date differentials and sums and then apply either a Cross Tab or Pivot to it...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2014 at 3:19 pm
Viewing 15 posts - 22,141 through 22,155 (of 59,098 total)