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

Home -> Community -> Usenet -> c.d.o.server -> Re: Unable to fetch Timpstamp datatype using OCI layer

Re: Unable to fetch Timpstamp datatype using OCI layer

From: Rohit <coolrohitjain_at_gmail.com>
Date: Fri, 10 Aug 2007 08:29:28 -0000
Message-ID: <1186734568.276618.167390@e16g2000pri.googlegroups.com>


On Aug 9, 1:22 pm, Frank van Bortel <frank.van.bor..._at_gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rohit wrote:
> > Thanks Frank for your input.
> > I had empty table initially and I inserted timestamp data manually;
> > also I am using different tables for timestamp(6) and timstamp(9). So
> > I think there is no mix and match.
> > More interestingly, I don't understand why for same data(one is
> > inserted using SQL-PLUS and another is inserted using my program) my
> > program behaves differently, means in one case it doesn't fetch data
> > and in another case it does!!
>
> Well, for one, try it with:
> char *sql_statement="select t1 from tstamp where t1>=:1";
>
> Timestamp formats default (to 3 decimals), unless overridden
> by local settings.
>
> Also, local settings dictate how your data will be converted:
> "where t1>=:1" *will* do a conversion - always do your
> own conversions! Use the to_timestamp function:http://download-east.oracle.com/docs/cd/B14117_01/server.101/b10759/f...
> - --
> Regards,
> Frank van Bortel
>
> Top-posting is one way to shut me up...
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (MingW32)
>
> iD8DBQFGus7RLw8L4IAs830RAsdWAJwNuplIWKxm/CbW0v6oUzkGNfvhGwCeLIAO
> ku5WhO1+MtuADjca6sE3RQQ=
> =0f/X
> -----END PGP SIGNATURE-----
I tried both of your suggestions, but I didnt get results. Earlier I was using
insert into tstamp9 values(timestamp '2007-08-08 10:00:00.000000000'); later on I tried with to_timestamp, but I was having same results. I also tried t1>=:1. But in this case I was not able to fetch data.

Regards,
Rohit Jain. Received on Fri Aug 10 2007 - 03:29:28 CDT

Original text of this message

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