Sonali bhosale
Sonali bhosale

Reputation: 3

SQL string function QUOTENAME() not giving result for long strings

QuoteName(i.ItemDescription,CHAR(34)) is not giving any result when the item description is very long. Is there any solution that can let us hold the string longer than 128 characters and return it?

Upvotes: 0

Views: 1110

Answers (1)

Ilyes
Ilyes

Reputation: 14928

You can work with another way as

SELECT CONCAT('"', REPLACE(YourLongString, '"', '""'), '"')

Upvotes: 5

Related Questions