Forum Replies Created

Viewing 15 posts - 976 through 990 (of 4,080 total)

  • RE: What Indexes Do You Suggest?

    EdA ROC (7/19/2011)


    And the plot thickens... :laugh: :crying:

    Well, that is exactly what I did!. My notes from reading about indexes are not correct. I thought (wrote...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: What Indexes Do You Suggest?

    The reason for the question was that if you are usually looking for all the forms belonging to a particular job, it might be a better idea to have the...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Aggregate Functions

    That's fine, Theomed. I hope the CASE example was of help to you.

    In the future, you might find it useful to read this article[/url] to see how...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Dynamic CTE?

    Look at the previous thread he posted at the top, Mike. The way you know is by the sequence of the rowIDs, in his base table.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Aggregate Functions

    I'm assuming you are new to SQL, because (1) you have spaces in your column names and (2) you are asking us to list your source data together with totals...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: What Indexes Do You Suggest?

    NVARCHAR(1) !!

    I love it. I have to change my signature line now.

    Seriously, I do want to ask a question, since you said that JobNum/FormNum is unique. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Turn negative numbers into 0

    And also...

    -- To make result = 0 when @test < 0

    declare @test int -7

    select (ABS(@test)+@test)/2 as result

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Turn negative numbers into 0

    Use a cte, like so:

    ;with cte (newvalue) as (select COALESCE etc FROM sometable)

    select case when newvalue < 0 then 0 else newvalue end as newvalue from cte

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Convert Recursive Stored Procedure to WITH CTE PeopleSoft HCM

    I've glanced at the code and it may be possible to improve it. But it would be really nice to see the schema of the tables involved, including...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Dynamic CTE?

    make this example dynamic based on unlimited exams (with 1 student per exam), students, tests and results

    The way I read this, guys. He wants a solution that...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: loops

    kramaswamy (7/18/2011)


    @jeff,

    I understand the relucatance to use loops in order to do set-based processing, but lets say you had a table which had a million records in it, and which...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: probem with declare

    From the article I deduced it is bad to use select , because you have possible multiple rows. SET doesn't allow for multiple rows, values, if it does then I...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: how to show multiple results on a single row

    Randy, search SSC for forums and articles with the keywords PIVOT or "cross tab", to see how you can turn rows into side by side columns. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    As Per Vegas - you would miss me. I don't live there anymore.

    Whups, sorry Jason. :blink:

    You must have moved when I was absent from the...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: probem with declare

    jw: I can't seem to use the link you posted up.

    But when populating variables from columns in a table, would you seriously use

    set @a = (select column_A...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 976 through 990 (of 4,080 total)