Creating a recordset from a recordset

Results 1 to 2 of 2

Thread: Creating a recordset from a recordset

  1. #1
    Karen S Guest

    Default Creating a recordset from a recordset

    Help! I&#039;m being thrown into getting an ASP page to work and I know very little about it. Here&#039;s my problem...<BR><BR>I have a table with zip codes. I&#039;ve created a recordset of zip codes based on a radius that the user enters. (A user enters their zip code and a radius, the recordset will only contain those zips that fall within the specified radius.) <BR><BR>I have a table with store locations and their zip codes. I want a new recordset made up of the stores&#039; information. I want this recordset to contain only the stores with zips that match the recordset containing the zips within the user&#039;s radius.<BR><BR>I&#039;ve been playing with the SQL select statement and it doesn&#039;t like the reference to the recordset with the zip codes. (I&#039;m trying to select * from Stores where store.storezip = rsZips.zipcode)<BR><BR>I&#039;d greatly appreciate any help from anyone, anywhere!!

  2. #2
    Join Date
    Dec 1969

    Default Easier than you mught think...

    SELECT storesinfo FROM storestable WHERE storeszip IN (SELECT zipcode FROM ziptable WHERE zip in {radius})<BR><BR>The Sesond select statement should be the one you are currently using to get the zip code(s).<BR><BR>HTH<BR><BR>Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts