Thema: Delphi SQL ReplaceString

Einzelnen Beitrag anzeigen

danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#3

AW: SQL ReplaceString

  Alt 4. Aug 2014, 12:12
What is recursively in your example?

Code:
update table set URL = replace (URL,'.','')
update table set URL = replace (URL,'/','-')
...
The existence and concrete syntax for 'replace' depends on the RDMS you are using (I am not familiar with ADS). Also, it might be possible to combine the replace-statements in one single update-statement.
Thanks to small changes work.
Delphi-Quellcode:
Query1.SQL.Clear;
Query1.SQL.Add('Update [tab_1] set [URL] = "REPLACE ([URL], ""."", """")"');
Query1.SQL.Add('Update [tab_1] set [URL] = "REPLACE ([URL], ""/"", ""-"")"');
Query1.ExecSQL;
......
Thanks Daniel
Daniel
  Mit Zitat antworten Zitat