select otest.fname,cast(0 as integer) as clientid; from otest; inner join dup on; dup.fname =otest.fname; order by otest.fnamenow that gave me the layout i wanted in that.
0 peter 0 peterbut the only problem is when i do the replace all SQL you gave me it numbers from 1-20 which is the number of peeps i added to the table not based on the amount of times a person appears.