Forum Replies Created

Viewing 15 posts - 14,146 through 14,160 (of 14,953 total)

  • RE: Random Phone numbers

    Unless they read this forum, in which case, you just gave away "the code", and it could be reverse engineered.

    Either go for truly random (Matt's solution), or completely meaningless (my...

    - 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: tsql case statement

    I never had incorrect results from either way, unless I had incorrect code.

    Probably someone miswrote a case statement, couldn't figure out why it wasn't working, and blamed it on 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: Associating rows with multiple criteria

    select (Column List)

    from dbo.EventsTable t1

    inner join dbo.EventsTable t2

    on t1.Location = t2.Location

    and t1.SubLoc = t2.SubLoc

    and t1.[Date/Time]...

    - 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: tsql case statement

    When all of your comparisons are a single column/variable/value, and all you're comparing is a single "is equal to" value per When, then you can use the first syntax. ...

    - 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: update nulls in column with another columns data

    You might want to also include "and Column1 is null" to the Where clause, so it only updates rows where Column1 is null and Column2 is not null.

    - 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: Random Phone numbers

    In that case, yeah, Matt's random solution will work. Or just "Hollywood" all the phone numbers by replacing them with "555-1234". Or "867-5309" (showing my age). Why...

    - 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: Identity Seed Error

    In that case, you might be better off using a Row_Number() function instead of an Identity.

    Row_Number() over (whatever would be appropriate here) + Seed Value

    Should give you the range 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: identify periods

    Of course, the other way to do this, which might be more efficient, is to create a table of Periods, including begin and end dates, and then do your queries...

    - 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: Stored procedure returns -1 instead of 1 when true

    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: Error: while creating job in SQL Server 2005 SP2.

    This page http://forums.microsoft.com/MSDN/ShowPost.aspx?PageIndex=1&SiteID=1&PageID=1&PostID=1366211 has a discussion of this problem and a possible solution.

    - 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: username for sql server

    If you leave it with SQL login authentication (either alone or in mixed mode), you can't change that. The only way to remove it is to operate purely on...

    - 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 change the date 5 th dec 2008 to default date in sqlserver2000?

    Can you clean up the data in the table, or do you have to convert it on-the-fly in the proc/function?

    If you can clean up the table, I recommend doing that.

    There...

    - 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: 8.5 million records 9 indexes

    In SQL 2005, sys.sql_modules replaces syscomments (syscomments is kept for backwards compatibility), so you might want to use that instead. (It has some advantages over syscomments.)

    Also, make sure 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: Need 'FINDSTRING' Equivalent in T-SQL!!!

    Also check out the string splitter functions on the scripts part of this page.

    - 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: Random Phone numbers

    colemanj (4/17/2008)


    security purposes on a production database

    In that case DO NOT REPLACE THEM!!!!!

    If you replace them with random numbers, they'll be gone.

    Instead, use encryption. That way, you can get...

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