Re: [sqlite] Transferring the oracle databse to sqlite database

2007-03-28 Thread Liam Healy

I made the same transition last year.  Below is a sample script that I used
successfully
to have Oracle generate a file of SQL statements which can be read in to
sqlite with
.read.  Obviously, this needs to be tailored to each table dumped.
If this script is called oracle-dump.sql, then run
sqlplus user/pass @oracle-dump.sql
and you will have a new file fromoracle.sql which can be imported into
sqlite.

-- create a CSV report
   -- Use this to suppress page headers, titles and all formatting
set pagesize 0
   -- Don't list the SQL text before/after any variable substitution
set verify off
-- Set line size, make this as big as you like because the next line
set lines 700
 -- deletes any blank spaces at the end of each spooled line
set trimspool on
 -- Don't display number of lines returned by the query
set feedback off
 -- Don't display any SELECT output to your screen
set termout off
   -- Separate each column by a comma character (CSV output)
   -- this is not useful, because it produces a comma at the beginning and
end
--set colsep ','
-- column emp_date format A8
   -- Make sure the date field is the width you want it
   -- to be otherwise  Oracle will make this column very
   -- wide when output
column satnum format 9
column intldesig format a8
column epochj2000 format 999.999
column mmd format  0.
column mmdd format 0.
column bstar format 999.
column elementno format 9
column inclination format 990.
column raan format 990.
column eccentricity format 0.
column arg_perigee format 990.
column mean_anomaly format 990.
column mean_motion format 90.
column rev_epoch format 99

-- Put the SELECT output into a file
spool fromoracle.sql
select 'insert into nscels values
(',satnum,',''',intldesig,''',''',to_char(catdate,'-MM-DD
hh24:mi:ss'),''',''',
   to_char(epoch,'-MM-DD hh24:mi:ss'),''',', epochj2000,',',
   mmd,',', mmdd,',', bstar,',', elementno,',',
   inclination,',', raan,',', eccentricity,',', arg_perigee,',',
   mean_anomaly,',', mean_motion,',', rev_epoch, ');'
   from nscels
   where catdate between '2005-01-01 00:00:00' and '2005-12-31 23:59:59';
spool off
exit

Best of luck.
Liam



On 3/28/07, Amarjeet Kumar (RBIN/ECM4) <[EMAIL PROTECTED]> wrote:


Hi,

I wanted to use the sqlite database. Currently I am using the oracle
database.

Is there any way to import the oracle database to sqlite database?
If so plz. tell me.

Thanks in advance.

With warm regards,
Amar






Re: [sqlite] Transferring the oracle databse to sqlite database

2007-03-28 Thread anis chaaba

a way to export your database is to generate the sql script database to a
file, and from sqlite type '.read path_to_file/file'
if it doesn't work try to change the sql script exported so it can be
understanded by sqlite for example delete stored procedure and change
triggers if any way you have triggers or stored procedures.

2007/3/28, Amarjeet Kumar (RBIN/ECM4) <[EMAIL PROTECTED]>:


Hi,

I wanted to use the sqlite database. Currently I am using the oracle
database.

Is there any way to import the oracle database to sqlite database?
If so plz. tell me.

Thanks in advance.

With warm regards,
Amar






[sqlite] Transferring the oracle databse to sqlite database

2007-03-28 Thread Amarjeet Kumar (RBIN/ECM4)
Hi,

I wanted to use the sqlite database. Currently I am using the oracle
database.

Is there any way to import the oracle database to sqlite database?
If so plz. tell me.

Thanks in advance.

With warm regards,
Amar