Thanks Namliam, you were right, I had accessed the second array element instead of the first!
The SQL code I actually copied and pasted from a query that works perfectly so I am really confused!
Thanks for helping me with this, I appreciate the effort.
Beem