Forum Replies Created

Viewing 15 posts - 226 through 240 (of 476 total)

  • RE: Pattern match any 3 repeating letters

    Seeing your previous post, you could change it slightly to

    select *

    from (values (1,'blah blah'),(2,'bllaaahh'),(3,'blahhhh'),(4,'bbbblah')) s (id, name)

    where name like replicate(substring(name,1,1),3) + '%'

    That might perform better.

  • RE: Pattern match any 3 repeating letters

    I'm sure there is a better way to do this, but you could try this

    with testvalues as ( --some sample test data

    select *

    from (values (1,'blah blah'),(2,'bllaaahh'),(3,'blahhhh'),(4,'bbbblah')) s (id, name)

    ),

    cteTally as...

  • RE: Selecting n Closest (Geographic) Rows

    Hi Robert

    If you are using geographies you could use try the following. Unfortunately in 2008 it doesn't appear to make use of spatial indexes, meaning it doesn't scale very...

  • RE: Questions regarding Spatial Data performance

    Hi

    I been concerned that there has to be a better way of getting the results that you want. You may want to try out the following, it performs extremely...

  • RE: Questions regarding Spatial Data performance

    Hi

    Sorry for the delay getting back ... I see what you are doing now. While you can use geometry to do this, it probably isn't the quickest way to...

  • RE: Questions regarding Spatial Data performance

    Hi

    Having another look at your query, the points you are creating for the fact table are in a straight line on a zero y coordinate, unless you are creating a...

  • RE: Questions regarding Spatial Data performance

    Hugo Kornelis (11/3/2013)

    * Are you running on SQL Server 2008? If so, check SELECT @@VERSION to see what, if any, service pack you have installed. If you are on RTM,...

  • RE: Running Count

    dwain.c (10/29/2013)


    BTW. You can probably remove this from the Tally solution:

    , rnk=MIN(rnk)

    From the SELECT list of the inner query. I was using it for testing. It might...

  • RE: Running Count

    And so far Dwains Tally solution looks like the winner based on the IO stats:-D

  • RE: Running Count

    You could do this

    select id, rnk, DENSE_RANK() over(order by mrnk, id) DRank

    from (select *, min(rnk) over (partition by id) mRank from #tester) a

    order by rnk;

  • RE: accurate ticket times

    Hi

    I don't think you have provided enough data for the problem you are describing, but I'm going to take a stab in the dark at it. I hope I...

  • RE: Are the posted questions getting worse?

    L' Eomot Inversé (10/24/2013)


    wolfkillj (10/23/2013)


    I've published my first technical blog post. I'd appreciate any feedback from this group on both the technical aspects and the writing. Thanks, everyone!

    Nice article. ...

  • RE: Are the posted questions getting worse?

    wolfkillj (10/24/2013)

    Thanks for that insight, mickyT. What tool(s) did you use when working with raster data?

    Mostly I use ESRI's ArcGIS with the spatial analyst extension, however I have also use...

  • RE: Can You Get Min/Max Out of This?

    Keith Tate (10/24/2013)


    Mickey your link to Jeff's article is actually pointing back to this post. I think you meant to post to this article[/url]

    Whoops ... Gets me a lot that...

  • RE: Can You Get Min/Max Out of This?

    Hi

    This should get the result that you want, with a caveat. It assumes that you do not have gaps in your date ranges.

    WITH cteGroup AS (

    SELECT ID, VAL, STARTDATE,...

Viewing 15 posts - 226 through 240 (of 476 total)