Re: How to find Minimum of four fields
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Dec 2006 14:15:46 -0500
Union queries can only be made in the SQL view.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"galsaba" <galsaba@xxxxxxx> wrote in message
news:1166209065.356610.41530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This is BEATIFUL! It works! (although I dont exactly understand what I
did...)
is there a way to do it with "Design View"? or just "SQL View"?
Thanks!
Douglas J. Steele wrote:
Let's assume you currently have a table with Id, Field1, Field2, WebCost,
PhoneCost, StoreCost, and ShowCost.
Create a UNION query along the following lines:
SELECT Id, Field1, Field2, "WebCost" AS CostType, WebCost AS CostAmount
FROM MyTable
UNION
SELECT Id, Field1, Field2, "PhoneCost" AS CostType, PhoneCost AS
CostAmount
FROM MyTable
UNION
SELECT Id, Field1, Field2, "StoreCost" AS CostType, StoreCost AS
CostAmount
FROM MyTable
UNION
SELECT Id, Field1, Field2, "ShowCost" AS CostType, ShowCost AS CostAmount
FROM MyTable
Use that query to populate the properly normalized table.
.
- References:
- How to find Minimum of four fields
- From: galsaba
- Re: How to find Minimum of four fields
- From: Jeff Boyce
- Re: How to find Minimum of four fields
- From: galsaba
- Re: How to find Minimum of four fields
- From: Jeff Boyce
- Re: How to find Minimum of four fields
- From: galsaba
- Re: How to find Minimum of four fields
- From: Douglas J. Steele
- Re: How to find Minimum of four fields
- From: galsaba
- Re: How to find Minimum of four fields
- From: Douglas J. Steele
- Re: How to find Minimum of four fields
- From: galsaba
- How to find Minimum of four fields
- Prev by Date: Re: How to find Minimum of four fields
- Next by Date: Need help with form with a single combobox & multiple textboxes, option buttons
- Previous by thread: Re: How to find Minimum of four fields
- Next by thread: Vendor Customer Product Cross-Reference?
- Index(es):