Page 1 of 1
Remove Double Quotes from Query result set
Posted: 26 May 2017 09:20
by ColinT54
I've written a simple query that produces an individual's pedigree in ahnentafel form. Each output row consists of a single text field which reads thus -
"n. First Name(s) SURNAME born: Birth Place, BirthYear died: Death Place, DateYear".
My wish is to copy the result of the query and paste it into another program (Genome Mate Pro). However, Family Historian encloses each field with double quotes but I require each row to simply be delimited by a carriage return/line feed, without the quotes. Is there any way to achieve this within Family Historian?
Hope someone can help.
Thanks
CT
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 10:10
by tatewise
I presume you are using one of the Save As Text File options.
Use Save As Comma-Separated CSV File instead and if necessary change the file type from .csv to .txt as you Save it.
Since it has a single column per row there will be no superfluous commas added.
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 11:52
by ColinT54
Hi Mike
Thanks for the reply.
I was using the copy to clipboard option.
I tried your suggested method of saving as a comma delimited file but I'm afraid the result is just the same - double quotes still there.
I was hoping that there was an option that could be switched in FH or a function that cleaned the output.
Cheers
Colin
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 11:54
by Valkrider
@Colin
If you can't resolve it at the FH end you can always edit the file in a plain text editor. I recommend Notepad++, it's free. Then just do a search and 'replace all' on the file and re-save. It is an extra step but it will give you what you want.
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 13:22
by tatewise
Colin, it is the commas ( , ) in your column text.
If you can find some way of removing them or using another character then the quotes will not get created.
e.g.
n. First Name(s) SURNAME born: BirthYear at Birth Place died: DeathYear at Death Place
or
n. First Name(s) SURNAME born: Birth Place; BirthYear died: Death Place; DeathYear
Alternatively use Save As Text and perform a global Find & Replace as suggested by Valkrider using even the standard free Windows built-in Notepad utility.
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 13:57
by ColinT54
Valkrider/Mike
Thanks for your help.
Unfortunately the receiving program expects the commas so I can't do anything about that side. The solution, as you say, is to use a intermediate program to replace the double quotes. Basic old Notepad and CTL+H does the job.
Thanks for your expertise.
Colin
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 14:03
by tatewise
Colin, can you produce the data in three columns?
i.e.
n. First Name(s) SURNAME born: Birth Place
BirthYear died: Death Place
DeathYear
Then when saved as a CSV (converted to TXT) the commas are inserted by FH and the quotes are not, unless of course if any of the names include commas, which the Place names probably do - Bother - so that won't work either.
Re: Remove Double Quotes from Query result set
Posted: 26 May 2017 14:49
by Valkrider
tatewise wrote: Bother - so that won't work either.
That is why it is always a good idea to use semi colons as field separators if you want a CSV file for import into another programme and set that as the option if your receiving programme allows or do 2 search and replaces one to convert commas to soemthing else usually full stops and then the second to convert the semi colons to commas.
