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: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Thu, 09 Aug 2007 10:22:41 +0200
Message-ID: <f9eisg$bin$1@news2.zwoll1.ov.home.nl>


-----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/functions178.htm - --
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----- Received on Thu Aug 09 2007 - 03:22:41 CDT

Original text of this message

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