Forum Replies Created

Viewing 15 posts - 331 through 345 (of 14,953 total)

  • RE: Stripping out all non-numerical characters

    Here's one way to do it in T-SQL:

    DECLARE @String VARCHAR(8000) = 'ABC12D34E56';

    WITH Seeds(Seed)

    AS (SELECT ...

    - 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: Delete trigger

    Glad it worked out.

    Often, all it takes is approaching the problem from a slightly different direction.

    - 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 for a plus sign

    ScottPletcher (12/13/2012)


    ScottPletcher (12/12/2012)


    CELKO (12/11/2012)


    In COBOL, the display and the internal format of data was the same. Each field had a PICTURE clause to define it. Your question makes sense only...

    - 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: Finding combinations of values

    CELKO (12/17/2012)


    As to "portable", that really is a myth. There are so many custom approaches in each variant of SQL you can never port anything easily.

    Then how I...

    - 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: Problem with Datetime Function

    Adi Cohn-120898 (12/17/2012)


    At this point we both agree that when variables are used in a query and the variables got there values in the same scope as the query, 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: Import/Export Wizard Weird Behavior in SQL Server 2008R2

    skpanuganti (12/17/2012)


    Seriously? You really think it's just fine to open zip files on the internet? Ones that you don't personally know were verified clean before they were posted?

    This...

    - 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: Change column from NVARCHAR to VARCHAR...

    You should be able to get Drop and Create scripts for the views that way, without it affecting the tables.

    If at all concerned about data loss, take a copy 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: Problem with Datetime Function

    Adi Cohn-120898 (12/17/2012)


    I'm sorry but I don't see what it has to do with lookups. Notice that I had 2 queries. Both of them had the same...

    - 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: Problem with Datetime Function

    That has nothing to do with the SARGability of the query.

    That's SQL Server avoiding key lookups.

    Two completely different things.

    - 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: Money vs Job Satisfaction, where is the balance?

    First, figure out if you need the extra money, or want the extra money. There's a big difference between need and want.

    If you need the extra money, then 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: Import/Export Wizard Weird Behavior in SQL Server 2008R2

    Seriously? You really think it's just fine to open zip files on the internet? Ones that you don't personally know were verified clean before they were posted?

    This isn'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: String collation

    Strings are just numbers to computers. Without metadata in the storage, they're no different than any other data.

    You wouldn't need to loop through a string to find whether 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: Import/Export Wizard Weird Behavior in SQL Server 2008R2

    Hate to say it, but this is the Internet. No way I'm opening an unknown file from an unknown source. I seriously hope nobody is dumb enough 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: How to avoid the SQL Server Agent to start on a SQL server Failover

    Don't set up SQL agent to be cluster aware, and set it up with manual startup or disabled.

    I'm not sure why you'd want it this way, but it will work.

    - 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: Grouping by time - can't figure this out!

    How about something like this:

    SET NOCOUNT ON;

    USE ProofOfConcept;

    GO

    IF OBJECT_ID(N'dbo.Periods') IS NOT NULL

    DROP TABLE dbo.Periods;

    GO

    CREATE TABLE dbo.Periods

    (Period INT PRIMARY KEY);

    GO

    INSERT INTO...

    - 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 - 331 through 345 (of 14,953 total)