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...
Wednesday, June 11, 2014
Find the 2’s Compliment for the binary number in the SQL SERVER
2’s
Complete Example
Declare @MainChar Varchar(Max),@ReveL Varchar(Max),@ReveR Varchar(Max)
set @MainChar='0010010010'
if(len(replace(@MainChar,'0',''))>0)
begin
set @MainChar=replace(replace(replace(@MainChar,'1','a'),'0','1'),'a','0')
set @MainChar=REVERSE(@MainChar)
set @ReveL=replace(replace(replace(SUBSTRING(@MainChar,1,CHARINDEX('0', @MainChar)),'1','a'),'0','1'),'a','0');
set @ReveR=SUBSTRING(@MainChar,CHARINDEX('0', @MainChar)+1,Len(@MainChar)-(CHARINDEX('0', @MainChar)))
select...
Convert Textbox in the Custom Language Transliteration in ASP.Net
Create on
sample we page and write this code below
<%@ Page
Language="C#"
AutoEventWireup="true"
CodeBehind="LanguageTextBox.aspx.cs"
Inherits="SampleTestingCodes.LanguageTextBox"
ClientIDMode="Static"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
...
Subscribe to:
Posts (Atom)