0
Inner Join on VBA SQL
I have a table called boors with these columns Nemad, out and ... I want to filter out field on the table by input value(IN MY CODE IS strCriteria STRING). But with DESC on number of Nemad fields (Max Number first and top of result) On the other hand. if number of Nemad=A is 100 (and is Max). All Records by Nemad=A on top Result. If number of Nemad=B is 95. All Records by Nemad=B on top other Result (expect A). My code is: SELECT a.* FROM boors AS a INNER JOIN ( SELECT boors.Nemad, COUNT(*) AS ct FROM boors AS b WHERE (" & strCriteria & ") GROUP BY boors.Nemad ORDER BY Count(*) DESC) ON a.Nemad = b.Nemad but I got no correct result. and i got Shuffle result in order. why?
1 Answer
0
What result you got when you write sql command in sql background?