* Remove Double Quotes from Query result set

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
ColinT54
Silver
Posts: 5
Joined: 08 Dec 2014 12:02
Family Historian: V6.2
Location: Edinburgh, Scotland

Remove Double Quotes from Query result set

Post by ColinT54 » 26 May 2017 09:20

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

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Remove Double Quotes from Query result set

Post by tatewise » 26 May 2017 10:10

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinT54
Silver
Posts: 5
Joined: 08 Dec 2014 12:02
Family Historian: V6.2
Location: Edinburgh, Scotland

Re: Remove Double Quotes from Query result set

Post by ColinT54 » 26 May 2017 11:52

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

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Remove Double Quotes from Query result set

Post by Valkrider » 26 May 2017 11:54

@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.

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Remove Double Quotes from Query result set

Post by tatewise » 26 May 2017 13:22

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinT54
Silver
Posts: 5
Joined: 08 Dec 2014 12:02
Family Historian: V6.2
Location: Edinburgh, Scotland

Re: Remove Double Quotes from Query result set

Post by ColinT54 » 26 May 2017 13:57

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

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Remove Double Quotes from Query result set

Post by tatewise » 26 May 2017 14:03

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Remove Double Quotes from Query result set

Post by Valkrider » 26 May 2017 14:49

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. ;)

Post Reply