Author |
Message
|
GYR |
Posted: Fri Dec 16, 2005 8:52 am Post subject: CSV Output question |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
Is the any way when outputting a csv format file that you can automatically get it to put " (double quotes) around the fields without having to concat them before output please. I know that in some exports it does that for you automatically if it is a alphanumeric field but can you do that in the Broker (V5) Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 16, 2005 8:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Have you considered changing your delimiter from ',' to '","'? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
GYR |
Posted: Fri Dec 16, 2005 10:06 am Post subject: |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
Cheers for reply but maybe i being bit thick here how ill that work - the result i want is - example "FRED","BASIL","some other rubbish", etc etc. the input body values are XML (so string) and they for instance the values FRED, BASIL etc if i output to csv with , as delimiter i assume that i would get FRED,BASIL,some other rubbish...... but i wanted the Broker to put the double quotes either side if possible without having to concat them to the original XML values. I apologise if i have misread your solution. Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 16, 2005 10:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In order to get Broker to output an XML file as a CSV file, you have to create a model of the CSV data format.
In that model, there is the notion of a "delimiter" or a "separator".
You can set that delimiter to anything you want. One thing you could set it to is the comma character, by itself.
Then the data will show up separated by a comma.
Another thing you can set it to is a quote followed by a comma followed by a quote.
Then the data will show up separated by what you want.
Have you considered getting training on this product? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
GYR |
Posted: Fri Dec 16, 2005 11:04 am Post subject: |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
jefflowery - Very, helpful thanks and I am both trained and aware of how delimters and the notion there of, works. Unfortunately you solution, presumably because you have not tried it out will show you that although the 2nd element onwards will in fact have the double quotes followed by a comma followed by double quotes and that the last element delimiter will be supressed it doesn't actually cater for the set of double quotes at the beginning of the first element and therefore will have to be concatonated to that first element. Perhaps before you ridicule others you may want o be sure your solution is correct. Thanks anyway for the retrain. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 16, 2005 11:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Sure.
You have to do a little more work on the edge cases.
I didn't give more specifics on this because you haven't been more specific.
I assume you're using TDS, and not CWF. If so, then you can look at group indicators and terminators. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wooda |
Posted: Tue Dec 20, 2005 8:10 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Modelling CSV messages in TDS has been discussed very many times on this forum, including use of double quotes around your data.
Try using the search function on this forum. It is very simple and requires no training
 |
|
Back to top |
|
 |
GYR |
Posted: Wed Dec 21, 2005 2:33 am Post subject: |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
WOW! everyone is a comedian and so helpful here. As previously explained I know how to get the right double quotes etc in between elements but did not know how to get the ones prior to the first element which jefflowery has kindly pointed me in another direction and consequently all is now fine. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 21, 2005 4:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
GYR wrote: |
WOW! everyone is a comedian and so helpful here. |
This is not school.
We are not getting paid to be nice to you, or to train you.
Your original question was very vague, and indicated in no way that you had any training on WBIMB or knew the first thing about message modelling.
It also didn't indicate in any way, and neither did the rest of your posts, that you had done a basic search for other posts that might have discussed this previously. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
superstar |
Posted: Thu Dec 22, 2005 7:14 am Post subject: |
|
|
Apprentice
Joined: 12 May 2004 Posts: 31
|
Dear all,
I think we need to be respectful to others.
Lets share our knowledge not the pride.
And please take others comments in a lighter vein.
This is a great WBI forum .. well actually ... one and only one forum ... the only reason this forum still continues is because of the spirit and knowledge of its members ...
lets maintain the spirit together
Thanks,
SuperStar. |
|
Back to top |
|
 |
|