Viewing 15 posts - 6,106 through 6,120 (of 8,731 total)
There are several options for these problems called gaps and islands. You could look for more information, but here's a good article: https://www.simple-talk.com/sql/t-sql-programming/the-sql-of-gaps-and-islands-in-sequences/
Here's an option:
WITH CTE AS(
...
July 22, 2014 at 9:19 am
Hardy21 (7/22/2014)
DECLARE @weekdaySelected NVARCHAR(50)
DECLARE @tableT TABLE
( ClassName NVARCHAR(10),
WeekdaySelected NVARCHAR(50))
SET @weekdaySelected...
July 22, 2014 at 8:50 am
Following Anthony's 8 parameters idea, but replacing the 7 IFs with a single WHERE. 🙂
DECLARE
@class char(1) = 'A',
@sun bit =...
July 22, 2014 at 8:46 am
Hey Bob,
I suggest that you stop using rCTEs to count as they're a form of hidden RBAR and will cause problems. And low row counts don't justify the use of...
July 22, 2014 at 8:29 am
So you went and read the page for the exam on Microsoft Learning https://www.microsoft.com/learning/en-us/exam-70-461.aspx. You can find a section called Preparation Options whoch include a variety of ways to prepare.
Additional...
July 21, 2014 at 2:57 pm
Why? How do you know you should get to 20, 40, etc? What are your expected results? Could you post sample data in a consumable format?
July 21, 2014 at 2:46 pm
sleon (7/21/2014)
Hello GuysReally seem like a very long way to do what pivot and unpivot do, or am I missing the point here?
You still need the groups and column identifiers....
July 21, 2014 at 7:53 am
Because the cursor is set to delete one ServiceLogID at a time.
Even after reading the comments, I'm not sure that it's a good solution, but I don't know the entire...
July 18, 2014 at 3:51 pm
jarupan (7/18/2014)
This is the first time I see about infinity switch. Does it mean unlimited growth in TempDB? If not, would you pleasee explain and how can I...
July 18, 2014 at 3:17 pm
The problem is that you're using old outer join syntax. You just need to change it as it's no longer supported.
SELECT a.assignee,
...
July 18, 2014 at 10:26 am
I'd say that the hardest feature to learn, is the one that you don't care about. I can learn many things as a developer, but don't ask me for HA...
July 18, 2014 at 10:03 am
T-SQL beginnger (7/18/2014)
Any help for the 2nd part guys ?
Sorry, not from me. I'm not sure I can work something out without some sample data to test.
July 18, 2014 at 9:47 am
Even if Jeff posted his great article, I wanted to post this thread where I compared the performance in 2 different scenarios.
http://www.sqlservercentral.com/Forums/Topic1537999-392-1.aspx
You could try it yourself and compare results. 😉
July 17, 2014 at 6:45 pm
John Roy Ellis (7/17/2014)
That article offers very little, in terms of anything along the lines of examples or knowledge transfer.I await another response.
Thank you.
John
You seem like a fast reader. It...
July 17, 2014 at 4:00 pm
vjonnal1 (7/17/2014)
I am bit confused here, what's preventing you to use PIVOT function here?
Maybe a simple preference to use cross tabs instead of pivot. That's my case at least.
Cross tabs...
July 17, 2014 at 3:51 pm
Viewing 15 posts - 6,106 through 6,120 (of 8,731 total)