MSSQL 2000 / Umlaute ersetzen
Geht sowas auch in MSSQL?!
IsUpCase As Boolean, Res As String
If IsNull(pString) Then Umlaut = Null: Exit Function
Res = ""
For I = 1 To Len(pString)
Ch = Mid(pString, I, 1)
Ch1 = IIf(I < Len(pString), Mid(pString, I + 1, 1), " ")
IsUpCase = (Asc(Ch1) = Asc(UCase(Ch1)))
Select Case Asc(Ch)
Case Asc("Ä"): Res = Res & IIf(IsUpCase, "AE", "Ae")
Case Asc("Ö"): Res = Res & IIf(IsUpCase, "OE", "Oe")
Case Asc("Ü"): Res = Res & IIf(IsUpCase, "UE", "Ue")
Case Asc("ä"): Res = Res & "ae"
Case Asc("ö"): Res = Res & "oe"
Case Asc("ü"): Res = Res & "ue"
Case Asc("ß"): Res = Res & "ss"
Case Else: Res = Res & Ch
End Select
Next I
Umlaut = Res
Please also mark the comments that contributed to the solution of the article
Content-Key: 48026
Url: https://administrator.de/contentid/48026
Printed on: April 27, 2024 at 00:04 o'clock
1 Comment