Forum Replies Created

Viewing 15 posts - 61 through 75 (of 683 total)

  • RE: Arithmetic Query

    Brandie Tarvin (7/17/2008)


    ...

    Case QuantityShipped WHEN 0 THEN 0

    ELSE ( SUM(ISNULL([Unit Price],0)) * QuantityShipped)

    / QuantityShipped END as...

  • RE: Arithmetic Query

    This would be my guess at what you're trying to do...

    SELECT CONVERT(varchar(11), ShipDate, 106) AS...

  • RE: remove spaces more than double

    Thanks GSquared.

    By the way, I've just noticed that Test3 references string1 several times. Is that supposed to be the case?

  • RE: remove spaces more than double

    GSquared (7/16/2008)


    Out of 998 rows, 120 ended up with double-spacing still in them.

    Slow down!

    The link from 2002 says:

    I'm pretty convinced now that it requires 6 REPLACEs. I think that, using...

  • RE: remove spaces more than double

    As usual, different methods will be better in different situations. They're all tools for the toolbox 🙂

    GSquared, your last idea also cropped up in 2002...

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21511

    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(colname,

    ...

  • RE: remove spaces more than double

    smunson (7/16/2008)


    Holy Alphabet, Batman !!!

    Ryan, that's one of the slickest routines I've ever seen... Neato, peachy keen, cool, etc., etc. ...

    WELL DONE !!!

    Steve

    (aka smunson)

    :):):)

    Hehe - you've made my...

  • RE: remove spaces more than double

    Jeff Moden (7/16/2008)


    RyanRandall (7/14/2008)


    Another technique which can be useful in some circumstances...

    update #TEST set Descr = replace(replace(replace(Descr, ' ', '¬ '), ' ¬', ''), '¬', '') where Descr like '%...

  • RE: need help with a query

    mathewspsimon (7/16/2008)


    The query should fetch the all the visit-ids which is for another date like below for the sample data I gave.

    Visit_Id Med_Id Date ...

  • RE: need help with a query

    So what would you want the results to look like for this sample data?

  • RE: String search

    Here's one way...

    --sample data

    declare @t table (s varchar(100))

    insert @t

    select 'ANALYSIS RECORDS (APPROX 100 PPS)'

    union all select 'REVIEW MANUAL (75+ PAGES)'

    union...

  • RE: Concatenate field values

    You can use something like this to append the bits together...

    --sample data

    declare @t table (WoNumber varchar(20), LineNumber int, Detail varchar(100))

    insert @t

    ...

  • RE: ms to min

    Just divide by 60000.0 - or is there more to it?

  • RE: update query with multiple fields in join

    Something like...

    update TableA set value = 1 from TableA inner join TableB on TableA.id1 = TableB.id1 and TableA.id2 = TableB.id2 where TableB.id = 12345

    which looks a bit nicer if you...

  • RE: LN function in SQL

    The last post here might be useful (as might this thread)...

    http://www.sqlservercentral.com/Forums/Topic158858-21-1.aspx

  • RE: LN function in SQL

    select log(1.0 * 150/100)

    returns 0.405465108108164

Viewing 15 posts - 61 through 75 (of 683 total)