Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Importing SQL 7.0 tables

Re: Importing SQL 7.0 tables

From: Jared Still <jkstill_at_cybcon.com>
Date: Wed, 27 Feb 2002 21:43:19 -0800
Message-ID: <F001.0041AA32.20020227214319@fatcity.com>

SQL*Loader can generate the sequence values.

Hit the docs to find out, as I don't recall how to do it.

Jared

On Wednesday 27 February 2002 19:58, you wrote:
> Thanks Suhen and Jared,
>
> Suppose SQL table consists of 3 columns,
> and Oracle table consists of 4 columns.
>
> The first oracle column was Primary Key (Mandatory)
> that will get value from sequence.nextval.
>
> How to fill the value for Oracle databases Mandatory columns
> that comes from SEQUENCE VALUE on the
> importing /exporting process?
>
> TIA,
>
> Ferry Situmorang:
>
> ----- Original Message -----
> To: <ORACLE-L_at_fatcity.com>
> Cc: <binsar_at_kalimantan.ptpn13.com>
> Sent: Friday, February 15, 2002 12:01 AM
>
> > If you know the table names already, this Perl script will dump the
> > tables into CSV format for you. From there you can build SQL*Loader
> > scripts to load the data.
> >
> > For anyone wondering why I didn't just suggest using the Oracle utilities
> > for migrating from SQL Server to Oracle, it doesn't always work,
> > especially
> > when the SQL Server database has not been managed properly.
> >
> > Jared
> >
> > ------------
> >
> > use DBI;
> >
> > my $dbh = DBI->connect("dbi:ADO:SERVER NAME HERE","sa",SA PASSWORD
> > HERE');
> >
> > die "could not connect to rsysweb\n" unless $dbh;
> >
> > my @tables = qw{
> > dtproperties EVENTS AdminLevel CATEGORIES CONTACTS ...
> > };
> >
> > foreach my $table ( @tables ) {
> > print "Table: $table\n";
> > my $filename = lc($table) . '.dmp';
> > open(FILE, ">$filename") || die "could not create $filename -
> > $!\n";
> > my $sql = "select * from $table";
> > my $sth = $dbh->prepare($sql);
> > $sth->execute;
> > print FILE join('|', @{$sth->{NAME_uc}}), "\n";
> > while ( my $ary = $sth->fetchrow_arrayref ) {
> > print FILE '<<<' , join('|', @{$ary} ),">>>\n";
> > }
> >
> > close FILE;
> > }
> >
> > $dbh->disconnect;
> >
> >
> >
> >
> >
> >
> > "Ferry Situmorang" <binsar_at_kalimantan.ptpn13.com>
> > Sent by: root_at_fatcity.com
> > 02/13/02 08:58 PM
> > Please respond to ORACLE-L
> >
> >
> > To: Multiple recipients of list ORACLE-L
>
> <ORACLE-L_at_fatcity.com>
>
> > cc:
> > Subject: Importing SQL 7.0 tables
> >
> >
> > I need to import into Oracle my SQL 7.0 tables.
> > How could I complete this?
> >
> > Thanks,
> >
> > Ferry Situmorang:
> > Using Oracle 8.1.7 Designer 6i R4
> > PT Perkebunan Nusantara XIII (Persero)
> > Pontianak-Indonesia
> > http://www.ptpn13.com
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Ferry Situmorang
> > INET: binsar_at_kalimantan.ptpn13.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Feb 27 2002 - 23:43:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US