Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 4,080 total)

  • RE: Round currency values

    There's nothing wrong with your CAST solution, andresito. It works perfectly for getting rid of the spare change.

    The reason(s) I used the modulo operator 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: select in a linked server

    Perhaps its a limitation of the Pervasive db?

    __________________________________________________

    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 return an XML query as one field

    Happy to help. 🙂

    __________________________________________________

    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?

    Grant Fritchey (3/25/2010)


    The Dixie Flatline (3/25/2010)


    ARID = Alternate Reality ID.

    I believe it's parameter 117, but I'd have to confirm that with Gail.

    And that's a GUID right?

    It...

    __________________________________________________

    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 return an XML query as one field

    You mean like this? Or am I missing something?

    DECLARE @X XML

    SELECT @X = ( SELECT * FROM sampleTable FOR XML AUTO )

    SELECT @X as [@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?

    ARID = Alternate Reality ID.

    I believe it's parameter 117, but I'd have to confirm that with Gail.

    __________________________________________________

    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: Round currency values

    Paul's solution will work. Just don't confuse it with the following code which will NOT work, in violation of the laws of algebra.

    select amount

    from ...

    __________________________________________________

    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?

    Trey, it's possible they are relying on DBCC TIMEWARP to provide point-in-time recovery.

    What is your ARID??

    __________________________________________________

    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: Round currency values

    Sure... just test if it is evenly divisible by 1. The modulo operator (%) returns the remainder of a division operator, so if Amount % 1 = 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: Can this CTE based query be written more efficiently?

    Actually, the original query is a cross-tab. It just uses a CTE instead of a subquery. The Case statements in the CTE convert the rows...

    __________________________________________________

    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: Row transpose

    Nabha, that looks like a winner to me.

    __________________________________________________

    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: Assign value to another fieldname using CASE statement

    It depends on whether or not it depends? :w00t:

    __________________________________________________

    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: Get minimum data without using MIN() function

    I'm about to start through Itzik Ben-Gan's "T-SQL Querying".

    If I run across an explanation, I'll let you know.

    __________________________________________________

    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: Creating Indices on Temp Tables from Stored Procedures

    It's not a hack. It's just one more tool in the toolbox. If it significantly reduces the run time of a job, then it's 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: Assign value to another fieldname using CASE statement

    Paul White NZ (3/25/2010)


    The Dixie Flatline (3/25/2010)


    Tell me you have a life outside SQL.

    (0 row(s) affected)

    SOM 😛

    __________________________________________________

    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 - 1,711 through 1,725 (of 4,080 total)