Using Variables / Parameters in a Select

  • Hmm, I'm not sure I really want to do that. I have managed to consolidate the data down to 42,000+ records, however, I can't imagine inserting all that into another table with ALL possible combinations. As it is, the calculation usually runs in 0 - 1 seconds.

    Another suggestion a co-worker made was that since we're mostly using this for our users, the User would enter what Radius their interested in searching. We would store this in the users table and then populate a separate table with all the postal codes within that radius. In the past their business requirements dictated this, however, once they see that we can do this on the fly, their not going to want to limit the users anymore. So, I don't see any advantage to storing the calculated data anywhere.

    -- Get all Postal Codes in a 30.5 mi radius using the highest accuracy (1)

    Select * From dbo.ufn_GetPostalCodeList('44141', 30.5, 1)

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply