Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 5,502 total)

  • RE: XML or CSV File as a Linked Server?

    to load the content of an xml file you could use

    DECLARE @xml xml

    SET @xml = (SELECT * FROM OPENROWSET(

    BULK 'C:\temp\file.xml',

    SINGLE_BLOB) AS x)

    SELECT @xml

    For details...



    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: Are the posted questions getting worse?

    If we can ask for anything that new query tool should be able to handle, why not request two functions that would really help:

    1) refuse (or at least request special...



    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 I show YTD average at montly intervals?

    Glad I could help, Jay!!

    I'd like to thank you to follow my "hint" on calendar tables and to come up with that nice solution (instead of asking: "How do I...



    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 find the Rename filed

    duplicate post. Please continue here



    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: T-SQL 2005 selfjoin item audit table?

    What have you tried so far and where you got stuck?

    Did you try to left outer join on ItemNumber, ItemLocation and AuditDateTime (maybe even AuditUser) and t1.AuditSequence = t2.AuditSequence -1...



    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: DateDiff strangeness

    SELECT DATEDIFF(year,'2009-12-31 23:59:59.997', '2010-01-01 00:00:00.000')

    basically means

    SELECT DATEPART(YEAR,2nd value) - DATEPART(YEAR,1st value) -- which is 2010 - 2009 = 1

    If you'd like to get difference displayed as "years", but...



    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: Trouble with large set of data

    SQL Noob (11/18/2009)


    i've seen similar queries that hit multiple servers with the same or more rows take days to execute. you are better off working on smaller chunks of data...



    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: Allow only 1 combination for each value.

    If you'd normalize your table structure it would become easy:

    Take your test table, add a primary key and unique constraints on col1 and col2.

    This will give you unique combination.

    To reference...



    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 I show YTD average at montly intervals?

    I'm not sure if you do have a calendar table yet. If not, you really should think about using one. (search for "calendar table" on this site for details).

    To show...



    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: Tricky Problem with SET LANGUAGE, please help

    There are two issues:

    #1 get rid of the 'GO' command within your dynamic sql and

    #2 use exec(@sql) instead of plain exec @sql (sometimes parenthises matter...)



    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: Tricky Problem with SET LANGUAGE, please help

    Somewhere you have a typo...

    What you have:

    set langauge english

    vs. what you should have:

    set language english

    langauge is no reserved word. 😉



    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: RiskIdShortName IN (select * from dbo.fn_ParseString2(@P_RISKID,','))

    Would it be possible for you to show us the execution plan for the modified query (including the creation of the temp table)?



    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: RiskIdShortName IN (select * from dbo.fn_ParseString2(@P_RISKID,','))

    Florian Reischl (11/16/2009)


    Hi Lutz and Riga

    Be careful with joining table valued functions. Especially if the string split function works with schema table like spt_values or a Numbers/Tally table.

    Just had some...



    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: Result of Max() function for the varchar datatype in SQL

    To be a little more specific:

    to find the max sname is like searching for the largest ASCII value of the first position of sname, continues moving to the right for...



    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: Logins from 2000 to 2005

    Slightly off topic:

    would you mind stop qualifying your requests as "very urgent" or "urgent"? (Seems like it became a habit...)

    If you ar requested to migrate a db from SS2K to...



    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 - 4,741 through 4,755 (of 5,502 total)