473,569 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data not importing correctly

Hi all,
First off, I'm new to the Oracle world so please be gentle on me. Now
down to the problem at hand. I support a CAD application that has an Oracle
backend. I've been on site at my clients offices and got a dump of data,
via TOAD, to bring back to my office. This has given me a file containing a
large number of insert statements of the format:

Insert into tgds.trip_bodie s
(ARRIVAL_TIME, ADJUSTED_ARRIVA L_TIME, ADJUSTED_DEPART URE_TIME,
ADJUSTED_RECOVE RY_TIME, MASTER_NODE, CURRENT_NODE, DEPARTURE_TIME, TSN_REF,
NODE_MODE, ARRIVAL_SYMBOL, DEPARTURE_SYMBO L, RECOVERY_TIME, NODE_NAME,
TME_ID, THR_ID)
Values
(10419, NULL, NULL, NULL, 107868,
108381, 10419, 102745, '', ' ',
' ', 0, 'CMPG', 1218, 2550470,
);

My problem is the 9th entry, NODE_MODE which comes across as a square
box between quotes. In the db schema, this is defined as "char(1)" and for
some reason, the data in the clients NODE_MODE column is made up of the
NON-printable values, the ones below 32, from the ASCII table, hence the
box within quotes. If I look at one of these insert statements in a
programmers editor, I get values such as '^C', '^K', all values that give
the square box. I have now loaded this data, using the insert statements,
into Oracle via TOAD. My problem is that the data comes across as a dot ie
a period. If I re-export this data, instead of the '^C' & '^K', I now get
'.'. Is there a way that I can import this data into my instance of Oracle
and get these values to come across correctly?

Any thoughts on this are greatly appreciated.

Andrew Lowe
Jul 19 '05 #1
5 6211
On 03 Oct 2004 16:46:14 GMT, Andrew Lowe <ag*@wht.KILLSP AM.com.au>
wrote:

Andrew

I'm not familar with Toad -- but you would benefit from a quick look
at Oracle's export tool for future reference.
Hi all,
First off, I'm new to the Oracle world so please be gentle on me. Now
down to the problem at hand. I support a CAD application that has an Oracle
backend. I've been on site at my clients offices and got a dump of data,
via TOAD, to bring back to my office. This has given me a file containing a
large number of insert statements of the format:

Insert into tgds.trip_bodie s
(ARRIVAL_TIME, ADJUSTED_ARRIVA L_TIME, ADJUSTED_DEPART URE_TIME,
ADJUSTED_RECOV ERY_TIME, MASTER_NODE, CURRENT_NODE, DEPARTURE_TIME, TSN_REF,
NODE_MODE, ARRIVAL_SYMBOL, DEPARTURE_SYMBO L, RECOVERY_TIME, NODE_NAME,
TME_ID, THR_ID)
Values
(10419, NULL, NULL, NULL, 107868,
108381, 10419, 102745, ' ', ' ', ' ', 0, 'CMPG', 1218, 2550470,
);

My problem is the 9th entry, NODE_MODE which comes across as a square
box between quotes. In the db schema, this is defined as "char(1)" and for
some reason, the data in the clients NODE_MODE column is made up of the
NON-printable values, the ones below 32, from the ASCII table, hence the
box within quotes. If I look at one of these insert statements in a
programmers editor, I get values such as '^C', '^K', all values that give
the square box. I have now loaded this data, using the insert statements,
into Oracle via TOAD. My problem is that the data comes across as a dot ie
a period. If I re-export this data, instead of the '^C' & '^K', I now get
'.'. Is there a way that I can import this data into my instance of Oracle
and get these values to come across correctly?

Any thoughts on this are greatly appreciated.

Andrew Lowe


Mark
http://www.linxcel.co.uk
Jul 19 '05 #2
When you say 'Oracle Back End' .... does the application use Oracle's
Spatial option or Oracle Locator functionality? (Locator is a subset of
Spatial used to store adn retrieve GIS coordinate maps.) Or does it use a
customized method of storing the data. (IOW, what is the data type of the
column that's giving the problem - try givng us a 'DESCRIBE' on the table.)

Versions of Oracle, and version of operating system, would be useful.

Finally, you extracted the data - seemingly using Toad. You apparently did
not use Oracle's export/import tools. Any specific reason?
Jul 19 '05 #3
Hans Forbrich <ne*******@telu s.net> wrote in
news:IcW7d.9495 $N%.815@edtnps8 4:
When you say 'Oracle Back End' .... does the application use Oracle's
Spatial option or Oracle Locator functionality? (Locator is a subset
of Spatial used to store adn retrieve GIS coordinate maps.) Or does
it use a customized method of storing the data. (IOW, what is the
data type of the column that's giving the problem - try givng us a
'DESCRIBE' on the table.)
It's not a GIS app, it actually deals with train timetabling. It just
uses "plain" Oracle. The describe is as follows, the column in question,
NODE_MODE:

Name Null? Type
----------------------------------------- -------- -------------
ARRIVAL_TIME NOT NULL NUMBER(6)
ADJUSTED_ARRIVA L_TIME NUMBER(5)
ADJUSTED_DEPART URE_TIME NUMBER(5)
ADJUSTED_RECOVE RY_TIME NUMBER(5)
MASTER_NODE NOT NULL NUMBER
CURRENT_NODE NUMBER
DEPARTURE_TIME NOT NULL NUMBER(6)
TSN_REF NUMBER
NODE_MODE NOT NULL CHAR(1)
ARRIVAL_SYMBOL NOT NULL CHAR(1)
DEPARTURE_SYMBO L NOT NULL CHAR(1)
RECOVERY_TIME NOT NULL NUMBER(5)
NODE_NAME NOT NULL CHAR(4)
TME_ID NOT NULL NUMBER(8)
THR_ID NOT NULL NUMBER(8)

Versions of Oracle, and version of operating system, would be useful.
Oracle is 9i, Release 9.2.0.1.0 running on Win2000

Finally, you extracted the data - seemingly using Toad. You
apparently did not use Oracle's export/import tools. Any specific
reason?


As I said I'm new to the Oracle world. I hav TOAD on both the clients
machine and my own and it makes life a lot easier for me, eg SQL Plus Vs
TOAD. When I was at my clients office, my concern was that their setup of
Oracle 9i running on Solaris, ie 64 bit on a SPARC CPU, would cause binary
problems when trying to load data into my setup, 9i on Win2000, ie 32bit on
Intel, hence the "text way".

Any help that you can give me would be greatly appreciated.

Andrew Lowe
Jul 19 '05 #4
Andrew Lowe wrote:

As I said I'm new to the Oracle world. I hav TOAD on both the
No worries. There are reasons for using exp and there may be some for
avoiding it. Wanted to verify first.
clients
machine and my own and it makes life a lot easier for me, eg SQL Plus Vs
TOAD. When I was at my clients office, my concern was that their setup of
Oracle 9i running on Solaris, ie 64 bit on a SPARC CPU, would cause binary
problems when trying to load data into my setup, 9i on Win2000, ie 32bit
on Intel, hence the "text way".


Assuming you want ALL the table data, Oracle provides a pair of utilities to
export data from a database and import that same data. There are
preconditions (version, char set), but in general these utilities will help
you ensure you get the data across properly regardless of OS.

You want to run exp for a table using the table owner on the solaris box.
Then imp on windows. (Command line utilities)

Both commands respond to parameter 'help=Y' to provide syntax - should be
enough to help. Both are very flexible and are fully described in the
Utilities manual at http://tahiti.oracle.com

HTH
/Hans
Jul 19 '05 #5
Hans Forbrich <ne*******@telu s.net> wrote in
news:7zb8d.2031 0$223.5959@edtn ps89:
Andrew Lowe wrote:

As I said I'm new to the Oracle world. I hav TOAD on both
the


No worries. There are reasons for using exp and there may be some for
avoiding it. Wanted to verify first.
clients
machine and my own and it makes life a lot easier for me, eg SQL Plus
Vs TOAD. When I was at my clients office, my concern was that their
setup of Oracle 9i running on Solaris, ie 64 bit on a SPARC CPU,
would cause binary problems when trying to load data into my setup,
9i on Win2000, ie 32bit on Intel, hence the "text way".


Assuming you want ALL the table data, Oracle provides a pair of
utilities to export data from a database and import that same data.
There are preconditions (version, char set), but in general these
utilities will help you ensure you get the data across properly
regardless of OS.

You want to run exp for a table using the table owner on the solaris
box. Then imp on windows. (Command line utilities)

Both commands respond to parameter 'help=Y' to provide syntax - should
be enough to help. Both are very flexible and are fully described in
the Utilities manual at http://tahiti.oracle.com

HTH
/Hans


Hans,
Thanks for the reply but the blame as to why this was not working
lays directly at the feet of TOAD. As I said I had to import a series of
rows that contained as one of its columns a column that consisted of the
lower, non displayable, ASCII characters, the characters such as '^C',
the value 3 or ETX and '^K', the value 11 or VT. When I viewed the
columns in question in a text editor, it appeared as a square box inside
quotes, something I've seen before for non-displayable characters, so I
loaded this file as a script into TOAD and executed it. TOAD displayed
the column in question as '.' which I assumed to be its way of displaying
the lower value ASCII characters. IT'S NOT!!!! After loading the data
several times I eventually worked out that TOAD can't handle the lower
value ASCII characters when it reads in scripts to its SQL editor. I have
hunted around and found DBOne from Fox Software which HAS been able to
handle lower ASCII values and has successfully loaded my data.

So after all that, thanks for your time and ideas but it was my $%%
&&^$%$^$$^$%&^% **$%##$% copy of TOAD.

Regards,
Andrew Lowe

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2723
by: steve | last post by:
Hi, I have researched but have not found a good solution to this problem. I am importing large amounts of data (over 50 Meg) into a new mysql db that I set up. I use >mysql dbname < importfile.txt But I keep getting timeouts and errors due to the data being too large. I know that since if I break the imported data into multiple chuncks...
1
4238
by: Matthias HALDIMANN | last post by:
When importing data into MS SQL Server 2000 from a MyODBC (v3.51) data source using Data Transformation Services, special characters like öäüéàè are not imported correctly. However, when the MyODBC data source is used in any other program like Access, Excel etc. it works fine. Does anyone have any experience with this? Any hint to solve this...
0
1748
by: Fabian Kr?ger | last post by:
Hello, I got a weird problem and need your help and ideas... I´ve written an php application which imports data in XML format and writes this data to a MySQL database to have a faster access. The application uses Expat 1.95.7 via php to render the xml data. First everything seemed to work fine. But now I noticed that something
1
7268
by: Nathan Bloom | last post by:
Hi, I have a procedure that transfer data from an Excel spreadsheet to an Access 2000 table. There is a start date and an end date in the range specified. One of the date fields transfers correctly and the other one transfers as a text field containing a number like 37917. In the spreadsheet both date cells are formatted as a date. The...
7
3039
by: Darren | last post by:
I have been attempting to create a reservation planning form in excel that imports Data from an Access database and inserts that information automaticly into the correct spreed sheet and the correct cells within that worksheet. The Excel Book is made up of 12 worksheets named Jan-Dec. Each worksheet has columns labeled as each day of that...
3
1718
by: pemigh | last post by:
A while back I imported tables to a new database via Files-->Get External Data --> Import... All was well for several months, and then the database started behaving badly in a couple of ways, including slow (actually speed was fine when users opened database, then deteriorated after a few minutes of normal use) and errors when trying to...
1
1317
by: seeCoolGuy | last post by:
I've been using Access to import some data straight into a sql server database by simply importing the xml file. However lately some of the newer xml files will contain vaild data such as "m<sup>3</sup>" within the tags so it reads like the following <TblPartDesriptions_to_translate> <intpartid>79</intpartid> <strpartdescription>Part...
12
6195
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the datagrid. Once I can get to that point I need some way to be able to add new data only to the new columns that were added. Here is some of my...
5
475
by: Andrew Lowe | last post by:
Hi all, First off, I'm new to the Oracle world so please be gentle on me. Now down to the problem at hand. I support a CAD application that has an Oracle backend. I've been on site at my clients offices and got a dump of data, via TOAD, to bring back to my office. This has given me a file containing a large number of insert statements of the...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.