Forum Replies Created

Viewing 15 posts - 2,326 through 2,340 (of 14,953 total)

  • RE: forign key violation

    Can you run an SQL task before the Merge, after the staging load, that checks for rows in the staging data that would violate the constraint?

    Update dbo.MyStagingTable

    set RowCheck = 'fail'

    where...

    - 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: Setting up a DB for near real time reporting (copy of OLTP DB)

    How about snapshot replication instead? That captures a point-in-time of the data, and you can easily suspend that whenever you need 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: Need to audit update without cursor

    This method would have to go through the whole of both tables each time it's run, even if you just change one value in one table.

    I would use an Output...

    - 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: How do you use your iPad?

    I have an Android tablet instead, so I don't use an iPad for anything at all.

    If Android tablets count for this (resurrected) discussion, I use mine for work, play, reading...

    - 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: forign key violation

    It really depends on what you're loading and how.

    For example, if table A depends on table B, and you're just loading table A in your process, you could run a...

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

    I joke about it, but I also have more books than I have shelf-space, and not all from pre-ereader days. I still buy RPG books hard-copy (of course), 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: Am I missing something....

    It also assumes all data in the database will never be either consumed or modified by anything outside the scope of your application.

    And it might not even prevent injection. ...

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

    GilaMonster (1/9/2012)


    Steve Jones - SSC Editor (1/9/2012)


    jcrawf02 (1/9/2012)


    GilaMonster (1/9/2012)


    Ninja's_RGR'us (1/9/2012)


    There was a time I loved fiction, got any books to recommend?

    Yes

    http://sqlinthewild.co.za/index.php/2012/01/01/2011-book-review/

    http://sqlskills.com/BLOGS/PAUL/post/2011-the-year-in-books.aspx

    We both have 2010 posts as well if you feel...

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

    Steve Jones - SSC Editor (1/9/2012)


    Jack Corbett (1/9/2012)


    Roy Ernest (1/9/2012)


    I see lots of comments regarding post counts... Does everybody have a target? I have never thought about it at all....

    - 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: Auditing Stored Procedure calls

    Profiler is quite resource-hungry, but server-side traces barely impact the server at all.

    I haven't tried filtering by a specific proc name. I sometimes filter by a particular database.

    Can you...

    - 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: Would like to start my own blog but don't know how

    I set mine up just by using blogspot.com. Took about 10 minutes to get it up and running.

    I think it's had all of about 5 visitors since I created...

    - 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: Help on TSQL update statement

    Are you familiar with using the ranking functions in T-SQL? Row_Number(), Rank(), Dense_Rank() are the functions.

    Build a query that uses those to generate the numbers you need, then join...

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

    SQLRNNR (1/9/2012)


    SQL Kiwi (1/9/2012)


    GSquared (1/9/2012)


    Yes, but not at the posts count thing. Just at the "change your name to something even sillier than GSquared" thing.

    You don't think 'Aaron Aardvark'...

    - 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: equivalent of spool

    You could output to a file and run that. Any reason to do so instead of just executing it as dynamic SQL?

    If you really insist on the output a...

    - 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: Selecting TOP PERCENT based on GROUP ?

    Select the states and cities, then use Cross Apply (or Outer Apply) to get the top 30 percent for each.

    Is that what you're trying to do?

    Something like this:

    select state, city,...

    - 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 - 2,326 through 2,340 (of 14,953 total)