By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,379 Members | 3,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,379 IT Pros & Developers. It's quick & easy.

Adding 2 numbers

100+
P: 147
Hello

I am trying to add 2 numbers together which live on an Access database.

My table looks like



If a customer wanted a total height of 3, I would show parts H1 and S2 because H1 has a height of 1 and S2 has a height of 2 (1+2=3)! If he wanted a total height of 2.5, I would showhim parts H2 and S1.

I don't know how to do this with SQL. The customer will enter the desired height into a web form, and I want to show him the options.

Does any one have any idea how I would do such a task?

Thanks

Dave
Feb 23 '09 #1
Share this Question
Share on Google+
1 Reply


tlhintoq
Expert 2.5K+
P: 3,525
I'm old-school brute force. I would make a loop for H_Height, and a nested loop for S_Height.

Expand|Select|Wrap|Line Numbers
  1. If (H[0] + s[0] == CustomerWant) AddSuccessfulCombinationMethod();
Feb 23 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.