Viewing 15 posts - 796 through 810 (of 2,458 total)
squvi.87 (4/28/2016)
any set based approach? with out using cross apply ?
XML is a different animal...
When did CROSS APPLY become the "not set based" approach?
April 28, 2016 at 5:49 am
-- sample table
DECLARE @demo TABLE
(
SomeID int identity, -- you need this to know the source of your XML
SomeXML XML
);
-- insert a couple xml values
INSERT @demo
VALUES...
April 27, 2016 at 11:09 pm
Two year old thread but other languages such as PL/SQL, XSLT & SAS have a "translate" function which is a single-character "nested replace" function. This is one of those extremely...
April 27, 2016 at 10:42 pm
zootie (4/27/2016)
-- Inspired by D. Camps NestedReplace () on http://www.sqlservercentral.com/Forums/Topic1542417-392-1.aspx
You've written a very interesting function sir, very clever. That line above stood out to me. I don't know if you...
April 27, 2016 at 10:36 pm
Perhaps it's a shot in the dark and I don't know anything about Sharepoint lists but, if you can write a stored proc that accesses the XML in a SQL...
April 27, 2016 at 10:10 pm
Cloud DB Servers mean you have to rely on architecting your solution correctly and designing your schema properly. Failing to do so results in a big bill every month.
The ability...
April 27, 2016 at 8:36 pm
I'm with Jeff - sounds like your stats are not getting updated. You should check your Auto Update Statistics setting for your databases (right click DB, go to options).
April 27, 2016 at 8:11 pm
Jeff Moden (4/10/2016)
From the Article:
See Comments in the code for more details.
Awesome. I don't very often see such a useful bit of header information. You've provided a succinct...
April 27, 2016 at 7:55 pm
MadAdmin (4/26/2016)
SELECT age FROM dbo.YearsApart('2/28/2002','02/28/2003');
SELECT age FROM dbo.YearsApart('2/28/2003','02/28/2004');
SELECT age FROM dbo.YearsApart('2/29/2004','02/28/2005');
SELECT age FROM dbo.YearsApart('03/01/2004','03/01/2005');
Edit : Seems that how you handle leaplings depends...
April 27, 2016 at 7:51 pm
rjjh78 (4/27/2016)
thank you very much!
Make sure not to use my solution (not my best work - but I was in a hurry). Both Jeff and Luis posted brilliant solutions. I...
April 27, 2016 at 7:41 pm
Thanks PB_BI. After a little more analysis I discovered that it was in fact an issue related to stale metadata which was resolved by restarted the SSAS service.
April 26, 2016 at 9:24 pm
This will get you there except when the first or last fields are NULL. I'll let you figure that out or perhaps someone else will jump in to seal the...
April 26, 2016 at 9:20 pm
mailtoashokberwal (4/25/2016)
Thanks 🙂I tried another approach with CTE and that works fine too.
WITH cte(a)
AS
(
SELECT 1
UNION ALL
SELECT a+1 FROM cte WHERE a<10000
)
SELECT * FROM cte OPTION(MAXRECURSION 10000)
That's going...
April 25, 2016 at 7:24 am
No need to use Pivot at all. Here's Robert's sample data in a temp table (using a temp table so I can show you how to index correctly for my...
April 24, 2016 at 6:56 pm
Viewing 15 posts - 796 through 810 (of 2,458 total)