How can I combine this into one SQL script?
SELECT DATE, right('00000000' + SP_ID, case when right(sp_id,1) > '9' then 9 else 8 end) AS VALUE FROM WP_CD WHERE DATE < 06/30/1994 ELSE SELECT DATE, ISNULL(Sedol, Cusip) AS VALUE FROM WP_CD
Thanks.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.