Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Location
    Bangalore
    Posts
    15

    Unanswered: variable field values in a query

    I have a situation where like this.

    store table pdf_regions table region code table
    ----------- ---------------- -----------------
    store id pdf_file_name region codes
    state region_code
    district region
    chain
    county

    The region code table will have permanent data such as state, district, chain etc. I need to get a store number from the store table that will have such that the region code ( taken from pdf_regions ) contains the value "region" ( from pdf_regions ). In the sense that both sides of the '=' will have variable values. How can I go about doing this ?

  2. #2
    Join Date
    Sep 2002
    Posts
    102

  3. #3
    Join Date
    Mar 2003
    Location
    Bangalore
    Posts
    15
    Thanks but I need something quicker. And from someone who is more forgiving of a newbie to sql.

  4. #4
    Join Date
    Mar 2003
    Location
    Bangalore
    Posts
    15
    Again maybe I wasn't clear, I need to filter data with a dynamically changing column name ( region code varies - state, zipcode, county etc ) which should match the corresponding value in the regions column ( region varies - CA, 95009, Orange etc ) . All this for the store table

  5. #5
    Join Date
    Sep 2002
    Posts
    102
    I want to help you but I don't completely understood your table structures.

Posting Permissions

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