Selective chelation of Cd(II) and Pb(II) versus Ca(II) and Zn(II) by using octadentate ligands containing pyridinecarboxylate and pyridyl pendants.