Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Build Dynamic Matrix

Status
Not open for further replies.

GoSooJJ

Programmer
Feb 24, 2001
76
0
0
US
I'm not sure if this is possible but I hope someone can help me out.

Basically I have a table with company information and conditional values. Conditional Values can be '<=$100,>$1000' or '>$200,<$500'...

In my application, I will pass a company information and value arguments. For example, if I pass the value '2100' then I should be able to query the '<=$100,>$1000' and '>$200,<$500' rows. Which I have no idea how I can do this...

Does anyone has an idea on this? It looks like I need to build dynamic query for Conditional Values but...

Please share your idea.
Thank you!
 
Is '<=$100,>$1000' the actual data you are storing in your table for a customer?



Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Okay I figured it out ^_^

1. Cleaned up the table values from '<=$100,>$1000' to '<= 100,> 1000' for all
2. Get 1st query by given constant values such as company name, company address, and so on.
3. Loop the query to evaluate the given value '2100' with queried values. For example, with '<= 100,> 1000', it evaluates in application by '2100 LTE 100' '2100 GT 1000' then if they both are true then put that into new query. In this way, I could only query with true rows.

This may not clear to you but I spent many hours and days to come up this matrix solution hehe.

Have a good day all~
 
I do not really understand the table structure any better than I did before ;-) but this does not sound very efficient. Are you actually storing the literal values "<=$100,>$1000'" in your table?

----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top