Click here to Skip to main content
15,880,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
My Database Records Are Like :-
Id ItemName Comp1 Quantity1 Comp2 Quantity2 Comp3 Quantity3 Unit Make Rate 
1   I1      C11      10      C12      20    C13       15      U1   M1   30
2   I2      C11      12      C12      30    C13        5      U2   M2   15
3   I3      C11      100     C12      40    C13       80      U3   M3   50
4   I4      C11      5       C12      10    C13       15      U4   M4   40

I want Output Like :-
Id ItemName Comp1 MinQuantity Unit Make Rate
1  I1       C11   10          U1   M1   30 
4  I4       C11   5           U4   M4   40

Id ItemName Comp2 MinQunatity Unit Make Rate
3  I2       c12   40          U3   m3   50

Id ItemName Comp3 MinQuantity Unit Make Rate
2  I3       C13   5           u2   M2   15

Any Query In Ms-Access
Thanks In Advance
Posted
Updated 26-Mar-15 20:38pm
v2
Comments
OriginalGriff 27-Mar-15 2:52am    
And?
What have you tried?
Where are you stuck?
What help do you need?
binadi007 27-Mar-15 5:12am    
I want A Query which according to the comp1, comp2, comp3 get the lowest value and group them. For Example
Query Like

SELECT ItemsName, Unit, Make, Rate FROM TableName WHERE (Quantity1 < Quantity2 AND Quantity1<quantity3 and="" comp1="C11" )="" &nbsp;="" but="" as="" quantity="" column="" value="" varies="" from="" 3="" columns="" to="" 5="" then="" it="" is="" difficult="" compare="" like="" that="" for="" one="" comp="" the="" same="" second="" goes="" on.="" any="" shortest="" way="" do="" same<="" div=""> <div id="EditDialogPlaceholder"></div> <div id="ReplyDialogPlaceholder"></div>
binadi007 27-Mar-15 5:17am    
Sorry I've written my whole code, but codeproject mention that code as:-
I want A Query which according to the comp1, comp2, comp3 get the lowest value and group them. For Example
Query Like

SELECT ItemsName, Unit, Make, Rate FROM TableName WHERE (Quantity1 < Quantity2 AND Quantity1<quantity2 and="" comp1="C11" )="" &nbsp;="" but="" as="" quantity="" column="" value="" varies="" from="" 3="" columns="" to="" 5="" then="" it="" is="" difficult="" compare="" like="" that="" for="" one="" comp="" the="" same="" second="" goes="" on.="" any="" shortest="" way="" do="" same<="" div=""> <div id="EditDialogPlaceholder"></div> <div id="ReplyDialogPlaceholder"></div>

Still not mention my whole code, Sorry But I think codeproject has some bug
CHill60 27-Mar-15 6:02am    
If you recopy your code, then paste it into Notepad then copy it again ... this will make sure you don't have any control characters in the clipboard.
Then use the Improve question link to paste your code into your original question. A pop-up will appear asking you how to format the clipboard - choose "Code Block"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900