Forum Replies Created

Viewing 15 posts - 1,201 through 1,215 (of 2,894 total)

  • RE: simple que

    harri.reddy (9/14/2012)


    thanks for your response,

    for my other question,

    it was something ,if i define global variable in sp,will it can be access in inside stored procedure

    Could you please advise...

  • RE: T-SQL Help Needed

    I don't think we will see J.C. back to this discussion. He is out training people and writing books to add to his signature

    In my previous post I've tried to...

  • RE: T-SQL Help Needed

    Sorry, Joe, but your answers are not only inappropriate, but also will introduce bad limitations in design, I have very strong words to say about your advices, but I will...

  • RE: simple que

    create one!

    try this one:

    select top 1000000 1 as a

    into #t

    from sys.columns c1

    cross join sys.columns c2

    cross join sys.columns c3

    cross join sys.columns c4

  • RE: simple que

    harri.reddy (9/13/2012)


    hi,

    i have 1 table which has millions of rows, i am doing select * from tablename

    and select count(*) from tablename

    does this both take same time or different,if different then...

  • RE: NOT IN query very expensive, 100% CPU

    CELKO (9/13/2012)


    I was under the impression it's best to avoid temp tables if you can though. Is that not accurate?

    It is accurate. We have derived tables and CTEs which...

  • RE: NOT IN query very expensive, 100% CPU

    ...

    Sorry, but IDENTITY is not a candidate key at all. But why would you actively try to program with proprietary features?

    May be here you could finally suggest a good...

  • RE: T-SQL Help Needed

    ScottPletcher (9/13/2012)


    Eugene Elutin (9/12/2012)


    Greg Snidow (9/12/2012)


    Jeff Moden (9/12/2012)


    Greg Snidow (9/11/2012)


    The 'id' column in every table was a bit annoying to work with.

    It's even more annoying when you need it and...

  • RE: NOT IN query very expensive, 100% CPU

    scogeb (9/13/2012)


    Eugene Elutin (9/13/2012)


    Who gave you such impression or where did you take it from?

    Quite often splitting tasks using temp tables will not only significantly boost performance of complicated...

  • RE: NOT IN query very expensive, 100% CPU

    ...

    Yep, that works too and I get accurate results in 2 seconds or so. I was under the impression it's best to avoid temp tables if you can though....

  • RE: Data Comparison

    1. How many groups you are going to compare at once?

    2. If the answer to the first question is two, will you provide GroupId's for groups to compare into the...

  • RE: NOT IN query very expensive, 100% CPU

    Can you try this:

    SELECT column1,'99' [a],left(column2,2) , max(column3) [c], 'Yes' [d], 'Test' [e]

    ,ltrim(rtrim(column1))+ltrim(rtrim(left(column2,2))) as test

    INTO #pre1

    FROM...

  • RE: Order by with case

    OK, I've missed the "change of concept" from OP.

    However, I still advice to use dynamic SQL. Why? I kind of think that it will perform better here...

  • RE: NOT IN query very expensive, 100% CPU

    ...

    If you did it in the office...

    Looks like he is not working in the "office". He is a TEACHER!

    I just can only image that his students love him...

  • RE: T-SQL Help Needed

    aaron.reese (9/13/2012)


    consitency is the important thing here.

    I prefer the PK to be called ID.

    TABLE.ID refers to this tables PK

    TABLE.SOMETABLE_ID refers to the related tables PK and infers a single field...

Viewing 15 posts - 1,201 through 1,215 (of 2,894 total)