[Openroad-users] Importing data - Copy statement

White, Paul Paul.White at iasbet.com
Mon Nov 6 12:42:44 EST 2006


Import using Excel or Access. 
Then export without quotes.

Beware of long integers turning into floating point and losing precision eg
123456789123456 turns into 123456789000000



-----Original Message-----
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com]On Behalf Of Kim Ginnerup
Sent: Saturday, November 04, 2006 9:06 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] Importing data - Copy statement


Try and take a look at Gnu utils for win32,
It adds a lot of unix facilities to you windows env.
Compiled native so you can use from a normal command prompt

Kim

-----Oprindelig meddelelse-----
Fra: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] På vegne af
gareth.2.edwards at bt.com
Sendt: 2. november 2006 16:03
Til: openroad-users at peerlessit.com
Emne: Re: [Openroad-users] Importing data - Copy statement

I feared as much, thanks for the response Karl. 

As a complete stab in the dark, is there such a thing as VIM scripts?,
that I could possibly execute one of those against the file, to do the
substitutions?


Cheers,
Gareth Edwards

BT Global Services 
tel: +44 (0)131 345 4671 
email: gareth.2.edwards at bt.com

-----Original Message-----
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Karl & Betty
Schendel
Sent: Thursday, November 02, 2006 1:49 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] Importing data - Copy statement

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
_______________________________________________
Openroad-users mailing list
Openroad-users at peerlessit.com
http://peerlessit.com/mailman/listinfo/openroad-users



_______________________________________________
Openroad-users mailing list
Openroad-users at peerlessit.com
http://peerlessit.com/mailman/listinfo/openroad-users

_______________________________________________
Openroad-users mailing list
Openroad-users at peerlessit.com
http://peerlessit.com/mailman/listinfo/openroad-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://peerlessit.com/pipermail/openroad-users/attachments/20061106/b89efd42/attachment.html 


More information about the Openroad-users mailing list