Forum Replies Created

Viewing 15 posts - 55,756 through 55,770 (of 59,078 total)

  • RE: Need help in writing SP

    Vijaya,

    Since you're brand new, lemme just tell you that posting data in the following manner is much more helpful to those that would help you... tell's us almost everything we...

  • RE: Ambiguous column name error

    Just from the practical point for ease of troubleshooting, here's from our "standards" book at work...

    All column names shall be prefixed with a table alias in the presence of joins...

  • RE: BCP vs DTS

    Phill is spot on.  I'll kick in that BCP has some additional features that make it a bit slower than Bulk Insert (but still faster than DTS) including error logging...

  • RE: use of WITH INDEX clause when tuning queries

    It's not often that I see a query improve performance by applying Index Hints.  Usually, it's the other way around...  When you say you are seeing some impressive improvements in...

  • RE: Split a Column

    Lookup sp_Rename in Books Online... that'll do what you need...

  • RE: Convert smalldatetime to int

    ... and, that's just the date... doesn't include time...

    But, Serqiy is correct... there's a date format that's based on the number of seconds since the 01/01/1970.  There are other "numeric" date...

  • RE: Convert smalldatetime to int

    SELECT CAST(CONVERT(CHAR(8),somedate,112) AS INT)

    ...but it's an insane thing to do for so many reasons...

  • RE: CHAR vs VARCHAR

    Almost forgot to ask... I know you said you can't normalize the table (would be the greatest space saver of them all here) so I won't bug you about that... but...

  • RE: CHAR vs VARCHAR

    Using LTRIM(RTRIM()) will not make NULLs... that may be a part of the problem... here's the proof...

    DECLARE @NullOrBlank VARCHAR(8000)

     SELECT @NullOrBlank = REPLICATE(' ',100)

     SELECT DATALENGTH(@NullOrBlank) AS DataLengthBefore,

           ...

  • RE: Subquery Totals

    It wouldn't be a "sum"... it would still be a COUNT except it wouldn't be DISTINCT.  And, because you are not counting DISTINCT LID's, you already have the sum of...

  • RE: Update values with random values

    Michael,

    Why don't you write an article here on SQLServerCentral about you number and date range generator functions?  I've always been really impressed with the speed of the darned things...

  • RE: Generating a List of Country/Regions

    Oh, yeah... if you want the actual "Region ID", you'll need to get Telcordia's "NNACL"... but I think that's only for the US and Canada.  Prepare to pay some $$...

  • RE: Generating a List of Country/Regions

    I'll second that on LincMad... been using his stuff for years and is one of the best places to find this type of free info.

    If you need something to pay...

  • RE: Update values with random values

    Heh... also hacked one for Peter's method... slowed it down just a bit but it's still faster than the traditional method...

    --===== Peter's method of generating random numbers from...

  • RE: Update values with random values

    Hacked a fix for the zero distribution problem on the traditional method...

    --===== Traditional method of generating random numbers from -5 to +5

     SELECT SUM(CASE WHEN r = -5...

Viewing 15 posts - 55,756 through 55,770 (of 59,078 total)