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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup Tax Rate

Status
Not open for further replies.

yctsai1

Programmer
Joined
Nov 1, 2006
Messages
7
Location
US
I need to lookup tax rate but not sure how to go about it.

DB1 Info.Name, State, Wage

DB2 Rate.State, RatePercent

On report: Name State Wage Tax

Tax = db1 info.wage * db2 Rate.ratepercent

there are multiple states in db2 and not sure how to lookup the rate and use it for multiplication.

if i just put it in, it will print out multiple lines for every state in db2.

 
Are you able to link these two tables on the state field? That should return only one value per state. If not, please show samples of the two state fields.

-LB
 
I've tried to link the two tables with all different ways but result still same, multiple records for each state in command.statecode

db1 and db2
name state
wage tax%
state

What I needto see:

NY
Name Wage Tax% tax State
person1 1000 1% 10 NY
person2 1000 1% 10 NY

NJ
person3 1000 1% 10 NY

What i am getting right now:
----------------------------
What I needto see:

NY
Name Wage Tax% tax State
person1 1000 1% 10 NY
person1 1000 1% 10 NJ
person2 1000 1% 10 NY
person2 1000 1% 10 NJ


NJ
person3 1000 1% 10 NY
person3 1000 1% 10 NJ

I can hide records in section expert by putting in
db1 state <> db2 state
but the sum or running sum doesn't work right after first set of state and grand total doesn't work right either.

Need a way to look at the db2 table to get the rate for the state and do the calculation.

 
got it

use select expert to make

db1 state = db2 state
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top