how to convert the result of the select query to comma seperated data - urgent pls

how to convert the result of the select query to comma seperated data and put in a .csv file using korn shell.
Pls help me as its very urgent.

Thanks,
Hema.

i've moved the thread to "shell programming" cause this is no solaris specific problem. please post your questions in the right forum!