Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

AW: [SQL] String -> Date Konvertierungsfehler

  Alt 7. Sep 2010, 11:04
Hallo,

Habs jetzt so gelöst:

SQL-Code:
SELECT
  case
    when (tabelle.charfeld like "__.__.____") then CAST(tabelle.charfeld as DATE)
    else 'TODAY'
  end as feld
FROM tabelle
Ist nicht 100%ig narrensicher, aber ich denke für meine Zwecke wird es erstmal reichen

@p80286: Nein es könnte theoretisch auch "Hallo Welt" drin stehn. Das ist gerade das Problem. Ansonsten würde ich das sicher auch (leichter) hinbekommen.

Aber danke für eure Hilfe
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat