sql - SQLstatements returns different values in MS Access & MSSQL -
i trying write sqlstatement return max value table. works in sql server, microsoft access sorts values based on first number (and not number whole) returning wrong tuple.
select top 1 [currency code], [relational exch_ rate amount] [cronus sverige ab$currency exchange rate] order [relational exch_ rate amount] desc
so correct answer should return: gbp | 1354.xxx
and in access get: hkd | 97.xxx
i have tried
select [currency code], max([relational exch_ rate amount]) [cronus sverige ab$currency exchange rate]
it works max(columnname), when add [currency code] in front/after returns wrong value.
edit: seems access sorting numerical value letters rather actual numbers. tried find way change - without results. input appreciated.
selecting top 1 after grouping , ordering should want
select top 1 [currency code], max([relational exch_ rate amount]) [cronus sverige ab$currency exchange rate] group [currency code] order max([relational exch_ rate amount]) desc
Comments
Post a Comment