I am really not sure what you're asking here but I will take a stab at what I think it is. Create a stored procedure on you "external" non SPS db I suspect and either run embed it in the page or a web part. I need more specific requirements if that doesnt suffice.
Regards, Hulicat