Forum Replies Created

Viewing 15 posts - 7,066 through 7,080 (of 9,725 total)

  • RE: insert if not exists, if it does insert into another table

    Maina-456685, Could you provide sample data so Chris and I can verify solutions before we post them?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: insert if not exists, if it does insert into another table

    I'm fairly certain you don't need the GROUP BY and HAVING on the Contract insert. Test it to verify, but everything after the c.CellphoneNo IS NULL should be able to...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Get the Current Date

    Stefan Krzywicki (10/27/2010)


    Interesting, I'll have to look into what the formatting numbers at the end do to the dates. Thanks

    Look up Convert, the Transact-SQL reference, in Books Online. Halfway down...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Today's Random Word!

    Indian Giver.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Are the posted questions getting worse?

    Grant Fritchey (10/27/2010)


    To the Threadizens/Threadites/Threadoids/Threadopians:

    Wow, Grant. What a way to make the Threadophiles feel unwanted...

    @=)

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Are the posted questions getting worse?

    WayneS (10/26/2010)


    Is there a way to have a query that generates dynamic columns exported to an excel spreadsheet? The problem that I've run into is that in the Data Flow,...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Get the Current Date

    I prefer Convert() over Cast() because I can do string tricks with my GETDATE() and still take it back to a valid datetime value. I'm not sure if you can...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: insert if not exists, if it does insert into another table

    I just noticed another problem. At no time in this scenario, Maina-456685, are you actually checking dbo.Contract for duplicates. You only ever check your staging table, dbo.TempCustomer for duplicates.

    So what...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: insert if not exists, if it does insert into another table

    Ah. I did not catch that fact. Chris, you are correct. So even if the ContractAuditID problem is corrected, the code will still fail.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: insert if not exists, if it does insert into another table

    A few minor nitpicks that might not matter in your current environment but could cause problems for you later. (FYI: Grain of salt moment. These just happen to be two...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: insert if not exists, if it does insert into another table

    Maina-456685 (10/27/2010)


    Condition 1: If an entry is duplicated in TempCustomer, insert into ContactAudit table.

    ....

    Condition 3: If an entry is not duplicated in TempCustomer, but already exists in Contact,...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: SSIS Script Component Issue

    Dread,

    Glad your problem is resolved and thank you for posting your solution.

    If you ever do remember the forum name or the forum thread, please make sure to link it...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: "Sysadmin required" - A question

    Michael Valentine Jones (10/26/2010)


    Make sure you follow that code the way I posted it

    Yeah, my edit must have crossed your posting.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: "Sysadmin required" - A question

    Michael,

    EDIT again: I take back everything I just said. I forgot to re-login. Crap. What was MS thinking when they did this?

    I just tested impersonate. You're working off an invalid...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: "Sysadmin required" - A question

    I'll double-check the impersonate, but when I logged in as the SecurityAdmin account, I was unable to grant actual SysAdmin to my own account.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 15 posts - 7,066 through 7,080 (of 9,725 total)