dbTalk Databases Forums  

need some help with oracle 9i (i'm a beginner..)

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss need some help with oracle 9i (i'm a beginner..) in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jdk
 
Posts: n/a

Default need some help with oracle 9i (i'm a beginner..) - 07-09-2003 , 07:18 AM






i'm using oracle 9i
i need to use dates in my database, but i encountered some problems (the
language has bit differences with standard sql..).
so, when i create a table, for example:
create table TEST (
Name VARCHAR(15) NOT NULL,
Day DATE )


...and then i try to insert something in, i'm not able..

INSERT INTO TEST VALUES ('some_name', '??????')

...i've tried with a lot of combinations to enter some date, but it doesn't
accept.. i've searched for some information, but hadn't found out..

Some one could help me or tell me some url where to find some answer?



Reply With Quote
  #2  
Old   
Jim Kennedy
 
Posts: n/a

Default Re: need some help with oracle 9i (i'm a beginner..) - 07-09-2003 , 09:05 AM






explicitly name the columns and do an explicit date conversion from a
string. eg:
INSERT INTO TEST(name,day) VALUES ('some_name',
to_date('12/15/1900','mm/dd/yyyy')

You can look up the format masks in the documentation in the SQL reference
manual.
Jim


--
Replace part of the email address: kennedy-down_with_spammers (AT) attbi (DOT) com
with family. Remove the negative part, keep the minus sign. You can figure
it out.
"jdk" <dsa (AT) adfs (DOT) it> wrote

Quote:
i'm using oracle 9i
i need to use dates in my database, but i encountered some problems (the
language has bit differences with standard sql..).
so, when i create a table, for example:
create table TEST (
Name VARCHAR(15) NOT NULL,
Day DATE )


..and then i try to insert something in, i'm not able..

INSERT INTO TEST VALUES ('some_name', '??????')

..i've tried with a lot of combinations to enter some date, but it doesn't
accept.. i've searched for some information, but hadn't found out..

Some one could help me or tell me some url where to find some answer?





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.