[Openroad-users] Importing data - Copy statement

Karl & Betty Schendel schendel at kbcomputer.com
Fri Nov 3 00:49:08 EST 2006


At 10:55 AM +0000 11/2/06, <gareth.2.edwards at bt.com> wrote:
>OR4.1, Win2000
>
>Hi All,
>
>Having not done much with the copy statement previously, I'm a litle lost.
>
>I have to import some data, the two formats available are:
>
>1) Comma seperated, but every data value is in "quotes"
>2) Tab delimited, money values greater than 999 are in "quotes" and also contain a comma to break the thousand/hundred value
>
>Are there any ways to deal with these imports? In particular the quoted values??

There's no nice way to do it with copy.  The copy statement doesn't
really understand quoted values.  If you were running on a real OS
I would have suggested going with the tabbed form, and using
something like sed to strip out the quotes and commas.
Unless you have an equivalent tool for windows available (e.g. sed
in cygwin32), I'd say that your idea of reading the moneys into
varchars and working with them there is probably best.

Karl


More information about the Openroad-users mailing list