Forum Replies Created

Viewing 15 posts - 3,286 through 3,300 (of 10,144 total)

  • RE: Help\Advice on building a query

    WITH Cases AS (

    SELECT * FROM (VALUES

    ('SystemA', 'Case1', '2013-07-11 13:17:09.000', '2013-07-15 12:05:03.000'),

    ('SystemA', 'Case2', '2013-07-12 16:27:50.000', '2013-07-12 16:29:12.000'),

    ('SystemA', 'Case3', '2013-07-12 17:30:32.000', '2013-07-12 17:40:11.000'),

    ('SystemA', 'Case4', '2013-07-12 19:00:24.000', '2013-07-12 19:04:14.000'),

    ('SystemA', 'Case5', '2013-10-01...

  • RE: Issue with a slow Query

    T.Ashish (6/9/2014)


    Thanks Chris.

    Yes, I had already tried creating # table as you advised. This was showing lot of improvement in i/o stats as main part was executing only 1 time...

  • RE: Issue with a slow Query

    T.Ashish (6/9/2014)


    Hi all,

    I have attached a script and its execution plan for your review.

    We are working for a long time on optimizing this script, and latest modification I did was...

  • RE: Just curious, what are your SQL pet peeves ?

    SQL is delicious (6/6/2014)


    Koen Verbeeck (6/6/2014)


    gbritton1 (6/6/2014)


    Koen Verbeeck (6/6/2014)


    TomThomson (6/6/2014)


    Just a couple of examples: A British colleague who held an A-level in math and a bachelor's in business swore...

  • RE: Interview Questions

    julian.fletcher (6/6/2014)


    .. I should have said that we're looking for developers to work on all parts of a particular product; both the C# and the SQL. We're not big enough...

  • RE: Interview Questions

    julian.fletcher (6/5/2014)


    I work for a company of about 50 people in Oxford and am involved in the recruitment process - we're looking for developers with at least a couple of...

  • RE: Just curious, what are your SQL pet peeves ?

    Koen Verbeeck (6/5/2014)


    I prefer the alias with the equal sign. It is very easy to align everything, especially when you have larger expressions.

    It's hard to believe this I know, but...

  • RE: No results...

    pk2dpvp (6/6/2014)


    If I change WHERE to AND it gives me this..:

    (408014 row(s) affected)

    which with where is:

    (2054 row(s) affected)

    ---------------------------------------------

    Isn't this because it doesn't know what to do with AND so it...

  • RE: No results...

    The first query may not be doing what you expect. If you reference a column from a left-joined table in the WHERE clause, the left join is converted to an...

  • RE: Trying to remove cursor

    -- TESTING

    -- Set up a CTE with agent numbers expanded out, randomly number the rows within each QueueID

    ;WITH RandomAgents AS (

    SELECT QueueID, AgentID, rn = ROW_NUMBER() OVER(PARTITION BY...

  • RE: How to avoid while loop in this - taking lot of time to retrieve data

    vinodkumark_mca (6/5/2014)


    Hello,

    Thanks for your feedback.

    I have attached the related tables and functions in "Queries.txt" file.

    The testing data is shared in "TestingData.xls" file.

    Please look into issue and let me know if...

  • RE: Selecting Distinct From Multiple Tables

    Hrhb.mail (6/5/2014)


    Where are you adding your conditions? Can you post the code that gives you an error?

    Thanks, I solved it.

    This is my final stored procedure:

    Create PROCEDURE [dbo].[NewsPageWise]

    ...

  • RE: how to remove next and previous record is amount = 0?

    Jeff Moden (6/3/2014)


    Eirikur Eiriksson (6/3/2014)


    Jeff Moden (6/2/2014)


    Unless this was an accidental duplication of data, there's no way that I'd do this. You're destroying historical data.

    Second that but then again...

  • RE: Not Exists

    ramana3327 (6/1/2014)


    Actually I am getting some syntax error while executing that, so in the mean while I posted here to find any alternative.

    ramana3327 (5/31/2014)


    DELETE TableB WHERE studentID = @studentID

    IF NOT...

  • RE: t-sql 2008 exlain select

    ScottPletcher (5/30/2014)


    I think the overhead of XML is unwarranted here...

    Yes you're right, with a fixed number of rows, FOR XML PATH is probably overkill.

Viewing 15 posts - 3,286 through 3,300 (of 10,144 total)