Forum Replies Created

Viewing 15 posts - 4,651 through 4,665 (of 5,502 total)

  • RE: SQLXML4 & CR/LF

    I cannot verify what you describe.

    Since you didn't provide any sample data supporting your statement I made some up.

    DECLARE @t TABLE (id int, data xml)

    INSERT INTO @t

    SELECT 1,'

    <Block>

    ...



    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: Dateadd, Datediff function Question

    bigclick (12/23/2009)


    Our vendor was able to give us an example.

    Call Begin Date: 12/03/2009

    Call Begin Time: -100

    Call End Date: 12/04/2009

    Call End Time: ...



    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: SQL Pivot Query

    oliver.morris (12/23/2009)


    brief thought could you use a view to pull in the dynamic data and run the pivot t-sql on the view - you would need to now what the...



    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 loop through fields rather than records...

    First of all: Don't loop! (unless you'll get paid per second your code runs...) 😉

    You could use UNPIVOT (see BOL for details) to get the table "flattened".

    With the resulting 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: Can I use PIVOT for this Problem?

    Is there any column available to know which rows belong together (even an ID column would be ok as long as all rows after one entry with 'email' would belong...



    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?

    Alvin Ramard (12/22/2009)


    I'm about to go offline for the next week or two, so it's time to wish y'all a very Merry Christmas and a Happy New Year.

    🙂

    Same...



    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: CONCATENATE fields in JOIN

    Well, then your friend must have had a lot more information available than we did...

    How else could he come up with Row_Number when there was nothing in your post indicating...



    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: StoreProcedure not reteurning any rows which containg local variables

    Well, I doesn't look like the results for those two variables will always be NULL...

    Reason: the query most probably won't run at all.

    I just tested the part with the subselect...



    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: CONCATENATE fields in JOIN

    Why concatenate?

    Since both are int, I'd use

    SELECT Year * 100 + Period From TableA.



    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: StoreProcedure not reteurning any rows which containg local variables

    You could use CTEs (common table expressions) to determine @Total2 (see BOL for details).

    This would make the whole query much more readable and most probably would make it more obvious...



    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: StoreProcedure not reteurning any rows which containg local variables

    What exactly are you trying to do?

    The way this proc is written it will fail as soon as you have more than one row having [ReportId]=@ReportId.

    Even though you added ORDER...



    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: Inserting data into very first and very last row

    The physical order doesn't really matter that much...

    If your table has a clustered index, new rows will be inserted in the physical order, maybe causing to physically move other rows...



    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

    What have you tried so far?

    If nothing yet you might want to look into BETWEEN clause in BOL (BooksOnLine, the SQL Server help system).



    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 exponential Number to non-exponential numbers...

    Within SQL Server the max precision (or "length") of a number is 38.

    So, you could use

    SELECT convert(numeric(38,0),cast(@t AS float))

    But you have to be careful for several reasons:

    1) if you...



    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: Performance problem for back dated entry

    What level of experience do you have with SQL Server?

    If none or limited, I recommend to either get some training or to have a 3rd party involved doing the conversion...



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