Forum Replies Created

Viewing 15 posts - 2,131 through 2,145 (of 4,080 total)

  • RE: Are the posted questions getting worse?

    Two cups of coffee and feeling philosopical...

    When I was a boy, and computers were carved from wood and cranked by hand, it was widely understood that hierarchical databases outperformed relational...

    __________________________________________________

    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: Linked Server - Update Query Not Working

    INSERT INTO [DestinationDatabase].[dbo].[prempl]

    .

    .

    .

    SELECT

    -- Employee_Master.Empno,

    CONVERT(int,Employee_Master.Empno),

    Employee_Master.Surname,

    Employee_Master.GivenName,

    .

    .

    .

    FROM SQLSERVER.SourceDatabase.dbo.Employee_Master Employee_Master

    .

    ...

    __________________________________________________

    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: MS SQL alternative to SUBSTRING_INDEX

    test (10/22/2009)


    Wow, that's complex! - Thanks

    You're welcome, Test. Just make that code a user-defined function and the complexity goes away.

    Better yet, make 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: Need to pull mulitple row communication infor into single row per customer

    "EAV" stands for Entity-Attribute-Value table, also derogatorily referred to as a "MUCK". (Massively Unified Code-Key table) While some people gravitate towards them because of their flexible...

    __________________________________________________

    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: MS SQL alternative to SUBSTRING_INDEX

    Thanks for the save, Allister. 🙂

    At one point that occurred to me, because the usual concatenation routine pads the string on the left and right with separator 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: Best way to do an Update Statement - Advice needed

    To reduce logging and gain speed, you are probably going to wind up setting your db to simple recovery mode and then updating the tables in batches, rather than all...

    __________________________________________________

    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: Another mutliple row update question!

    Thanks for coming back and posting your working code, Damien. It's a nice thing to do.

    __________________________________________________

    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 to pull mulitple row communication infor into single row per customer

    If you want performance, don't use a MUCK/EAV for one thing. 😉

    Seriously, this type of table does not scale well and you will find yourself jumping...

    __________________________________________________

    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: Cross Apply Alternative

    "Easy" is a relative term. The following code is short, and should produce the same results, but I haven't tested for performance. Also, it's not nearly as...

    __________________________________________________

    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: JOIN vs Subquery

    I would have to see both query plans to give a definite answer, but this is my supposition.

    By JOINING the tables you are adding the overhead 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: SELECT statement between two tables with composite keys

    You can JOIN tables based on more than one column. It will work, even in the absence of compound keys or other indexes. Indexes may make...

    __________________________________________________

    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?

    Sigh... I always over-design 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: Linked Server - Update Query Not Working

    This is what you are inserting.

    SELECT

    Employee_Master.Empno,

    You aren't converting the data in your SELECT, just in your JOIN. You need to convert it here 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: MS SQL alternative to SUBSTRING_INDEX

    That'll work!!! I would have done it with a CROSS-APPLY like this, but for re-use an inline table valued function would be sweet. If...

    __________________________________________________

    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: Linked Server - Update Query Not Working

    Let's start over and go slowly.

    Does your SELECT query display the results you expect when you run it without the INSERT statement?

    If so, please post up some...

    __________________________________________________

    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 - 2,131 through 2,145 (of 4,080 total)