wwUtils::FlattenSql
less than 1 minute to read

Flatten a SQL command that contains CHR(13) or CHR(10) characters into a single line by stripping out the CR/LF values and replacing them with a space.

Useful in code so you can write SQL expressions using multi-line SQL between TEXT and ENDTEXT.

For example:

foxpro
TEXT TO lcSql NOSHOW SELECT id, title, description FROM albums ORDER BY title ENDTEXT * &lcSql && fails lcSql = FlattenSql(lcSql) &lcSql && works
o.wwUtils.FlattenSql(lcSql)

Parameters

lcSql
A SQL String that can contain CR/LF characters, that are turned into spaces.


See also:

Class wwUtils

© West Wind Technologies, 1996-2024 • Updated: 03/21/21
Comment or report problem with topic