dbTalk Databases Forums  

Export to CSV

comp.databases.pick comp.databases.pick


Discuss Export to CSV in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JazzyJ187
 
Posts: n/a

Default Export to CSV - 06-16-2005 , 11:27 AM






Hello,

I've just started using MVBASE yesterday, I've been given the great job
of
trying to export the data to a csv/tsv file.
I've tried using
http://www.picksource.com/modules.ph...p=getit&lid=22
csv.txt which seems to work, the problem I have is that one of the
fields
'ADDRESS' contains a return at the end of each line. If I type
'LIST-ITEM
CUSTOMERS' it's displayed as "002 LINE1]LINE2]LINE3"
and when exported to a csv file using csv.txt above, this messes up the

formatting.

Any so the question is! Does anyone know how I can do this? either by
suppressing the RETURN for this field while exporting
or
I've thought about capturing the console screen to a file and using the

command 'SELECT CUSTOMERS NAME ADDRESS ETC'
but it displays as
NAME ADDRESS
BOB LINE1
LINE2
LINE3

is there anyway I can use the select command to reformat this to
display
like

NAME ADDRESS1 ADDRESS2 ADDRESS3
BOB LINE1 LINE2 LINE3

?

Sorry sound to sound like a dumbass but I've never used the program
before
and hopefully once this data is exported I won't have to again..
Thanks in advance for any help.

regards
Paul Mckenna


Reply With Quote
  #2  
Old   
rog
 
Posts: n/a

Default Re: Export to CSV - 06-16-2005 , 12:30 PM






Welcome to the wonderful world of Multi values. Both as a
group. And how your data is stored. Sounds like the
address 'field' is multivalued, each unique part of the
field is separated by ascii character 253. Which usually
gets translated to a return when displayed on the screen.

The List-item command/verb displays the information
internally. Showing the whole record, with all of the the
various field separators, such as value marks and sub-value
marks.

A semi-experienced MV person can set up a dictionary item
that will extract each 'value' individually. You might even
find out that someone has already setup address1/address2 or
add1/add2 etc.

Instead of LIST-ITEM Try
LIST CUSTOMERS NAME ADDRESS1 ADDRESS2 or
LIST CUSTOMERS NAME ADDR1 ADDR2

---
Is this going to be a one time conversion, to move to
another database? Or will you be extracting information on
a regular basis. In either case, you will want to bring in
an experience MV person to set up the procedures for you.

good luck
rog
JazzyJ187 wrote:
Quote:
Hello,

I've just started using MVBASE yesterday, I've been given the great job
of trying to export the data to a csv/tsv file.
I've tried using
http://www.picksource.com/modules.ph...p=getit&lid=22
csv.txt which seems to work, the problem I have is that one of the
fields 'ADDRESS' contains a return at the end of each line. If I type
'LIST-ITEM CUSTOMERS' it's displayed as "002 LINE1]LINE2]LINE3"
and when exported to a csv file using csv.txt above, this messes up the
formatting.

Any so the question is! Does anyone know how I can do this? either by
suppressing the RETURN for this field while exporting
or I've thought about capturing the console screen to a file and using the

command 'SELECT CUSTOMERS NAME ADDRESS ETC'
but it displays as
NAME ADDRESS
BOB LINE1
LINE2
LINE3

is there anyway I can use the select command to reformat this to
display
like

NAME ADDRESS1 ADDRESS2 ADDRESS3
BOB LINE1 LINE2 LINE3

?

Sorry sound to sound like a dumbass but I've never used the program
before and hopefully once this data is exported I won't have to again..
Thanks in advance for any help.
regards
Paul Mckenna


Reply With Quote
  #3  
Old   
JazzyJ187
 
Posts: n/a

Default Re: Export to CSV - 06-16-2005 , 12:57 PM



Hi,

Thanks for your quick reply.

This is going to be a one time thing, unforunatley there are no
dictionary items already configured for 'CUSTOMERS' i had to create
these myself (just from trial and error, No idea what '009 L' and '010
30' relate to but it seemed to make it display correctly )

Anyway if you say there is a way to split it with a dictionary item
then i will start reading the manual on that and quit reading about
INFO/ACCESS

Luckily i'm working on a backup copy at the mo, i've already killed
MVbase once trying out commands.

Thanks a lot for your help.


Reply With Quote
  #4  
Old   
rog
 
Posts: n/a

Default Re: Export to CSV - 06-16-2005 , 01:27 PM



JazzyJ187 wrote:
Quote:
Hi,

Thanks for your quick reply.

This is going to be a one time thing, unforunatley there are no
dictionary items already configured for 'CUSTOMERS' i had to create
these myself (just from trial and error, No idea what '009 L' and '010
30' relate to but it seemed to make it display correctly )

Anyway if you say there is a way to split it with a dictionary item
then i will start reading the manual on that and quit reading about
INFO/ACCESS

Luckily i'm working on a backup copy at the mo, i've already killed
MVbase once trying out commands.

Thanks a lot for your help.

If you want, you can email me directly.

009 L says left output instead of right output (numeric
amounts). Third choice is T, which will break on the length
as specified in 010.

010 fields/attributes longer then this number will wrap to
the next line when displaying/reporting. If you use 'T'
then it will break at a space.

007 MD2 converts number to 2 decimals. MD3 etc.
007 D2/ converts internal date into human readable format.
Of MM/DD/YY or maybe DD/MM/YY if your machine supports the
European format. Or try DE2/. That might get you
European as instead of the American default.
Day 1 is January 1, 1968. Today is 13682.


LISTDICT CUSTOMER doesnt show the various dictionaries?

Following will work if file is named CUSTOMER and addresses
are in the second attribute/field.

COPY DICT CUSTOMER ADDRESS
it will prompt TO: you enter ADDR1

EDIT DICT CUSTOMER ADDR1
change the second line to 0 as in zero.
change eight to TCUSTOMER;X1;2;2

Do the same for ADDR2 except do
change eight to TCUSTOMER;X2;2;2

ADDR3
change eight to TCUSTOMER;X3;2;2

Yes, the number following the X says which value to use. If
there is nothing there, it will return blank.

Good luck
rog


Reply With Quote
  #5  
Old   
JazzyJ187
 
Posts: n/a

Default Re: Export to CSV - 06-16-2005 , 01:51 PM



You the man...

Thanks you, that works


Reply With Quote
  #6  
Old   
douglas@pickteam.com
 
Posts: n/a

Default Re: Export to CSV - 06-16-2005 , 03:38 PM



Rog,

I applaud your patience and gentle handling of Mr Jazzy.

Your advice was perfectly concise.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.