Forum Replies Created

Viewing 15 posts - 331 through 345 (of 1,048 total)

  • RE: Execution Plan Changes With "TOP 1" And problem with the response time

    you must specify an ORDER BY clause with your select query with TOP...

    Without specifying ORDER BY sql server will give you any random no which is not correct

  • RE: Help with SQL query

    ChrisM@Work (7/22/2013)


    SELECT op, SUM(CASE WHEN dupes > 1 THEN 1 ELSE 0 END)

    FROM (

    SELECT op, imei, dupes = COUNT(*)

    FROM #mastertab

    GROUP BY op, imei

    ) d

    GROUP BY op

    thanks Chris....

    got you query...

  • RE: Help with SQL query

    ChrisM@Work (7/22/2013)


    SELECT op, SUM(CASE WHEN dupes > 1 THEN 1 ELSE 0 END)

    FROM (

    SELECT op, imei, dupes = COUNT(*)

    FROM #mastertab

    GROUP BY op, imei

    ) d

    GROUP BY op

    can you please explain...

  • RE: T-SQL

    Hugo Kornelis (7/22/2013)


    kapil_kk (7/22/2013)


    (...)

    In this example after putting clustered index we will data in ascending sorted order.... while before adding clustered index data was not coming in an order...

    I am...

  • RE: T-SQL

    Hugo Kornelis (7/22/2013)


    kapil_kk (7/22/2013)


    John Mitchell-245523 (7/22/2013)


    kapil_kk (7/22/2013)


    Yes you are right but user PRR asked a scenario only for clustered index and if a clustered index is used then it will...

  • RE: T-SQL

    John Mitchell-245523 (7/22/2013)


    kapil_kk (7/22/2013)


    Yes you are right but user PRR asked a scenario only for clustered index and if a clustered index is used then it will reorder of the...

  • RE: T-SQL

    hakan.winther (7/22/2013)


    kapil_kk (7/22/2013)


    PRR.DB (7/22/2013)


    If table doesn't have clustered index , there is no guarantee for order , if table having clustered index then result will display clustered index column...

  • RE: Hi Please help to resolve this Problem: Advance Thanks for given Solution

    mahi123 (7/22/2013)


    Thanks for your reply, I was try for this , but error msg was showing for that. do you have any example quer...

    what error message you got?

  • RE: T-SQL

    PRR.DB (7/22/2013)


    If table doesn't have clustered index , there is no guarantee for order , if table having clustered index then result will display clustered index column order.

    Is my...

  • RE: Hi Please help to resolve this Problem: Advance Thanks for given Solution

    you can create two foreign key constraint refering table table1 and table2 in your new table table3...

  • RE: T-SQL

    Thanks Pramod for the question.....

  • RE: Count and Percentage of skill ratings

    Can you please post the table strucutre with some sample data.....

  • RE: Substring takes 100%CPU

    You can also refer this link posted by Gail to another forum:

    http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx

  • RE: Unique Field

    Can you please some more information to us?

    Like, what is your data n tables and what output you want from that.......

  • RE: Query performance

    the information that you have provided here is not that much and we cant able to give you proper solution...

    please provide some more details...

Viewing 15 posts - 331 through 345 (of 1,048 total)