Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo Forum,

ich habe folgendes Problem:

Ich habe ein Textfeld in dem viele Wörter mit Leerzeichen getrennt enthalten sind. Diese möchte ich jetzt mit SQL-Abfrage in einzelne Wörter teilen und jedes Wort in einer eigenen Zeile anzeigen lassen. Später möchte ich mit einer NOT IN Bedingung prüfen, ob eines der Wörter in dem Textfeld enthalten ist.

Soweit ich weiß, prüft NOT IN den kompletten Inhalt eines Feldes, daher die Aufteilung des Textes in einzelne Wörter.

Hat jemand eine Idee wie ich die Abfrage / SQL-Statement am besten aufbauen kann?

Beste Grüße

Patrick

Moin Patrick,

hatte grade mal ein paar Minuten Zeit.

Hilft dir des weiter?

Ich hatte zu dem Quellcode ein Formular mit einem Textfeld "Begriff" in dem der String steht, dazu ein Memofeld mit Namen "Memofeld" und halt den Button "buttonsplit".


Private Sub buttonsplit_Click()


Dim teststring As String

Dim strsuche As String

Dim strParts() As String

Dim intCounter As Integer


teststring = Me.Begriff 'String, in dem Leerzeichen enthalten sind

strsuche = "test" 'Begriff, der gesucht werden soll


strParts = Split(teststring, " ") 'String splitten


For intCounter = LBound(strParts()) To UBound(strParts())

    Me.memofeld = Me.memofeld & Chr(13) & Chr(10) & strParts(intCounter) 'gesplitteten String in Memofeld schreiben

Next intCounter


Me.memofeld.SetFocus

If InStr(Me.memofeld, strsuche) Then 'Suchbegriff im Memofeld suchen

  MsgBox "jo"

Else

  MsgBox "nö"

End If


End Sub

PS: Ich mag deine Signatur. :)

Grüße

Sabrina

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.