Hey thanks for the reply. I tried what you wrote and the compiler complains "Range variable name cannot match the name of a member of the 'Object' class." and it underlines the ToString() piece.
edit: Put parens around r.BottleCode.ToString() and it worked. Thanks!
By the way in case this helps anyone -
two tools i use in working with LINQ and SQL
Linqpad from www.linqpad.net
and Linqer from www.sqltolinq.com
together they rock for all kinds of back and forth to get a linq query to work right or to see how to get from sql to linq
and to debug what sometimes goes wrong in them.
linqer sometimes makes poor choises about how to handle some types so i do re-work it a bit. it may use a Convert method when it gets stuck on a few things... but it does get the basics of transforming a sql join and group into valid linq syntax.
just check it with linqpad and tweak the bad bits.... bam!