Forum Replies Created

Viewing 15 posts - 331 through 345 (of 4,080 total)

  • RE: Searching set of words by ignoring spaces

    Luis Cazares (8/25/2016)


    The Dixie Flatline (8/25/2016)


    But isn't the problem with just replacing spaces is that it doesn't deal with other special characters?

    It depends on what you're doing.

    How can I argue...

    __________________________________________________

    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: Searching set of words by ignoring spaces

    But isn't the problem with just replacing spaces is that it doesn't deal with other special characters?

    __________________________________________________

    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: Executing dynamic functions in table select

    EXEC(FunctionColumn) AS FunctionResult

    Sorry, but functions can't call procedures. They can only call other functions. Period.

    If I understand you correctly now, you want to be able 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: min Function (XQuery)

    Good to 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: Searching set of words by ignoring spaces

    This code would make a handy little inline table valued function.

    It currently filters out everything but letters and numbers.

    Fairly quick, too.

    declare @find varchar(50) = 'SET NOCOUNT ON'

    declare @txt...

    __________________________________________________

    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: Insert Into multiple values from Select plus adding incremental non-Identity

    Work in progress. Now that I've got more time, I thought you might like to see a code sample of how OUTPUT works, just to make sure we're on...

    __________________________________________________

    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: query that returns seconds

    +1 as well.

    Good luck, guys.

    __________________________________________________

    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: Insert Into multiple values from Select plus adding incremental non-Identity

    Look up the OUTPUT clause, and the INSERT or MERGE statement. When you add a row to Table B using Merge, you can immediately get back all 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

  • RE: query that returns seconds

    While agreeing with TheSQLGuru that cursors are to be avoided, the way to calculate the number of seconds is fairly simple.

    Declare @Start datetime = '8/23/2016 8:30am'

    ...

    __________________________________________________

    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: Executing dynamic functions in table select

    I know of two ways to approach what I *believe* you are describing.

    One is dynamic SQL, using values from tables to build a string to be executed....

    __________________________________________________

    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: Executing dynamic functions in table select

    You are really better off working with a calendar table for these kinds of questions. It's better to have created and stored one on disk, but the following...

    __________________________________________________

    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: Searching set of words by ignoring spaces

    SqlStarter (8/24/2016)


    Hi

    i need to find whether a set of words for ex. SET NOCOUNT ON in a text. in text it may be SET NOCOUNT...

    __________________________________________________

    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 Not Return Matching Rows

    Thanks, Gail. Evidently my thought processes were shutting down last night from caffeine deprivation.

    I am reminded of a very old song by a brilliant comedian named Tom Lehr,...

    __________________________________________________

    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 is the best way to SELECT SUM while using PARTITION BY and WHERE and GROUP BY?

    Firewolf, it may seem frustrating to ask a question and get sent a link to an article about asking questions, but there is a reason for it. We...

    __________________________________________________

    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 the price of last buy of each sell

    Glad it helped, Nikki, but please take to heart the warning that SQL tables have no sequence unless you can ORDER BY on a column. If you are...

    __________________________________________________

    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 - 331 through 345 (of 4,080 total)