AI bliver først for alvor en del af arbejdet, når teknologien integreres i den måde, vi arbejder på. At have adgang til AI betyder ikke nødvendigvis, at medarbejderne er klar til at bruge den.
If you use a modul then you can use this where ever its needed also in your queries.
MODUL will look something like this(can be optimized).
Public Function MyMod(MyStr As String, cIn As String, cOut As String) As String Dim tmpStr As String Dim i As Integer Dim j As Variant tmpStr = MyStr For i = 1 To Len(tmpStr) j = InStr(i, tmpStr, cIn, vbBinaryCompare) If Not IsNull(j) And j > 0 Then Mid(tmpStr, j) = cOut End If Next i MyMod = tmpStr End Function
and a querie will look something like this
SELECT tbl1.Field1, MyMod([Field1],\"t\",\"T\") AS erstat FROM tbl1;
The MyMod function takes three parameters. The first is the string to convert. Second is the character to convert and the third is the character to convert to.
The example I sent answers your question. Erstat et tegn....
Modify the function to take just the first parameter (MyStr) then alter the function to erstat the chracters you want. The SELECT would then look like this. SELECT tbl1.Field1, MyMod([Field1]) AS erstat FROM tbl1;
The first answer I gave uses a module which gets called from your query. The function MyMod can quite easily be modified to convert more than one character. If you need help on this then let me know.
JEG FORSTÅR IKKE MODULET VIS JEG SKAL ERSTATTE FLERE TEGN JEG KAN KUN FINDE UD AF AT ERSTATTE ET TEGN AD GANGEN KAN DU VISE MEJ VÅRDAN MAN ERSTATTER FLERE TEGN AD GANGEN MANGE GANGE TAK FÅR HJELPEN
If you want to convert further characters then just add a new case in the select case.
Public Function MyMod(MyStr As String) As String Dim tmpStr As String Dim i As Integer
tmpStr = Trim(MyStr)
\'Loop through whole string For i = 1 To Len(tmpStr)
Select Case Mid(MyStr, i, 1)
Case \"å\" Mid(tmpStr, i) = \"a\"
Case \"W\" Mid(tmpStr, i) = \"z\" Case Else
End Select
Next i
MyMod = tmpStr
End Function
a querie will look something like this
SELECT tbl1.Field1, MyMod([Field1]) AS erstat FROM tbl1;
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.