Forum Replies Created

Viewing 15 posts - 10,711 through 10,725 (of 14,953 total)

  • RE: ...I'll apologize in advance...

    Glad we could help.

    What trouble are you having with date ranges?

  • RE: Texting, or is that Twittering?

    Certainly possible with CLR, or various other solutions. I'd probably take something like that outside the database, though. Use an external service.

  • RE: Help Performance Tune this Code please

    Gail, my point about the sort being caused by the Union (All) wasn't because of the operator directly, it's because the query is sorting the results of a union. ...

  • RE: Determining the Nearest Record to a Given Location

    Jeff Moden (11/29/2008)


    Heh... milliseconds per calculation mean a lot if you have millions of shipments to make.

    Actually, difference is microseconds per calculation, but for the sake of argument, let's call...

  • RE: Help Performance Tune this Code please

    Please post the execution plans for the query with the indexes you already have, and with the index I proposed (on each table).

    The Union operator is what is going to...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (2/26/2009)


    Since there are so many hard core SF readers on here, I thought I'd pass on what I just heard. Phlip Jose Farmer has died. http://reason.com/blog/show/131886.html

    I read tons...

  • RE: Export to Excel inside a Stored Procedure

    You'll be better off building this as a DTS package, then executing that from the proc (or a scheduled job).

  • RE: Please help with syntax

    You can't declare a variable in the calling proc, then use it in the dynamic SQL. sp_executesql allows for output parameters. Set up one of those, you'll be...

  • RE: Help Performance Tune this Code please

    I would dump the second index you create, and replace the first one with one that started with service date, then client ID, and then use Include on the other...

  • RE: Please help me with this query

    select *

    from #TranTable t1

    inner join #TranTable t2

    on t1.CustomerID = t2.CustomerID

    and t2.Type = 'With'

    and t1.Type = 'Dep'

    and t2.DateEntered between

    dateadd(day, datediff(day, 0, t1.DateEntered)+1, 0)

    and

    dateadd(day, datediff(day, 0, t1.DateEntered)+2, 0)

    left outer join #TranTable...

  • RE: SQL 2005 Licensing Question

    MS Sales and Licensing questions don't generally have a cost associated with them, so far as I know. It's dev support that usually costs money.

  • RE: Indexs - Misunderstanding or abnormality?

    That's probably overkill, but it should work. Why would you do that, though?

    The whole point of the key columns in indexes is that you will be using them in...

  • RE: Indexs - Misunderstanding or abnormality?

    That's normal.

    Generally, if the first column in the index has an equality test in the query, you'll get a seek. The rest of it doesn't matter as much.

  • RE: Please help me with this query

    Try this:

    select t1.*, t2.TranID

    from dbo.TranTable t1

    inner join dbo.TranTable t2

    on t1.CustomerID = t2.CustomerID

    and t2.Type = 'With'

    and t1.Type = 'Dep'

    and t2.DateEntered between

    dateadd(day, datediff(day, 0, t1.DateEntered)+1, 0)

    and

    dateadd(day, datediff(day, 0, t1.DateEntered)+2, 0);

  • RE: Result set truncated from view when using order by

    Venu Dukka (2/25/2009)


    Thanks for the replies you guys.

    Let me add more here: The application code relies on the order by clause in the view to sort the results. So I...

Viewing 15 posts - 10,711 through 10,725 (of 14,953 total)