create table ad ( Id int identity(1,1), Pid as case len(Id) when 1 then 'DGP'+' '+convert(varchar,ID)+' '+'01052013' when 2 then 'DGP'+convert(varchar,ID)+'01052013' else 'DGP'+convert(varchar,ID) end ) INSERT INTO ad DEFAULT VALUES
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)