I need to export a string of text but they need to be between two double quotation marks (") ie, "Hello wold".
The field deliminator needs to a comma. (.)
textA = "blah"
; textB = "stuff"
; textC = "nonsense"
; textD = "rubbish"
; quotes = char(34)
; result = quotes & textA & quotes & " " & quotes & textB & quotes & " " & quotes & textC & quotes & " " & quotes & textD & quotes
This delivers: "blah" "stuff" "nonsense" "rubbish"
Can you supply a more detailed explanation?
I need to export the following:
It needs to have the double quotation marks in the export.
Are those field names from which you are exporting a bunch of records?
Well i thought it would be easier to combine it in a calculation into one text field and then export the records that way. But i am battling with getting the double quotation marks in between the words.
use CHAR(34) & "Account No." & CHAR(34), for example.
How about using the Quote() function?:
Quote(textA) & "," & Quote(textB) & "," & ....
Thank you very much for your help!
As you know, it depend on necessity of escaping double quote in data.
Quote() add backslash. "\""
Some programs need doubling double quote. """"
And, pilcrow is special char (will be escaped in Quote()) in FM, but usually not in outer space.
The use of Quote() , yes, will ESCAPE any double-quotes already (in a field, for example). In addition if a field has a return, it will be converted to the pilcrow.
did OP specify "in outer space"?
Substitute ( Quote(field1) & "," & Quote(field2) & "," & Quote(field3) ; Char ( 182 ) ; Char ( 13 ) )
will handle the returns-in-field & I suppose you could substitute the \" for "". I think Quote() may be easier.
Retrieving data ...