- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
Create Proc char32add1(
@char32 nvarchar(1) =Null,
@rez nvarchar(1) output,
@rez1 int=-1 output
)
As
Begin
if (@char32 is Null) return -1
Select @rez1=0
if (@char32 = "0") Begin Select @rez="1"
return 0 End
if (@char32 = "1") Begin Select @rez="2"
return 0 End
if (@char32 = "2") Begin Select @rez="3"
return 0 End
if (@char32 = "3") Begin Select @rez="4"
return 0 End
if (@char32 = "4") Begin Select @rez="5" return 0 End
if (@char32 = "5") Begin Select @rez="6" return 0 End
if (@char32 = "6") Begin Select @rez="7" return 0 End
if (@char32 = "7") Begin Select @rez="8" return 0 End
if (@char32 = "8") Begin Select @rez="9" return 0 End
if (@char32 = "9") Begin Select @rez="A" return 0 End
if (@char32 = "a" or @char32 = "A" ) Begin Select @rez="B" return 0 End
if (@char32 = "b" or @char32 = "B" ) Begin Select @rez="C" return 0 End
if (@char32 = "c" or @char32 = "C" ) Begin Select @rez="D" return 0 End
if (@char32 = "d" or @char32 = "D" ) Begin Select @rez="E" return 0 End
if (@char32 = "e" or @char32 = "E" ) Begin Select @rez="F" return 0 End
if (@char32 = "f" or @char32 = "F" ) Begin Select @rez="G" return 0 End
if (@char32 = "g" or @char32 = "G" ) Begin Select @rez="H" return 0 End
if (@char32 = "h" or @char32 = "H" ) Begin Select @rez="I" return 0 End
if (@char32 = "i" or @char32 = "I" ) Begin Select @rez="J" return 0 End
if (@char32 = "j" or @char32 = "J" ) Begin Select @rez="K" return 0 End
if (@char32 = "k" or @char32 = "K" ) Begin Select @rez="L" return 0 End
if (@char32 = "l" or @char32 = "L" ) Begin Select @rez="M" return 0 End
if (@char32 = "m" or @char32 = "M" ) Begin Select @rez="N" return 0 End
if (@char32 = "n" or @char32 = "N" ) Begin Select @rez="O" return 0 End
if (@char32 = "o" or @char32 = "O" ) Begin Select @rez="P" return 0 End
if (@char32 = "p" or @char32 = "P" ) Begin Select @rez="Q" return 0 End
if (@char32 = "q" or @char32 = "Q" ) Begin Select @rez="R" return 0 End
if (@char32 = "r" or @char32 = "R" ) Begin Select @rez="S" return 0 End
if (@char32 = "s"or @char32 = "S" ) Begin Select @rez="T" return 0 End
if (@char32 = "t" or @char32 = "T" ) Begin Select @rez="U" return 0 End
if (@char32 = "u" or @char32 = "U" ) Begin Select @rez="V" return 0 End
Select @rez1=1
if (@char32 = "v" or @char32 = "V" ) Begin Select @rez="0" return 1 End
End
guest 29.11.2011 17:21 # +1