jasonsalas
IS-IT--Management
hi all,
i'm trying to export a DB table i've got to CSV, part of which requires me to have to wrap a field of type TEXT in quotations ("). concatenation doesn't work because SQL Server thinks i'm doing an addition operation:
SELECT id,title,'"'+body+'"' as [body] FROM table
i tried CAST'ing the field to VARCHAR, but that won't work because it only support a max of 8,000 characters, so i lose a lot of data.
anyone got any other ideas how i can surround the field with quotations? thanks so much!
i'm trying to export a DB table i've got to CSV, part of which requires me to have to wrap a field of type TEXT in quotations ("). concatenation doesn't work because SQL Server thinks i'm doing an addition operation:
SELECT id,title,'"'+body+'"' as [body] FROM table
i tried CAST'ing the field to VARCHAR, but that won't work because it only support a max of 8,000 characters, so i lose a lot of data.
anyone got any other ideas how i can surround the field with quotations? thanks so much!