Taka a look at Functions Transact-SQL similar to function FoxPro Thread #997657 Message #997657
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller The only thing normal about database guys is their tables.