Forum Replies Created

Viewing 15 posts - 361 through 375 (of 1,228 total)

  • RE: facing serious performance issues, please see the scenario below need urgent help - Please chk the code below

    saxena200 (1/25/2013)


    PFA, Actual plan

    Sorted - it's running those results unaggregated into the table variable which is costing so much. I'd guess you might get a 20-fold lift by aggregating each...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: facing serious performance issues, please see the scenario below need urgent help - Please chk the code below

    Lowell (1/25/2013)


    also, my rule of thumb is that any @TableVariable with more than a few hundred rows should be a temp table instead, to allow the system to automatically do...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Create string using input values

    Sql Student-446896 (1/25/2013)


    Hi,

    I have a beginning Year and a End year and i have to compute/create a string based on the given years.

    Example:

    Input: BegYr = 2013 and EndYr = 2015

    Output:...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: How can we calculate Age of employee?

    Lynn Pettis (1/24/2013)


    r_slot (1/24/2013)


    I am using your code of course.

    Good. Now, if you would please post the code you are are using, not just refer me to my old...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    SQLRNNR (1/24/2013)


    ChrisM@home (1/24/2013)


    SQLRNNR (1/24/2013)


    john.arnott (1/24/2013)


    Am waiting with bated breath to see if "Saint" Lynn lives up to his kind and understanding reputation. Someone stumbled on an old QOD...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: comparing two tables with similar columns

    How about EXCEPT?

    SELECT 'TableA', *

    FROM (

    SELECT * FROM TableA

    EXCEPT

    SELECT * FROM TableB

    ) a

    UNION ALL

    SELECT 'TableB', *

    FROM (

    SELECT * FROM TableB

    EXCEPT

    SELECT * FROM TableA

    ) a


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Are the posted questions getting worse?

    SQLRNNR (1/24/2013)


    john.arnott (1/24/2013)


    Am waiting with bated breath to see if "Saint" Lynn lives up to his kind and understanding reputation. Someone stumbled on an old QOD thread about...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: How can we calculate Age of employee?

    r_slot (1/24/2013)


    I am using your code of course.

    I haven't posted it yet! :w00t:


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Help with implemting phonetic algorithm

    Abu Dina (1/23/2013)


    Lol Chris you scare me.... And embarrass me at the same time.

    Simple solution....

    This is another addition to the various phonetic algorithm implementations I have. Always hoping for better...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: UNION ALL and left join causing odd results

    Hack your query down to the minimum which still exhibits the strange behaviour you are observing. If you haven't figured it out by the end of the exercise, code up...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Check for existence of a single value for all rows in a column

    Try searching for dwainc's article CROSS APPLY VALUES, it's the simplest solution for this. If you can't find it, post up ddl and dml for your 50-row table. The link...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Help with implemting phonetic algorithm

    Abu Dina (1/23/2013)


    Hi Chris hope you're well!

    Thanks for the thread. I shall go and have a thorough read in a mo.

    I'm really grateful you brought my attention to iTVF Last...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: ? on Finding the most recent record prior to a date field??

    It looks like you are using a query designer for this, and worryingly, it looks like the result has been achieved by accident rather than by design. Here's the full...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Help with implemting phonetic algorithm

    How are you doing, Abu Dina?

    As luck would have it, one or two of us have been experimenting with exactly this requirement here on this thread, which will continue to...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Need Alternate Solution

    sqlbi.vvamsi (1/22/2013)


    this should suffice

    declare @mn money=-1000000

    select replace(CONVERT(varchar(50),@mn,1),'.00','') as mn

    No, that's "Western" format. The OP requires Indian format. This Wiki article gives a good explanation.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

Viewing 15 posts - 361 through 375 (of 1,228 total)