This seems to get the job done...
SELECT RIGHT('00000000' + CONVERT(VARCHAR,REPLACE(CONVERT(VARCHAR,GETDATE(),101),'/','')),8)
However, when I try to create it and CONVERT it to a DECIMAL, it then loses the "0"
SELECT CONVERT(DECIMAL(8,0),RIGHT('00000000' + CONVERT(VARCHAR,REPLACE(CONVERT(VARCHAR,GETDATE(),101),'/','')),8))
Can anyone please help me out with this? Is it impossible to convert it to a decimal and retain the leading "0" on the month?
My vendor's spec states..."Business Date Numeric For 8 positions MMDDYYYY"
Thanks for your review and am hopeful for a reply.