Morning Sergey,
I have a question about the double single quotes. Won't the program think that is a break and put the second part of the string into the next field?
On the text merge code, I put the code you gave below into my program, and my veriable lcSqlStr remained a empty string after moving through that code. What is the 'Pretext 7' do? Should I take it out?
Thanks for the help.
Beth
>Beth,
>
>There're two string literal delimiters: single and double quotes. The single quote is the one I would recomend to use. You've to double single quotes in the string literal if there's one. For example
WHERE name = 'O''Neil'
The double quote can also be used but it's an ANSI standard for identifier delimiters and it's interpretation by SQL server is controled by SET QUOTED_IDENTIFIER setting at parse time. See BOL for details.
>
>You can also consider using textmerge to build SPT statements. It makes code more readable and easier to maintain.
TEXT TO lcSql TEXTMERGE NOSHOW PRETEXT 7
>Insert into <<paKeys(2)>> values ( <<CHRTRAN(pcInsertStr, ['], ['']>>)
>ENDTEXT
>
>
>