silentwolf
Active member
- Local time
- Today, 08:32
- Joined
- Jun 12, 2009
- Messages
- 655
Well I try to explain so you understand what my objective is.
There is one Field in my Data which is combined and the string is massive about 300 odd Characters.
I split this field into more fields so I can get the information I need in more suitable manner.
The Problem however is that the original Field is not following a certain concept or better it veries
both in Categories or in the whole field.
It does not follow constant way.
My fields will then get filled with just a appropiate or part of that massive string.
To manage the update I created now different Queries according to those Cathegories so it is easier to have a custom function returning
all the infos I need and then fill those fields accordingly.
What I send you was just one part of the Query, now I put all those Queries into one well not all yet but getting there:
something like that:
it all runs pretty nicely but maybe there is again a better way?
Is that or could I leave it like that or is there a problem with it?
There is one Field in my Data which is combined and the string is massive about 300 odd Characters.
I split this field into more fields so I can get the information I need in more suitable manner.
The Problem however is that the original Field is not following a certain concept or better it veries
both in Categories or in the whole field.
It does not follow constant way.
My fields will then get filled with just a appropiate or part of that massive string.
To manage the update I created now different Queries according to those Cathegories so it is easier to have a custom function returning
all the infos I need and then fill those fields accordingly.
What I send you was just one part of the Query, now I put all those Queries into one well not all yet but getting there:
something like that:
Code:
Sub Combine()
Dim strSQL As String
strSQL = "UPDATE qryGutschriften SET qryGutschriften.Zahlungsreferenz = GutschriftZahlungsref([UMSATZTEXT]), qryGutschriften.Auftraggeber = AuftraggeberReference([UMSATZTEXT]), qryGutschriften.Umsatztext = UpdateGutschriftUmsatztext([UMSATZTEXT]);"
CurrentDb.Execute strSQL, dbFailOnError
strSQL = "UPDATE qrySEPALastschriften SET qrySEPALastschriften.Mandatsnummer = Mandatsnummer([UMSATZTEXT]), qrySEPALastschriften.Umsatztext = UpdateGutschriftUmsatztext([UMSATZTEXT]);"
CurrentDb.Execute strSQL, dbFailOnError
strSQL = "UPDATE qryLastschriften SET qryLastschriften.Mandatsnummer = Mandatsnummer([UMSATZTEXT]), qryLastschriften.Zahlungsreferenz = LastschriftZahlungsref([UMSATZTEXT]), qryLastschriften.Umsatztext = UpdateGutschriftUmsatztext([UMSATZTEXT]);"
CurrentDb.Execute strSQL, dbFailOnError
strSQL = "UPDATE qryZahlungINET SET qryZahlungINET.Zahlungsreferenz = Zahlungsreferenz([UMSATZTEXT]), qryZahlungINET.Auftraggeber = AuftraggeberReference([UMSATZTEXT]), qryZahlungINET.Umsatztext = UpdateGutschriftUmsatztext([UMSATZTEXT]);"
CurrentDb.Execute strSQL, dbFailOnError
End Sub
it all runs pretty nicely but maybe there is again a better way?
Is that or could I leave it like that or is there a problem with it?