sql select command output formatting in shell script

Hi,
I need to connect to the database and retrieve two variables from the database and store them in a variable,out of these two variables I need to get lastdigit appended to the variable 1 retrieved and variable 2 with out any modification
in short
select var,data from usage;
o/p= var1,5667456

required output should be :1,5667456:wall:
Anyone Please guide me in this :frowning:

$ echo "var1,5667456" | sed 's,[aA-zZ]*,,1'
1,5667456
$