Forum Replies Created

Viewing 15 posts - 1,186 through 1,200 (of 4,080 total)

  • RE: Outer apply

    I find it helpful to think of OUTER APPLY as being similar to a LEFT JOIN.

    When you use a CROSS APPLY, if the applied function (or query) returns no 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: need help t-sql want to select all the records when some condition fails

    Why is dynamic SQL not an option here?

    __________________________________________________

    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: Diagonal matching of data (wanted vlookup like concept in sql)

    CREATE TABLE #T1 (cat1 char(1), cat2 char(1),cat3 char(1), cat4 char(1))

    CREATE TABLE #T2 (cat1 char(1), cat2 char(1),cat3 char(1), cat4 char(1))

    INSERT INTO #T1

    SELECT 'A', 'B','C','D' UNION ALL

    SELECT 'A', 'B','C','D' UNION ALL

    SELECT '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: Date function in sql server 2005

    DECLARE @date DATE = getdate()

    SELECT DATEADD(DAY,7-DATEPART(dw,@date),@date)

    Just substitute your date column for @date in the DATEADD function.

    The DATEPART() function with the 'dw' parameter returns the day of the week (1-7) for...

    __________________________________________________

    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: Is there any way to import data from EXCEL to SQL Server via BCP?

    BCP is not the tool for importing EXCEL spreadsheets. It works on common text files. However you could save your spreadsheet as a CSV...

    __________________________________________________

    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?

    Alvin Ramard (3/29/2011)


    CirquedeSQLeil (3/29/2011)


    jcrawf02 (3/29/2011)


    CirquedeSQLeil (3/29/2011)


    jcrawf02 (3/29/2011)


    Kiara, happens to me all the time. That's why I like hanging out with people smarter than me (and Alvin), some of it rubs...

    __________________________________________________

    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: Remove Characters which lies between special Characters

    Thanks for the reply, Rajesh. Glad that's working for you, even though the function has a (shudder) WHILE loop in 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: Remove Characters which lies between special Characters

    Three questions:

    1) Is there a maximum string length?

    2) Is there a maximum number of output elements?

    3) Do you want the spaces before and after the <> symbols trimmed?

    __________________________________________________

    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: Looking for Elegant Efficient T-SQL Code

    This is one of those jobs where I have nothing against a cursor, or a while loop, because you are doing the same operation against multiple TABLES, as opposed 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?

    CirquedeSQLeil (3/17/2011)


    Brandie Tarvin (3/17/2011)


    Craig Farrell (3/17/2011)


    Annnnd, now I have an image of sheep storming the castle. I wonder if they fit their armor before or after sheerings...

    CRAIG!

    Stop giving 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: Are the posted questions getting worse?

    Grant Fritchey (3/16/2011)


    Jeff Moden (3/16/2011)


    Craig Farrell (3/16/2011)


    GilaMonster (3/16/2011)


    I object, I'm a model of good behaviour

    well, compared to others on that list anyway...

    Isn't that like saying you're a 'nice' barbarian because...

    __________________________________________________

    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: Practical Use for FULL OUTER JOIN & CROSS JOIN

    FULL OUTER JOINS are very useful when comparing two sets of data and you want to identify items that exist in one set but not in another. ...

    __________________________________________________

    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?

    Congratulations, Paul. It's a good read.

    __________________________________________________

    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: Pivot Query with 2 aggregated functions combined?

    I was a little bored, so I'm going to throw a fish...

    declare @sample table (class Char(1), value int)

    insert into @sample

    select 'A',3 union all

    select 'A',19 union all

    select 'B',8 union all

    select 'A',3...

    __________________________________________________

    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?

    GSquared (2/21/2011)


    jcrawf02 (2/21/2011)


    GSquared (2/21/2011)


    Jeff Moden (2/21/2011)


    Heh... no one even noticed recently... I slipped over the 24,000 post line, Gail topped 22,000 posts, and Gus has put the hammer on 10,000...

    __________________________________________________

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