Forum Replies Created

Viewing 15 posts - 12,781 through 12,795 (of 14,953 total)

  • RE: remove spaces more than double

    smunson (7/16/2008)


    GSquared,

    The reason I wasn't all that worried about performance is because this kind of fixing is generally a one-time event, and even if it took an hour, the overall...

  • RE: remove spaces more than double

    smunson (7/16/2008)


    There is a potential pitfall here, folks: Any time there are exactly X spaces between words, where X is greater than 2, you have a problem with...

  • RE: remove spaces more than double

    Here's why I suggested what I did, with taking larger chunks first, then smaller.

    create table #T (

    String1 varchar(1000),

    String2 varchar(1000),

    String3 varchar(1000))

    insert into #t(string1)

    select 'A' + replicate(' ', (abs(checksum(newid()))%100)+1)

    + 'B' + replicate('...

  • RE: Averaging a row not a column

    Yes, we understand what you're trying to do. Unpivot and Avg will do what you need.

  • RE: A Math Problem Query

    Break the calculations up.

    Something like this might do it:

    ;with

    Portions ([Type], Weight) as

    /*

    Replace this CTE with a table in the real app.

    This is for proof of concept only.

    These numbers...

  • RE: Index on uniqueidentifier column

    You index a uniqueID column the same way you index any other column.

    If it's the PK, it's indexed. The question is whether or not it should be the clustered...

  • RE: SQL Server Processor Expansion

    I haven't had a problem with it.

  • RE: Indexes getting fragmented too fast

    You might need to set up some sort of table partitioning. If you had today's data in one partition and older data in another (or others), the indexes on...

  • RE: Averaging a row not a column

    You can use Unpivot (check it out in Books Online) to turn the row into a column, then use Where to dump 0 and null, then use Avg to average...

  • RE: Transaction

    umailedit (7/16/2008)


    It seems primitive to require locks for any read operation. In Oracle I think readers don't lock/block anything.

    Somehow I doubt that Oracle defaults to dirty reads, so what...

  • RE: How Do You Calculate Last Mondays Date

    Daryl, that one won't work if you have DateFirst or Language settings that don't make Sunday = 1 in the week. Too common and too easy to change to...

  • RE: need help for a query

    You'll need something like this:

    select [Name]

    from dbo.Actor

    inner join dbo.Casting

    on Actor.ID = Casting.ActorID

    inner join dbo.Movie

    on Casting.MovieID = Movie.ID

    where Title = 'Alien'

    That won't sort the actors. You'll need an Order By...

  • RE: xp_sendmail procedure

    There isn't. You'll have to either create your own way, or upgrade to a higher license of SQL Server, or buy something that does this.

  • RE: Alert message on failure JOB

    I had something like this happen on one server. Found out that the e-mail address had been stored in the Operators data as "[email:myaddress@mycompany.com]" (names changed to protect something...

  • RE: need help for a query

    You're going to be querying from a join between the tables. You say, "3 databases", does that mean these are in separate databases, or are they separate tables in...

Viewing 15 posts - 12,781 through 12,795 (of 14,953 total)