Machiaveli
Programmer
hello,
Can someone translate the following code into an stored procedure? I have not yet enough skills to do that. I can learn from it if i have an example like this code:
Function splitnumberandadres(address As String, Optional zeroforaddress As Boolean = False) As String
Dim strFree As String, I As Byte
I = Len(address)
Do Until IsNumeric(Mid(address, I, 1)) = True
strFree = Mid(address, I, 1) & strFree
I = I - 1
If I = 0 Then
strFree = ""
GoTo next
Exit Do
End If
Loop
Do Until IsAlphaChar(Mid(address, I, 1)) = True Or Mid(address, I, 1) = "."
strFree = Mid(address, I, 1) & strFree
I = I - 1
If I = 0 Then
Exit Do
End If
Loop
next:
If zeroforaddress = False Then
huisnummeradreslos = Trim(Left(address, Len(address) - Len(strFree)))
Else
huisnummeradreslos = Trim(strFree)
End If
End Function
Function IsAlphaChar(strChar As String) As Boolean
IsAlphaChar = IsCharAlpha(Asc(strChar))
End Function
Can someone translate the following code into an stored procedure? I have not yet enough skills to do that. I can learn from it if i have an example like this code:
Function splitnumberandadres(address As String, Optional zeroforaddress As Boolean = False) As String
Dim strFree As String, I As Byte
I = Len(address)
Do Until IsNumeric(Mid(address, I, 1)) = True
strFree = Mid(address, I, 1) & strFree
I = I - 1
If I = 0 Then
strFree = ""
GoTo next
Exit Do
End If
Loop
Do Until IsAlphaChar(Mid(address, I, 1)) = True Or Mid(address, I, 1) = "."
strFree = Mid(address, I, 1) & strFree
I = I - 1
If I = 0 Then
Exit Do
End If
Loop
next:
If zeroforaddress = False Then
huisnummeradreslos = Trim(Left(address, Len(address) - Len(strFree)))
Else
huisnummeradreslos = Trim(strFree)
End If
End Function
Function IsAlphaChar(strChar As String) As Boolean
IsAlphaChar = IsCharAlpha(Asc(strChar))
End Function