Forum Replies Created

Viewing 15 posts - 5,341 through 5,355 (of 5,502 total)

  • RE: Convert XML to relational form using attribute values

    Hi Tim,

    sorry for the mistake in my previous post. I've been typing while thinking, not after...

    The following code should work regardless of _KEY value structure.

    Side note: If possible, please avoid...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Convert XML to relational form using attribute values

    Hi Tim,

    are the values for _KEY in your real scenario always numbered with prefix (like FIELD1, FIELD2, .., FIELD102)?

    If true, there would be a way to get the result without...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Spliting XML file into Parent/Child table using SSIS package

    What do you mean by "tables"? Could you please provide the structure you want to insert the data?

    Also, your requirement of "load all the values into a table" seems contradictory...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: query results to excel

    Are you sure the provider is installed on your server?

    Similar issues have been discussed on different threads before.

    You might find a solution at http://www.sqlservercentral.com/Forums/FindPost445277.aspx or http://www.sqlservercentral.com/Forums/FindPost544672.aspx.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: query results to excel

    It looks like you're missing two quotation marks:

    One at the end of 'Microsoft.ACE.OLEDB.12.0 and one at the beginning of Database=C:\contact.xlsx.

    Also, there seems to be a mismatch of commas/semicolons as per...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Converting Varchar value

    The problem is within in your case statement:

    The DATEDIFF function returns an integer, so the resulting value of the CASE statement is always an integer as well. So your ELSE...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to performance this query

    I don't consider myself a tuning expert at all but I recognized a few things:

    1) The parameter @p_Regions,@p_States, @p_MetroIds seems to hold comma separate lists. Instead of calling the split...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Importing html pages into SQL Server 2005 table

    Hi Rob,

    the structure of the word file -even if it's saved in XML format- wouldn't let you extract the data into SQL Server in a format you'd probably expect or...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select Data in XML

    GSquared (5/29/2009)


    In the OP's example XML, the elements were uppercase on my screen. That might be something with the scripts on the page, but it's how they show on...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How do you save the results to a HTML file from a scheduled query in SQL Server Agent

    Conversion to html format usually is done by a frontend application.

    What you could look into is XQuery to save the data in XML format.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to get the start date of the Week

    @vkoka

    would this solution help (based on one of Lynn's date routines)?

    declare @wk int

    set @wk =22

    select dateadd(wk, datediff(wk, 0, dateadd(dd,(@wk-1)*7,'20090101')), 0)

    /* result

    2009-05-25 00:00:00.000

    */



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to get the start date of the Week

    Lynn Pettis (5/27/2009)


    select dateadd(wk, datediff(wk, 0, dateadd(dd, -1, @ThisDate)), 0);

    Nice one...

    As simple as efficient. 🙂

    Thanxalot, Lynn.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to get the start date of the Week

    Hi Lynn,

    your date routines are really helpful!

    One question though:

    When I try "set @ThisDate = '20090524'" I get "2009-05-25 00:00:00.000" as Beginning of this week (Monday) which is "strange" - at...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to get the start date of the Week

    The calculation depends on the value of the system parameter @@datefirst during the session where you calculate the first day of week.

    By default this is set to 7, meaning Sunday....



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Copying code

    There is an article by Brad McGehee at http://www.sqlservercentral.com/articles/Editorial/66637/ (Online T-SQL Scripts and Copyright) which discusses exactly the issue you're asking about.

    You might find helpful answers in the article...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 5,341 through 5,355 (of 5,502 total)