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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Maybe Update Query?
I’m floundering about and need someone to point me in the right direction. I
have two tables: tblCostCat CostCatNm-PK-text TypeID-text GrpTypeID-text tblTransData ID-PK-number Employee-text CostCatNm-text TransDate-date Hours-number I need to populate the tblTransData with the TypeID in tblCostCat. I’m not that experience with update queries but created one recently for another task and thought I’d use the same logic. I’ll leave out all the details about this because it didn’t work and I’m pretty sure I was going about it wrong. What’s the best or easiest way to do this? Thanks for any suggestions. |
#2
|
|||
|
|||
Maybe Update Query?
It seems that you are mixing terms. An Update query revises the data in an
existing record. An Append query adds new records. I do not see a need for either in your case. If you want to see the TypeID field when you display tblTransData records just do it in a query like this -- SELECT TypeID, GrpTypeID, Employee, CostCatNm, TransDate, Hours FROM tblCostCat LEFT JOIN tblTransData ON tblCostCat.CostCatNm = tblTransData.CostCatNm; -- Build a little, test a little. "AccessKay" wrote: I’m floundering about and need someone to point me in the right direction. I have two tables: tblCostCat CostCatNm-PK-text TypeID-text GrpTypeID-text tblTransData ID-PK-number Employee-text CostCatNm-text TransDate-date Hours-number I need to populate the tblTransData with the TypeID in tblCostCat. I’m not that experience with update queries but created one recently for another task and thought I’d use the same logic. I’ll leave out all the details about this because it didn’t work and I’m pretty sure I was going about it wrong. What’s the best or easiest way to do this? Thanks for any suggestions. |
#3
|
|||
|
|||
Maybe Update Query?
Hi Karl…you’re absolutely right as usual. I was way off in a different
direction! Thanks for setting me straight. "KARL DEWEY" wrote: It seems that you are mixing terms. An Update query revises the data in an existing record. An Append query adds new records. I do not see a need for either in your case. If you want to see the TypeID field when you display tblTransData records just do it in a query like this -- SELECT TypeID, GrpTypeID, Employee, CostCatNm, TransDate, Hours FROM tblCostCat LEFT JOIN tblTransData ON tblCostCat.CostCatNm = tblTransData.CostCatNm; -- Build a little, test a little. "AccessKay" wrote: I’m floundering about and need someone to point me in the right direction. I have two tables: tblCostCat CostCatNm-PK-text TypeID-text GrpTypeID-text tblTransData ID-PK-number Employee-text CostCatNm-text TransDate-date Hours-number I need to populate the tblTransData with the TypeID in tblCostCat. I’m not that experience with update queries but created one recently for another task and thought I’d use the same logic. I’ll leave out all the details about this because it didn’t work and I’m pretty sure I was going about it wrong. What’s the best or easiest way to do this? Thanks for any suggestions. |
Thread Tools | |
Display Modes | |
|
|