On Thu, Feb 26, 2009 at 3:37 PM, anjela patnaik <anjela_...@yahoo.com> wrote:
> Hello all,
>
> I'm new to sqlite3. I have data in a Oracle table with one column being a 
> date type. Now, I've exported this table into a sql file with insert 
> statements.
>
> Then, I ran the .read command in sqlite3 to read in the sql statements.
> sqlite doesn't support the TO_Date function.
>
> How do I get around this? My sql file is large, i.e > 8000 rows.
>
> Is there maybe a way to define this function internally?
>
> I'm using TOAD to create the sql file from Oracle.
>
> Your inputs appreciated!!
>
> Thanks.
>
> ps my table schema below:
>
> CREATE TABLE NBIAUTO
> (
>   OPERATION  VARCHAR2(50),
>   INTERFACE  VARCHAR2(50),
>   OCRELEASE  VARCHAR2(8),
>   RUNDATE    DATE,
>   PRODUCTS   VARCHAR2(255),
>   SERVER     VARCHAR2(50),
>   REQUEST    VARCHAR2(4000),
>   REQUEST2   VARCHAR2(4000),
>   RESPONSE   CLOB
> )
>

Start here http://www.sqlite.org/datatype3.html to get an
understanding of how SQLite treats data. This will help you design
your SQLite db when migrating from Oracle.

Then read http://www.sqlite.org/lang_datefunc.html which will help you
manipulate date values stored as strings.

You can also decide whether you want to store dates as numbers or
strings based on the above info. Also, try searching the mailing list
archives for a bazillion entries to do with dates.

By the way, if you are only going to deal with 8000 rows or so, that
is not large by any stretch of imagination. You could do just as well
just storing it as a text file, but yes, SQLite too will work very
well.

In any case, do some digging around the sqlite.org website. I am sure
you didn't land in the middle of Oracle without any training or
preparation. Likewise with SQLite, although with it the rewards will
come quicker.


-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to