M mw71 Well-Known Member Licensed User Longtime User Mar 28, 2018 #1 Hi, with this Query SELECT Call As [Call], Band As [Band], vom As [vom], zum As [zum], id FROM Log WHERE (vom <>'' AND zum <>'' ) COLLATE NOCASE result is: AA 2 Wind Götzing AA 7 Wind Götzing AA 7 Wind Unger BBBB 2 Wind Heinrich BBBB 7 Wind Heinrich CCCCC 2 Busch luna CCCCC 2 Wind luna CCCCC 7 Wind luna DDDD 2 Wind luna DDDD 7 Wind luna FF 2 Wind Lerche FF 7 Wind Lerche EEE 2 Wind luna EEE 7 Wind luna i need ab Query whith this Result: AA 2 Wind Götzing AA 7 Wind Unger BBBB 2 Wind Heinrich CCCCC 2 Busch luna CCCCC 2 Wind luna FF 2 Wind Lerche I only need one (the first) result for the pairing "von" and "zum", regardless of volume and call. For example, CCCCC, DDDD and EEE worked from Wind to Luna on 2 and 7, I only need CCCC on 2. thank you for help
Hi, with this Query SELECT Call As [Call], Band As [Band], vom As [vom], zum As [zum], id FROM Log WHERE (vom <>'' AND zum <>'' ) COLLATE NOCASE result is: AA 2 Wind Götzing AA 7 Wind Götzing AA 7 Wind Unger BBBB 2 Wind Heinrich BBBB 7 Wind Heinrich CCCCC 2 Busch luna CCCCC 2 Wind luna CCCCC 7 Wind luna DDDD 2 Wind luna DDDD 7 Wind luna FF 2 Wind Lerche FF 7 Wind Lerche EEE 2 Wind luna EEE 7 Wind luna i need ab Query whith this Result: AA 2 Wind Götzing AA 7 Wind Unger BBBB 2 Wind Heinrich CCCCC 2 Busch luna CCCCC 2 Wind luna FF 2 Wind Lerche I only need one (the first) result for the pairing "von" and "zum", regardless of volume and call. For example, CCCCC, DDDD and EEE worked from Wind to Luna on 2 and 7, I only need CCCC on 2. thank you for help
LucaMs Expert Licensed User Longtime User Mar 28, 2018 #2 https://www.w3schools.com/sql/sql_groupby.asp [you don't NEED all those "as..."] Upvote 0
K keirS Well-Known Member Licensed User Longtime User Mar 28, 2018 #3 Code: Copy SELECT min(Call) as Call, min(Band) as Band, vom, zum FROM Log group by vom,zum order by vom,zum Upvote 0
Code: Copy SELECT min(Call) as Call, min(Band) as Band, vom, zum FROM Log group by vom,zum order by vom,zum
Didier9 Well-Known Member Licensed User Longtime User Mar 28, 2018 #4 Code: Copy SELECT DISTINCT Log.vom AS vom, Log.zum AS zum FROM Log But that will not return Call or Band... Upvote 0
Code: Copy SELECT DISTINCT Log.vom AS vom, Log.zum AS zum FROM Log But that will not return Call or Band...
M mw71 Well-Known Member Licensed User Longtime User Mar 28, 2018 #5 thanks all, GROUP Work fine. At the moment i cant use the MIN statement, but this is a "Problem" in the App process. ps: the Query i have Post generate a Table View in the Table Class, the first query i have Write Upvote 0
thanks all, GROUP Work fine. At the moment i cant use the MIN statement, but this is a "Problem" in the App process. ps: the Query i have Post generate a Table View in the Table Class, the first query i have Write