Viewing 15 posts - 3,916 through 3,930 (of 10,144 total)
GilaMonster (12/4/2013)
In unrelated news, slightly belated drum rolls please..<---------
Drum rolls with chocolate. Very few redundant words in all those posts.
December 5, 2013 at 6:26 am
Probably the best tool for this is a dynamic cross-tab. Jeff Moden has an excellent article here[/url]. If after reading the article you are still having difficulty, post back.
December 4, 2013 at 6:43 am
dwain.c (12/3/2013)
Steve,I thought you might want to see this:
http://www.sqlservercentral.com/Forums/FindPost1519227.aspx
By alerting you, I am not vouching for its veracity.
Dwain, I thought some of that code looked familiar - didn't we mess...
December 4, 2013 at 6:23 am
Steve Jones - SSC Editor (12/2/2013)
L' Eomot Inversé (11/24/2013)
December 3, 2013 at 2:20 am
Here's the simplest way. Without further information it's unlikely to be the best.
-- I have an Employee table with Columns:
DROP TABLE #Employee
CREATE TABLE #Employee (EmpID INT IDENTITY(1,1), FirstName VARCHAR(100), MiddleName...
December 2, 2013 at 6:59 am
This is likely to be an expensive process whatever you do. What's the purpose?
December 2, 2013 at 6:43 am
Jeff Moden (11/29/2013)
December 2, 2013 at 2:57 am
Jeff Moden (12/1/2013)
ChrisM@Work (11/26/2013)
Jeff Moden (11/25/2013)
rlortega (11/25/2013)
So what minimum T-SQL skills are necessary if you're a DBA, not a developer?
To be honest... learning to read minds and to anticipate "what's...
December 2, 2013 at 1:53 am
Note that you don't need CTE N6:
DECLARE @startdate DATE, @enddate DATE
SET @startdate = '00010101'
SET @enddate = '99990101';
with
N0 as (SELECT 1 as n UNION ALL SELECT 1) -- 2...
November 29, 2013 at 7:09 am
Run the following code, query by query. If you're still unsure, post back.
WITH
N0 as (SELECT 1 as n UNION ALL SELECT 1) -- 2 rows
,N1 as (SELECT 1...
November 29, 2013 at 7:07 am
Jeff Moden (11/26/2013)
As a bit of a sidebar, I especially like the one about "make it work, make it fast, make it pretty" except you left off the 4th item...
November 28, 2013 at 2:02 am
Jeff Moden (11/25/2013)
rlortega (11/25/2013)
So what minimum T-SQL skills are necessary if you're a DBA, not a developer?
To be honest... learning to read minds and to anticipate "what's coming" by keeping...
November 26, 2013 at 6:35 am
If your hierarchy is likely to remain consistent then this may be more efficient than a rCTE:
DROP TABLE #Entity
CREATE TABLE #Entity (EntityId INT, EntityTypeId INT, Description VARCHAR(100), ParentEntityId INT)
INSERT INTO...
November 25, 2013 at 7:10 am
Lynn Pettis (11/20/2013)
sunil.mvs (11/20/2013)
Thanks Chris ...The solution is as expected.. but need to check performance .
Thanks
Surya Sunil
You should also make sure you understand how...
November 21, 2013 at 6:27 am
Here's a simple islands'n'gaps solution as suggested by Koen:
DROP table #temp
CREATE table #temp (SysKey int ,BusName varchar(9) ,BusType varchar(6) ,StartDateKey int ,EndDatekey int )
Insert into #temp (SysKey ,BusName,BusType,StartDateKey,EndDatekey)
Select...
November 20, 2013 at 6:58 am
Viewing 15 posts - 3,916 through 3,930 (of 10,144 total)