If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > variable field values in a query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-06-05, 12:19
gregarious gregarious is offline
Registered User
 
Join Date: Mar 2003
Location: Bangalore
Posts: 15
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 ?
Reply With Quote
  #2 (permalink)  
Old 10-06-05, 13:57
blackguard blackguard is offline
Registered User
 
Join Date: Sep 2002
Posts: 102
Reply With Quote
  #3 (permalink)  
Old 10-06-05, 14:56
gregarious gregarious is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 10-06-05, 15:05
gregarious gregarious is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 10-11-05, 11:47
blackguard blackguard is offline
Registered User
 
Join Date: Sep 2002
Posts: 102
I want to help you but I don't completely understood your table structures.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On