ActiveRecord and attributes returned

I am working with a couple of queries where I need to get the
latitude and longitude from a
table based on the zip code I pass to it.

@geoLatitude = Geodemog.find_by_sql[“select latitude from geodemogs
where post_code = ?”, @query]

I want to:

  1. Make sure this is the best way to do this since the table holds a
    lot of records
  2. Am I setting this up properly to be able to send a second query to
    Mysql where I will
    use the variable @geoLatitude to do the actual calculations?

Thank you in advance for your help!

-Scott