Example :-1
1’s
Complete Example
Declare @MainChar Varchar(Max)='0101010101'
set @MainChar=replace(replace(replace(@MainChar,'1','a'),'0','1'),'a','0')
select @MainChar
output
1010101010
Example :-2
1’s
Complete Example
Declare @MainChar Varchar(Max)='000000'
set @MainChar=replace(replace(replace(@MainChar,'1','a'),'0','1'),'a','0')
select @MainChar
output
111111
Example :-3
1’s
Complete Example
Declare @MainChar Varchar(Max)='11111'
set @MainChar=replace(replace(replace(@MainChar,'1','a'),'0','1'),'a','0')
select @MainChar
output
00000
No comments:
Post a Comment