Forum Replies Created

Viewing 15 posts - 10,231 through 10,245 (of 14,953 total)

  • RE: The Visit of the Recovery Testers.

    Disaster preparation is something most people don't do well. And I don't just mean for computer-related issues.

    How many people learn basic first aid? How about CPR? How...

    - 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: The Visit of the Recovery Testers.

    One place I used to work, they refuse to put business rules in the database, as much as possible. Prefer to have them in a "business logic layer". ...

    - 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: Constraint conundrum

    Instead of casting as an Integer, take a look at the Floor function in Books Online.

    - 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: When SQL Server Agent job duration exceeds time between jobs runs

    If the job is already running, it doesn't even try to start it, and waits till the next scheduled time after it finishes the current run.

    In your example, it wouldn't...

    - 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: Basic SQL Exercises

    MSDN has some good tutorials. That might be a good place to start.

    This site and related sites will be a really good place to find any gradient of difficulty...

    - 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: query to find no show

    Add something about the date being greater than getdate()-90 to Flo's query, and you have what you seem to need.

    Are you familiar with basic query writing? I'm asking because...

    - 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: Top 1000 of each group in a table

    Ah. Didn't see the prohibition against dynamic SQL. In that case, even though it performs slightly worse, I'd go with the Row_Number version, because otherwise you're going 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: Top 1000 of each group in a table

    If hard-coding the date ranges in there works, then yes, that definitely outperforms the Rank/Row_Number version.

    An alternative to hard-coding it would be something like this:

    declare @sql varchar(max);

    select @sql = coalesce(@SQL...

    - 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: Rad XML data declared as ntext

    You can cast ntext to nvarchar(max) and then cast that to XML, and then use XQuery on that.

    XML disappears from the forums. If you want help on the actual...

    - 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: Top 1000 of each group in a table

    Yeah, I'm looking at the same type of solution, but wanted to determine if it should be Row_Number, Rank, or Dense_Rank.

    - 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: query to show even and odd order

    Split based on what criteria?

    - 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: Top 1000 of each group in a table

    If there are ties, do you want all the people, or just the top 10 rows.

    For example, if in December 2008, the top 9 had a sales volume of 500,...

    - 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: Extracting XML File that is stored as a text data type

    You need to slightly modify the XQuery in the value function. I've attached a sample using your sample data.

    What I've done in it is add a "/." to the...

    - 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: I have to keep end date for the previous record before creatign new record

    Declare @workflow_activity_type_identifier int,

    @workflow_identifier,

    @Date datetime

    select @workflow_activity_type_identifier=workflow_activity_type_identifier from workflow_activity,

    @Date = End_Date

    where workflow_activity_identifier = @workflow_activity_identifier

    - 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: I have to keep end date for the previous record before creatign new record

    Why not just declare a datetime variable and grab the value when you get the activity type identifier? Will that not do what you need?

    - 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 - 10,231 through 10,245 (of 14,953 total)