Question : Replace line from keyword

I want to find a keyword and replace the entire line with some text.  I would prefer to do this with a cmd script, but VB will work also.

findstring= "a"
replacestring = "1 2 3 4 5"

example input
a happy school
b cool in school
c your way to school

example output
1 2 3 4 5
b cool in school
c you way to school

Thanks
Fixitben

Answer : Replace line from keyword

Something like this?
If you knew the product codes beforehand.

select A.ClientID,
 sum(case when B.ProductCode = 'abc' then 1 end) abc,
 sum(case when B.ProductCode = 'cde' then 1 end) cde,
 sum(case when B.ProductCode = 'fgh' then 1 end) fgh
from TableA A
left join tableB B on A.ClientID = B.ClientID
group by A.ClientID
Random Solutions  
 
programming4us programming4us