Forum Replies Created

Viewing 15 posts - 11,041 through 11,055 (of 14,953 total)

  • RE: Ignore apostrophe(') in SQL Server

    venki (2/9/2009)


    GSquared (2/9/2009)


    If you put two apostrophes in a row in that, SQL will allow it.

    Thanks for your response.

    But my question is I want to do it in single stmt.

    Actually,...

    - 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: Backup Database the delete just the old backup of that database

    You'd have to build something like that yourself, or set up your maintenance plan to have one backup and cleanup task per database. You can do that, but keep...

    - 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: Package failure due to "Duplicate Key was ignored"

    No clue on that one. I've never seen that happen before.

    - 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: Entity development

    Will a drug have more than one price? How about more than one compliance value or more than one "treated days" value?

    Perhaps the correct solution would be to do...

    - 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: Trigger Problem-Urgent

    Bruce W Cassidy (2/9/2009)


    [font="Verdana"]You can also persist the calculated column, in which case it will only be calculated the once. Bits are good choices for persistance, since they take...

    - 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: Trigger Problem-Urgent

    GilaMonster (2/9/2009)


    Vijaya Kadiyala (2/9/2009)


    What if the table already exists, so in this case we have to use Update Statement right!!

    Why?

    Alter Table Add .... and add the computed column 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: Help getting max value (alpha)

    You're right. Didn't think it through quite far enough. Try this instead:

    create table #T (

    Ver char(10) primary key);

    declare @Alpha char(26)

    select @Alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

    insert into #T (Ver)

    select substring(@Alpha, number,...

    - 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: Trust

    My personal policy is to trust everyone I meet until I'm given a reason otherwise. Same for respect. I'm also a firm believer that people can and often...

    - 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 getting max value (alpha)

    You might try something like this:

    create table #T (

    Ver char(10) primary key);

    insert into #T (Ver)

    select 'A' union all

    select 'B' union all

    select 'AA';

    select *

    from #T

    order by reverse(ver) desc;

    Returns:

    AA

    B

    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: Backup Database the delete just the old backup of that database

    In maintenance plans, there's a "Cleanup Backup task" that can do that for 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: Ignore apostrophe(') in SQL Server

    If you put two apostrophes in a row in that, SQL will allow it.

    - 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: UPDATING A TABLE ROW BASED ON VALUES IN OTHER ROWS

    Your post includes "if either dollar type 1 or 2 > 0". Under what conditions would this not be true? Or does this mean something other than what...

    - 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: Package failure due to "Duplicate Key was ignored"

    I guess I'd rather have ignore_dup_key off and have the insert code validate the data with an Exception operation. That's going to be easier to document, and it's going...

    - 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: CASE statment with multiple conditions

    Welcome to SQL. Like anything else, it certainly has its quirks. 🙂

    - 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: Trigger Problem-Urgent

    Vijaya Kadiyala (2/9/2009)


    Thats really a good tip. This will work if you are creating a new table.

    What if the table already exists, so in this case we have to use...

    - 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,041 through 11,055 (of 14,953 total)