Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query does not show date value

Status
Not open for further replies.

evergreean43

Technical User
May 25, 2006
165
US
I inserted info into my Oracle 8i database.

I can query and see the records except the date field doesnt show any data.

Here is my insert:
Code:
insert into myTable (id, name, date) values (1,'Joe',To_Date('7/11/2002','DD/MM/YYYY');

commit;

When I query I see:
Code:
ID      Name      Date
1       Joe

Please advise.
 
Perhaps it is related to your use of a reserved word as a column name? Try renaming the column and inserting a new row.
 
Evergreean,

I cannot even see how you were able to CREATE the table:
Code:
create table mytable (id number,name varchar2(10),date date);
                                                  *
ERROR at line 1:
ORA-00904: : invalid identifier
Can you please post the code that created a table with a column named "DATE"?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Sorry the date field was just an example field name.
My mistake for using that as an example:

Code:
insert into myTable (id, name, thedate) values (1,'Joe',To_Date('7/11/2002','DD/MM/YYYY');

Please advise.

 
So far, everything you're doing looks OK. Could you please do a describe on the table and post the results so we are making fewer assumptions about the table structure?
 
So, Evergreean, what was the result of the INSERT? How many rows are in the table? If there are not too many rows, then do a "SELECT * ..." or a "SELECT id, name, thedate..." to see what value(s) appear.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
I inserted just two records.

The results show up when I query it using Web Browser (with JSP front end). It must be a SQL Developer issue?

The SQL Developer does say it works in 9 and above so the 8i is the issue?
 
Evergreean,

Can you please connect to SQL*Plus as the owner of the table in question then post here the results of:
Code:
SELECT id, name, thedate
  FROM <table name>;

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Sorry, now I am not at the work location and wont be back for 10 days. I will try it when I get back.

I appreciate your input!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top