Forum Replies Created

Viewing 15 posts - 3,016 through 3,030 (of 4,080 total)

  • RE: How to simplify a "negative a zero" formula

    Using old school technique, you could use subqueries instead of CTEs to do it in steps. I'm sorry that WITH gives you a problem, because I find CTEs...

    __________________________________________________

    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: SQL convert 1 column's values to 1 row string

    Sorry if the entire thread was too intimidating, but the FOR XML technique doesn't require that you know the values in advance.

    Here it is applied to...

    __________________________________________________

    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?

    Although I have no preference, aren't they using VB with SSIS?

    __________________________________________________

    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: Do you need Dynamic SQL to query multiple databases?!

    I have nothing against synonyms, but wouldn't the use of synonyms require distinct sets of code for each synonym accessed? When pulling numbers from similar tables in...

    __________________________________________________

    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 simplify a "negative a zero" formula

    Just a suggestion, for readability purposes, use CTEs to build up what you want step-by-step. You don't take a performance hit because the optimizer treats it as 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

  • RE: Performance issue with tally solution

    I have no doubt they could create additional functions within SQL. Look at what can be done with FOR XML concatenation now. If they chose, they could...

    __________________________________________________

    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: Do you need Dynamic SQL to query multiple databases?!

    Our head DBA and I both agree that using dynamic SQL to pull together information from multiple databases is a good way to go. In our...

    __________________________________________________

    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 simplify a "negative a zero" formula

    Just out of curiousity...

    Why are you looking for a solution like

    @X = ( @X + ABS(@X) ) / 2

    instead of

    @X = CASE WHEN @X <0 THEN 0...

    __________________________________________________

    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: Performance issue with tally solution

    A thought here for some of you who might have the ear of the powers that be at Microsoft. Given that CLR is demonstrably faster at some things...

    __________________________________________________

    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: SQL convert 1 column's values to 1 row string

    This is a fairly common question. Various solutions are posted here:

    http://www.sqlservercentral.com/Forums/Topic695359-338-1.aspx#bm695486

    Take a look at the FOR XML solution near the front, and please let me know if you...

    __________________________________________________

    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 simplify a "negative a zero" formula

    Ask and ye shall receive...

    No promises about efficiency, but it's not a case statement either 😉

    -- for any given function or expresion "@X"

    declare @x int

    set @x = -5

    while @x...

    __________________________________________________

    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?

    I wonder if he will be able to put 2 and 2 together

    Hey Lynn,

    I told your friend a long time ago that his problem is 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: Are the posted questions getting worse?

    secretly part of The Thread's plans to take over the world

    GUS!!!! :w00t:

    Shhhhhhhhhhhhhhhhhhhh!!!!! Next thing you'll be blabbing about the secret handshake. 😛

    __________________________________________________

    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?

    THREAD be not proud, though some have called thee

    Mighty and dreadfull, for, thou art not so...

    OLD?

    Old age hath yet his honour and his toil;

    The Thread closes all: but something ere...

    __________________________________________________

    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 Format Phone Number

    Good point, Jack. Although we do formatting at the db level for consistency, if you just stored phone numbers as integers, you would trim fat out of...

    __________________________________________________

    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 - 3,016 through 3,030 (of 4,080 total)