Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 14,953 total)

  • RE: Auto Increment Option in SQL Server Management Studio Express

    You're welcome.

    - 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 want to truncate table before inserts data

    Unless you have permission to modify the table (Alter Table permission), you can't truncate. And there's no such thing in SQL Server as a "before trigger". Only "after"...

    - 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: Trim a string

    DECLARE @String VARCHAR(100) = 'Physician->Scotland->Scotland North->NOS431 Core Medical Training';

    SELECT LEFT(@String, LEN(@String) - CHARINDEX('>-', REVERSE(@String))-1)

    - 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: Auto Increment Option in SQL Server Management Studio Express

    Are you designing a table in the GUI? If so, set the column to an Identity. You do that in the Column Properties at the bottom of 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: Using Recursion and Date Tables to Simplify Date Logic

    JonFox (12/13/2011)


    I'm not sure about this bit:

    join CalendarPeriod cp on (cp.CalendarDate = OrderDate and CalendarPeriod = @Period) or (@Period = ‘All’)

    That works fine if @Period != 'All', but as...

    - 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: select works in sql 2000 but not in 2008

    Aha! That makes more sense.

    Use the "Set Language" option in the script to force US English in that case. Unless you can change the server setting without breaking...

    - 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: Disable all the SQL jobs at once

    (Just got back from a vacation, hence delay in answering.)

    You can use sp_help_job to get that, but why do you need it? If the script is being run by...

    - 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: select works in sql 2000 but not in 2008

    Don't bother with date/time formatting in the query, unless you absolutely have to. The presentation layer is where that should happen. Allows for localization, personal preferences, et al.

    - 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 a good practice to put a state field in a table?

    It's one of those things where it looks really good on paper, but usually fails miserably in actual use.

    Company I used to work for used virtual deletes and virtual updates....

    - 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: Does the Role of the DBA Need to Evolve?

    Evil Kraig F (12/12/2011)


    GSquared (12/12/2011)


    michael.french 172 (12/12/2011)


    An exponential advance in technology is an understatement. Think of how far we come in just the last 50 years or even five years....

    - 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 Transactional Replication what I need?

    You're welcome.

    In that case (size of DB), either log shipping or snapshot replication will be best. Probably log shipping, using the Standby options so the database can be queried...

    - 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: select works in sql 2000 but not in 2008

    Have you narrowed down whether the whole dataset is failing, or just a few rows? If just a few rows, what does the data in them look like? ...

    - 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 Transactional Replication what I need?

    Transactional replication is more about real-time or near-real-time synchronization.

    What you want is either snapshot replication, log shipping, or just plain ship a full backup over and restore it nightly. ...

    - 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: scripting a time range

    austin.wimberly (12/12/2011)


    Would this also apply to Oracle? Sorry, I should have posted that in the beginning of the thread.

    You wouldn't use GetDate in Oracle, since it's a T-SQL extension....

    - 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 Merge in 2008 to perform staging of Real time data

    Are you merely inserting new records or are you updating existing records at the same time?

    If just inserting new records, I'd be more inclined to operate off a timestamp (either...

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