Skip to main content

Posts

Showing posts with the label crystal reports

SQL Replace

A colleague recently asked me if it was possible to replace a string in SQL. After a bit of questioning, this is because entities like & in HTML would be encoded to & in his database. Since it was the case of outputting information from a SQL statement, this can be simply done by using the REPLACE function in the SELECT . For example: SELECT REPLACE(CompanyName, '&', '&') FROM Company The same concept applies in Crystal Reports.