由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - A wield thing in Oracle DB
相关主题
I'm waiting for your oracledummy question
Oracle 求助how to list all tables in my account?
Help!--How to transfer string to Date(mm-dd-yyyy hh24:mi:ss) in Access?object-oriented database设计咋样?
ORACLE error code 04031database triggers
Which design is better?embedded sql 问题
SQL SERVER 面试题, find the objectsA question of filling in missing value in SQL
temp table problem问个关于openquery的问题
求帮忙recover deleted rows in oracle猪一样的队友
相关话题的讨论汇总
话题: user话题: date话题: where话题: objects话题: select
进入Database版参与讨论
1 (共1页)
g*******l
发帖数: 6
1
I tried to do such a query against USER_OBJECTS :
SELECT * FROM USER_OBJECTS WHERE CREATED='10/15/2002';
It shows no row selected, but I know there is an object in the view.
If I change the query to :
SELECT * FROM USER_OBJECTS WHERE OBJECT_NAME='thename';
It will show:
OBJECT_NAME: thename
CREATED: 10/15/2002
And if I retrieve data from a user-defined table also based on the date, it is
fine. For example:
SELECT * FROM my_table WHERE enroll_date='10/15/2002';
the type of ENROLL_DATE is DATE too
s****d
发帖数: 13
2
when i do date related staff, i prefer
where to_char(enroll_date,'mm-dd-yyyy')='10-15-2002'
so u dont need to consider the format difference.

is

【在 g*******l 的大作中提到】
: I tried to do such a query against USER_OBJECTS :
: SELECT * FROM USER_OBJECTS WHERE CREATED='10/15/2002';
: It shows no row selected, but I know there is an object in the view.
: If I change the query to :
: SELECT * FROM USER_OBJECTS WHERE OBJECT_NAME='thename';
: It will show:
: OBJECT_NAME: thename
: CREATED: 10/15/2002
: And if I retrieve data from a user-defined table also based on the date, it is
: fine. For example:

a****c
发帖数: 25
3
Actually the default date format in Oracle is 'DD-MON-YY', such as
'17-OCT-02'. You can use it without any format strings. I guess the CREATED
field in USER_OBJECTS is something like 'DD-MON-YYYY HH24:MI:SS' , so you
wound get any hit by simply providing the date for your query. You might try
WHERE created > '15-OCT-2002'. See what would happen then. :)

it

【在 s****d 的大作中提到】
: when i do date related staff, i prefer
: where to_char(enroll_date,'mm-dd-yyyy')='10-15-2002'
: so u dont need to consider the format difference.
:
: is

1 (共1页)
进入Database版参与讨论
相关主题
猪一样的队友Which design is better?
请问出这个题并给这样answer key的人是什么样的水准?SQL SERVER 面试题, find the objects
数据库入门知识之5(数据库软件开发)temp table problem
who's using object oriented database?求帮忙recover deleted rows in oracle
I'm waiting for your oracledummy question
Oracle 求助how to list all tables in my account?
Help!--How to transfer string to Date(mm-dd-yyyy hh24:mi:ss) in Access?object-oriented database设计咋样?
ORACLE error code 04031database triggers
相关话题的讨论汇总
话题: user话题: date话题: where话题: objects话题: select