Forum Replies Created

Viewing 15 posts - 61 through 75 (of 5,502 total)

  • RE: SQL query to understand the names of all the available tables , number of records in these tables and size of these tables

    For a quick overview you could use the Standard Reports from SSMS

    Right click on a database -> Reports -> Standard Reports -> Disc Usage by Tables



    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: find out the next top 10 that does not belong to the first top 10

    I'm sorry, my mistake.... (maybe due to the missing table def and sample data...)

    select postalcode, count(parcels) as Cnt, ROW_NUMBER() OVER(ORDER BY count(parcels) DESC ) as Ranking

    from TableParcel

    group by postalcode

    order by...



    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: find out the next top 10 that does not belong to the first top 10

    Without knowing what "earlier versions" refer to here's a solution using ROW_NUMBER

    select postalcode, count(parcels) as Cnt, ROW_NUMBER() OVER(PARTITION BY postalcode ORDER BY count(parcels) DESC ) as Ranking

    from TableParcel

    group by postalcode

    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: SQL Server Bill number Generating.

    Like I wrote before: not enough information.

    There are several ways to provide a unique billing number using SQL Server.

    Either a table with pre-generated numbers where a used number is marked...



    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 Server Bill number Generating.

    Not enough information.

    What system provides the billing number in the first place?

    If an app would request a billing number from SQL Server, it could be guaranteed that there'll never be...



    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?

    Lynn Pettis (8/30/2014)


    ...

    Page 1 is now ALL spam.

    Steve wrote a couple of days ago that developers will have a look at it.

    I truly hope that's not the result of it......



    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: Help Needed in Group by

    I'm not sure what you referred to regarding " issue it may cause".

    So let's talk about all aspects:

    1) WHERE DATEPART(MM, SR.SalaryDate) = DATEPART(MM, @Process_Date) without a check for a matching...



    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: Help Needed in Group by

    From my point of view there's a risk to get unwanted results from the previous year since there's only a comparison against the month value.

    Speaking of it: applying a function...



    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: TSQL to create Excel 2013 file

    What permission does the user have who's running that code?

    Based on MS Technet

    Only members of the sysadmin fixed server role can execute sp_OASetProperty.

    If you're not a member of the sysadmin...



    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: sp_send_dbmail to variable recipients

    see my previous reply using a loop.

    as a side note: it would be very helpful if you wouldn't flood all forums with your very same question (= numerous duplicate posts)....



    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: comlex query (order time record changes)

    Here's a solution based on the "Groups'n'Islands" concept:

    WITH cte AS

    (

    select *,

    ROW_NUMBER() OVER (ORDER BY point_of_time)-ROW_NUMBER() OVER (PARTITION BY name ORDER BY point_of_time) as NameGrp

    from #test

    ),

    cte_grp as

    (

    SELECT

    min(name)...



    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 send email using dbmail to email using from same table

    please don't cross post. Original post: link



    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: sp_send_dbmail to variable recipients

    farhana.sethi (8/24/2014)


    It worked for me. I sorted out by myself. ...

    Care to share your solution so others may benefit?



    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: sp_send_dbmail to variable recipients

    This is one of the rare scenarios where you'll have to use a loop and iterate through every distinct user.

    Assign the mail addresse to a separate variable (e.g. @userMail) and...



    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: TSQL to create Excel 2013 file

    this is not working for some reason

    doesn't include any details what the issue might be.

    Is there any error message?



    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 - 61 through 75 (of 5,502 total)