Forum Replies Created

Viewing 15 posts - 241 through 255 (of 582 total)

  • RE: Query help or Suggestions

    No your requirement are not very clear.

    You want data for each month. What data?

    You have start and end date. So are you counting this as a range of days,...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Error checking simple parameter passing in problem, please advise.

    If you run EXACTLY this:

    drop procedure dbo

    .testing

    go
    create procedure dbo

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Trim Functions Not Working Properly

    can you post results of:

    select distinct ascii(substring(yourcol,1,1))

    from yourtable

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: How can I do a bulk update from Table1 to Table2?

    No, it's a fairly common English name and a brand of razor in Europe.

    Your problem is what the error msg says. You have a null in product_details, but descriptionHTML in...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Casting error

    Yep.

    >If leading zeros were permitted, or if alphabetic (left-to-right regardless of length) sorting/searching on leading characters made sense, then the 'numbers' would clearly be numeric strings and should (presumptively but...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: linked server t-sql

    Because openquery (1) returns a recordset (2) that is disconnected from the underlying data source.

    So you can't specify a delete statement inside OPENQUERY because that doesn't produce a recordset,...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Trim Functions Not Working Properly

    Amit, how does that help?

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Trim Functions Not Working Properly

    See if this gives better results. You probably have whitespace characters other than space.

    select

    rtrim(ltrim(replace(replace(

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Select the biggest value

    nope.

    If like me you are CASE-averse, you can do it with arithmetic, but I don't see any advantage, except the satisfaction of not using CASE, and handling NULLs (but a...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Help with query - Top clause and distinct clause?

    Or
     
    select t.Product, t.OrderNo, max(t.DeliveryDate) lastdeldate
    from tab t
    group by t.Product, t.OrderNo

    -requirements not entirely clear.

     

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: using a date in a where clause without hardcoding it

    declare @d smalldatetime
    select @d = dateadd(month,-6,datediff(day,0,getdate()))
    -- ^^ this is 6 months ago with the time...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: OPENROWSET using Visual FoxPro Provider ''''Could not fetch a row'''' error

    Not TSQL

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Dreadlocks - a new haircut for your database

    I am shocked that so many people talk casually of using NOLOCK in a production system that isn't read only! As if locks were an unnecessary annoyance that can simply...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Update/replace

    update t
    set col = substring(t.col,1,len(t.col)-1)
    from table t
    where t.col like '%/' --if not all records are affected

    You might want to consider...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Need to Tune Query

    I have found that parallelism very often seems to spoil otherwise impeccable queries. Maybe it's better in v9, but I doubt it. MS just keep adding more 'features' and don't...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

Viewing 15 posts - 241 through 255 (of 582 total)