Forum Replies Created

Viewing 15 posts - 11,746 through 11,760 (of 14,953 total)

  • RE: Is using triggers the only way of auditing updates of table rows?

    On the point of halving the row versions:

    Let's say you have a table with people's names in it, and LastUpdate (datetime) and LastUpdateBy (varchar) columns.

    So, you issue a command to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: User Defined Function: order by won't work

    J (1/6/2009)


    I might be missing something, but how about creating a sorting key when populating the table and the selecting from table order by sortkey...

    If you're going to add an...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Open Source - Free Tool to Compare DB Schemas and Generate Synchronization Script

    What you did is just fine. Saying "thanks, that helps" pretty much closes the thread. (Then, of course, some overly helpful person like me will come along and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: T-Sql Script question to compare values between 2 tables

    It's important to know about cursors. Mainly so you can fix them when other people have mistakenly used them for ... well ... almost anything.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: "Items is not a recognized table hints"

    I would think, if the database were in 80, that "CROSS APPLY" would get an error message instead of the thing about table hints. I don't have access to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: script outputs and calling a series of scripts from within a script

    You can use SSIS to automate output for files, including automatically naming the files. That's probably the best way to do what you want.

    SSIS can run each script and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: T-Sql Script question to compare values between 2 tables

    foxjazz (1/6/2009)


    it's probably easier to use a cursor to iterate through your first table.

    declare @c1 varchar(50), @c2 int

    declare @rowcount

    declare @sel cursor

    set @sel = cursor for

    select c1,c2 from t1

    open @sel

    fetch...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Unique constraint but data values have changed!

    You could also set up a hierarchy table that would include all codes that fall under any other code. That would give you a way to quickly determine which...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Verifying that a primary key exists for a table through script

    I'd use Gail's second script to find all the tables that don't have PKs, then review them and figure out what PK each one needs.

    Some might have an ID column...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: T-Sql Script question to compare values between 2 tables

    When you say you want differences, what exactly do you mean?

    Do you just mean rows that exist in one that don't exist in the other? Do you mean rows...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Dramatic commit application performance improvement as a result of a power cut?!

    The only things I can think of that power failure would do that would improve performance like that would be to flush the execution cache, which might get rid of...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Tips on creating indexes

    You say you need to create some indexes very urgently, but how can you be sure indexes are what you need if you don't know how to create them?

    What problem...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: sql server performance issue

    If the UDFs are the ones that you define a table variable for the output (called "multi-value UDFs"), then that's probably the biggest source of the performance problem. Those...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Is using triggers the only way of auditing updates of table rows?

    If you can guarantee that the only way for this data to be updated is by procs, then including the update date and user in the procswould be better, since...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Sqlserver Joins

    Knowing the differences on these can make a big difference in your ability to read execution plans, so I suggest looking all of them up in Books Online, which has...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 11,746 through 11,760 (of 14,953 total)