Hey guys, How can I handle embedded delimiters in a CSV file?
postgresql 9 embedded delimiter
Page 1 of 15 Replies - 875 Views - Last Post: 28 December 2012 - 12:14 PM
Replies To: postgresql 9 embedded delimiter
#2
Re: postgresql 9 embedded delimiter
Posted 19 December 2012 - 05:24 PM
What do you mean 'handle'?
#3
Re: postgresql 9 embedded delimiter
Posted 19 December 2012 - 06:39 PM
We're going to need a bit more information here. What is it exactly that you are trying to do? Is this some sort of parameterised query you're trying to run, with a delimited parameter being passed?
#4
Re: postgresql 9 embedded delimiter
Posted 28 December 2012 - 11:38 AM
No, I am copying a file to a schema and there seems to be embedded delimiters in the CSV file. So instead of just having something like:
name1, name2, num, dateA, dateB, reasoning
I have:
name1, name2, num, dateA, dateB, reas,oning
EDIT:: I am currently trying to write a CSV file filter in C++ to filter out the embedded delimiters, but am running into the same problem with trying to avoid them...
name1, name2, num, dateA, dateB, reasoning
I have:
name1, name2, num, dateA, dateB, reas,oning
EDIT:: I am currently trying to write a CSV file filter in C++ to filter out the embedded delimiters, but am running into the same problem with trying to avoid them...
This post has been edited by IngeniousHax: 28 December 2012 - 11:41 AM
#5
Re: postgresql 9 embedded delimiter
Posted 28 December 2012 - 11:56 AM
Is that comma supposed to be a part of the value?
That would tend to be handled like this
The quote marks there would be a sort of secondary delimiter, indicating that the comma within it should be read as a value rather than a delimiter.
That would tend to be handled like this
name1, name2, num, dateA, dateB, "reas,oning"
The quote marks there would be a sort of secondary delimiter, indicating that the comma within it should be read as a value rather than a delimiter.
#6
Re: postgresql 9 embedded delimiter
Posted 28 December 2012 - 12:14 PM
Right but the problem I am having is I can't get it to do that, since there are no spaces between the commas, IDK how to format it correctly...
The file looks exactly like this:
name1,name2,num,dateA,dateB,reas,oning
And I have a CSV file that is like:
name1,name2,num,dateA,dateB,"reas","oning"
But it seems that whoever is formatting the files prior to getting to me, doesn't catch this problem.
The file looks exactly like this:
name1,name2,num,dateA,dateB,reas,oning
And I have a CSV file that is like:
name1,name2,num,dateA,dateB,"reas","oning"
But it seems that whoever is formatting the files prior to getting to me, doesn't catch this problem.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote








|