Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
thegladiator
Starting Member
2 Posts |
Posted - 2011-11-11 : 17:16:00
|
| I am trying to run a query based on a query and a table. this is what i have and what i wantDataset 1 (query)P/NInvCostTemplate NumberDataset 2 (table)Primary Key (Template)margin1margin2margin3break1break2break3This is the explanation of what i have and want to do1) I have p/n's in our system that i want to assign a resale to based on the items cost.2) Each record(row) has been assigned a Template Number which will define the desired resale. The template number was manufactured using an iif statement in Dataset 1(query).3) I have created dataset 2 which is table that houses the resale margins which will be used to construct the resales and the breaks that i want to assign at set buy qtys.4) What i want to do is create another query that has in it a sql statement that evaluates each row of dataset 1 allowing me to calculate resales based on what template number is assigned to it to be used from dataset 2.I know this is possible, just having trouble wrapping my head around how to do this. I have taught myself access and sql and this is just one concept i can't quite master yet.thanks |
|
|
thegladiator
Starting Member
2 Posts |
Posted - 2011-11-11 : 19:10:23
|
| actually, looks like i have it. Long day and wasn't thinknig right. my tables and relationships are setup properly so i'm good to go |
 |
|
|
|
|
|