Re: timezone warnings in 10g



Oxnard wrote:
I am not understanding why I am getting the warning message. I have tried changing the data type in jtime from 'timestamp with time zone' to timestamp. Also I have tried using the current_timestamp and localtimestamp. What am I missing here??

Thanks


SQL> @timezone
SQL> set serveroutput on
SQL> set echo on
SQL> set feedback on
SQL>
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

5 rows selected.

SQL>
SQL> alter session set PLSQL_WARNINGS = 'enable:all';

Session altered.

SQL>
SQL> drop table jtime;

Table dropped.

SQL>
SQL> create table jtime(jtime timestamp with time zone);

Table created.

SQL>
SQL> create or replace procedure jtimePro as
2 begin
3 insert into jtime values(systimestamp);
4 end jtimePro;
5 /

SP2-0804: Procedure created with compilation warnings

SQL>
SQL> show errors
Errors for PROCEDURE JTIMEPRO:

LINE/COL ERROR
-------- -----------------------------------------------------------------
3/28 PLW-07202: bind type would result in conversion away from column
type

SQL>
SQL>
SQL>

Given that you knew to use DBMS_WARNING what's the issue? There is some
poor code in JTIMEPRO where data types don't match variable definitions.
What is the data type of the single column in jtime? Fix it!

BTW: Insert statements without column naming are a really bad practice.
--
Daniel A. Morgan
University of Washington
damorgan@xxxxxxxxxxxxxxxx
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
.



Relevant Pages

  • Re: Cannot edit data in a Query
    ... I would check the SQL Database table and make sure it has a primary key AND that it has a timestamp field. ... TimeStamp is a data type that exposes automatically generated, unique binary numbers within a database. ...
    (microsoft.public.access.queries)
  • timezone warnings in 10g
    ... changing the data type in jtime from 'timestamp with time zone' to ... SQL> set serveroutput on ... PL/SQL Release 10.2.0.1.0 - Production ... SQL> drop table jtime; ...
    (comp.databases.oracle.server)
  • Re: Update Integrity
    ... check out BOL for timestamp ... timestamp is a data type that exposes automatically generated binary ... all updates to the data row also generate updates of the index. ... Database change management for SQL Server ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Express - Identity specification property - how to change
    ... FOO_ID int identity, ... Tony Rogerson, SQL Server MVP ... They are making unfortunately frequent use of the IDENTITY column in conjunction with Primary Key. ... IDENTITY has none of the properties of a data type because it is not a data type at all. ...
    (comp.databases.ms-sqlserver)
  • Re: Type Mismatch Error Message
    ... >> Using Text as SQL data type. ... I created a database on a SQL server manually and matched the column names ... I thought you "didn't use the database wizard?" ... >> Data type in form is No Constraints. ...
    (microsoft.public.frontpage.programming)