convert fields for export to Oracle

russi

Registered User.
Local time
Today, 11:11
Joined
Jul 18, 2000
Messages
385
Hi.
I (a non-Oracle person) have to convert my Access97 database/data to a fixed-length text file for import into Oracle.

Some questions, if I may:

* Access memo fields are limited to 255, but in Oracle they have fields with lengths to 2000. How do I accomodate this?

* What is a 'float' in Oracle? (seems to be a currency field, but uncertain)

* In converting a double number with a mask that puts a leading zero in front, how do I convert them to a text field with the leading zero still stored?

* How to define a number that is supposed to have 14 places, a decimal point, and then 2 places to the point's right?


Russ
 
Number of characters in an Access Memo field 65,535 when entering data through the user interface;

Other than that I'm Bust......Not an Oracle person either:(
 
What version of ORACLE? Not that it makes THAT much of a difference, but there are quirks with each...

Your questions:

* Access memo fields are limited to 255, but in Oracle they have fields with lengths to 2000. How do I accomodate this?

You don't have to do much. It would be worse if you were going the other way. You are putting shorter data into a longer field so there should be no problem other than assuring proper quote marks and such. By the way, Memo fields in Access are limited to a lot more than 255 bytes. It is TEXT fields that stop at 255.

Also: We have ORACLE here for several operating systems. I don't think you need to pad out quoted strings. Variable-length but delimited strings will work correctly. You might need to check with your ORACLE administrator about this. Because Larry Ellison is no nicer than Bill Gates in keeping his product clean and pretty. So you COULD have a version of ORACLE that happens to be pickier than most. But the last time we did a text import from something else to ORACLE, a comma-delimited record worked fine, particularly with quotes around text fields that had otherwise been trimmed. Wasn't an Access source and was probably ORACLE 6 when we did that migration, but it worked fine even then.

* What is a 'float' in Oracle? (seems to be a currency field, but uncertain)

Probably an Access Double. There is an ANSI data type that is called 'FLOAT' so I guess ORACLE might use that name. In the AC2K help, it says that ANSI type FLOAT is equivalent to either DOUBLE or FLOAT8, depending on your favorite language flavor. ORACLE traditionally calls this a NUMBER field, though.

* In converting a double number with a mask that puts a leading zero in front, how do I convert them to a text field with the leading zero still stored?

You are changing data types if you do that. Is that what you really wanted? A double isn't stored with leading zeros. Nor is an ORACLE float or number field. Use the ORACLE equivalent of an Access Format function to output that format if you like. But for import, if someone says you need a leading zero - other than perhaps as the only digit to the left of a decimal point for a fractional number that has no integer part - I would question that person's sanity. ORACLE should not need the leading zero.

* How to define a number that is supposed to have 14 places, a decimal point, and then 2 places to the point's right?

Store it as a number (or FLOAT) but print it using the ORACLE equivalent to a Format function. Or were you talking about for output purposes? In the latter case,

Format( number, "##############.##")

(If I counted the pound-signs correctly.)

Good luck! ORACLE is powerful but has its little quirks, too.
 
A FLOAT in ORACLE used to be (it's no longer supported by ORACLE since over two years) is a NUMBER datatype including decimals:

NUMBER(n,m) where m = no. of decimals.

There's NO relation between Access Double datatype and ORACLE Float Datatype (as The_Doc_Man suggested).

Use the ORACLE Round function in combination with "Float" datatypes in order to store your data 1:1 in an ORACLE database or import your data as strings (for example "100.25").

When you want to transfer data stored in Access memofields realize that ORACLE doesn't know the Datatype Memo.

The fields with length 2000 in ORACLE you're talking 'bout is a datatype called VARCHAR (let's call it the Access datatype Text).
The maximum length of VARCHAR is 2000. So if your memofields in ORACLE contain data over 2000 positions, the data is truncated. There's no way to deal with truncation....

Allthough datatypes can look alike in Access and ORACLE, there can be huge differences (as Microsoft has created a whole new standard of SQL= messed around a bit...).

RV
 
Thanks.

I think I'm going to need some luck as much as anything.

Russ
 
Thanks for the update, RV. Damn if my ORACLE books aren't out of date AGAIN. Larry Ellison is second only to Bill Gates in that particularly nasty habit...
 
The_Doc_Man,

at least Larry Ellison didn't event the famous blue screen... (allthough he might hadn't he be beaten by Billyboy...)....

RV
 

Users who are viewing this thread

Back
Top Bottom