Forum Replies Created

Viewing 15 posts - 796 through 810 (of 2,458 total)

  • RE: XML to SQL tables

    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?

  • RE: XML to SQL tables

    -- 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...

  • RE: Replacing multiple characters in a string Dynamically

    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...

  • RE: Replacing multiple characters in a string Dynamically

    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...

  • RE: Trouble with using a list with new columns

    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...

  • RE: Cloud First

    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...

  • RE: free the cache - SQL Server Server

    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).

  • RE: Calculate Age (in years)

    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...

  • RE: Calculate Age (in years)

    MadAdmin (4/26/2016)


    What should the results for these test cases be?

    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...

  • RE: String Together Mulitple fields when not NULL

    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...

  • RE: Problems processing a measure group in SSAS 2012

    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.

  • RE: String Together Mulitple fields when not NULL

    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...

  • RE: Specialist or Generalist

    Great Editorial Steve!

  • RE: Counting

    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...

  • RE: Pivot rows into columns

    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...

Viewing 15 posts - 796 through 810 (of 2,458 total)