/ Published in: SQL
Example below
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT CASE COLUMN WHEN 'search_string' THEN 'replace_string1' ELSE 'replace_string2' END AS column_rename FROM TABLE --Example SELECT OBJECTID, CASE PDF_NAME WHEN '' THEN '' ELSE '<a href="./doc/logbooks/'>' + PDF_NAME + '</a>' END AS LogBooks, CASE DAILY_REP WHEN '' THEN '' ELSE '<a href="./doc/Reports/'>' + DAILY_REP + '</a>' END AS DailyReport, STR_NAME, Shape FROM DatabaseName.TableName