Forum Replies Created

Viewing 15 posts - 10,396 through 10,410 (of 15,374 total)

  • RE: Query Help

    cooljagadeesh (10/11/2012)


    select dtStartDate,dtRunDate from #TestDates

    cross apply (select top 1 * from #EnrollmentDates

    where dtRunDate<=#TestDates.dtStartDate order by dtRunDate desc ) b

    This looks strikingly similar to the one I posted...

  • RE: Long job crashes the website

    Boris Pazin (10/11/2012)


    Sean Lange (10/11/2012)


    I seem to have steered you off topic.

    No, I really appreciate because you spent your time to think about my problem. Thank you.

    Sean Lange (10/11/2012)


    Are you...

  • RE: Long job crashes the website

    Boris Pazin (10/11/2012)


    Sean Lange (10/11/2012)

    In your case you are processing 200 rows and it takes 2 hours. That screams of a serious need of performance tuning. I bet you can...

  • RE: Long job crashes the website

    Boris Pazin (10/11/2012)


    Sean Lange (10/11/2012)


    Boris Pazin (10/11/2012)


    Sean Lange (10/11/2012)


    If the job is taking 2 hours maybe you need to look at making the job run faster? That seems like a...

  • RE: Searching in stored procedures.

    You should check out RedGate's SQL Search. It is a free plugin for SSMS and it is very solid tool for this type of thing. http://www.red-gate.com/products/sql-development/sql-search/%5B/url%5D

  • RE: Long job crashes the website

    Boris Pazin (10/11/2012)


    Sean Lange (10/11/2012)


    If the job is taking 2 hours maybe you need to look at making the job run faster? That seems like a long time for a...

  • RE: Delete existing records, after inserting new record

    ChrisM@home (10/11/2012)


    Why don't you use UPDATE instead of inserting one row and deleting one row?

    Because now we get increased index fragmentation, page splits and a slower process?

  • RE: Any alternate solution?

    How is the performance from the select? It seems like you can't have that many rows. I am assuming the SegmentNo is a unique value? With a small int you...

  • RE: Long job crashes the website

    If the job is taking 2 hours maybe you need to look at making the job run faster? That seems like a long time for a job to me.

  • RE: Query Help

    Lokesh Vij (10/10/2012)


    This query would give the best performance from all the queries posted above 🙂

    SELECT dtStartDate,

    (SELECT Max(dtRunDate)

    ...

  • RE: Antother Delete Duplicates Thread

    You are quite welcome. Thanks for letting me know that worked for you.

  • RE: SELECT TOP(100 PERCENT) in Derived Table

    As Michael said you need the TOP when using a derived table and an ORDER BY.

    What I don't understand is why there is a need to have an order by...

  • RE: Query Help

    yogi123 (10/10/2012)


    Sean Lange (10/10/2012)


    This looks a lot like homework. We don't typically provide answers for homework because we want you to learn.

    However, it seems you want the most recent date...

  • RE: Query Help

    This looks a lot like homework. We don't typically provide answers for homework because we want you to learn.

    However, it seems you want the most recent date prior to the...

  • RE: Antother Delete Duplicates Thread

    Here is an example of one way of deleting duplicates. There are plenty of other ways to do this.

    create table #Dupes

    (

    IdentityValue int identity not null,

    UserValue varchar(20),

    AnotherValue varchar(10)

    )

    insert #Dupes

    select 'asdf', 'Another'...

Viewing 15 posts - 10,396 through 10,410 (of 15,374 total)