Sponsored Content
Full Discussion: Oracle DataBase DateFormat
Top Forums Shell Programming and Scripting Oracle DataBase DateFormat Post 302605657 by PhAnT0M on Thursday 8th of March 2012 05:43:25 AM
Old 03-08-2012
Oracle DataBase DateFormat

I am currently writing a script in AIX
I connected to the database using SQL *PLUS
I need to retrive data of Number of rows inserted today in the table(TABLE_NAME) which has column DATETIME(DDMMYYYY)

I tried using

Code:
select TO_CHAR(sysdate, 'DDMMYYYY') CHRDATE from dual
select count (*) from TABLE_NAME
where trunc(DATETIME) = trunc(CHRDATE);


HTML Code:
sysdate is in format MM/DD/YYYY
Thanks in advance
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connecting to oracle database

Hai i want to connect to oracle database from user input and create a view. ${ECHO} "Debut Creating View" ${ECHO} "Please Enter the User Name:" read user_name ${ECHO} "Please Enter the Connection String:" read con_string ${ECHO} "Please Enter the Password:" read pwd... (3 Replies)
Discussion started by: shenthil76
3 Replies

2. Programming

Oracle Database Query

How can i modify the below to search for the things i'm looking for during a certain time frame? select Node, NodeAlias, Summary, Tally, AlertKey, AlertGroup, Manager, Agent from mrtg_alerts where LastOccurrence > '5-Dec-2010' order by Manager desc; In this particular case, this query is... (3 Replies)
Discussion started by: SkySmart
3 Replies

3. Solaris

Can't create database after Oracle Database installation

I installed Oracle 10 software on Solaris 11 Express, everything was fine execpt I can't create database using dbca.rsp file. I populated file with following options. OPERATION_TYPE = "createDatabase" GDBNAME = "solaris_user.domain.com" SID = "solaris_user" TEMPLATENAME = "General... (0 Replies)
Discussion started by: solaris_user
0 Replies

4. UNIX and Linux Applications

Moving Oracle database

how does one move Oracle database to new OS? Does Oracle need to be the same version as old one? (6 Replies)
Discussion started by: orange47
6 Replies

5. UNIX and Linux Applications

Oracle database recovery

Is there a way to recover Oracle database in x86 server from broken sparc server (Solaris10)? (9 Replies)
Discussion started by: orange47
9 Replies

6. UNIX and Linux Applications

Identify a specific environment Oracle variable to connect a remote Oracle database ?

Good evening I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus. I tried to find out the user/passwd and service name by env variable and all Ive got is this: ORACLE_SID_REPCOL=SCL_REPCOL ORACLE_SID=xmeta ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
trunc(3M)						  Mathematical Library Functions						 trunc(3M)

NAME
trunc, truncf, truncl - round to truncated integer value SYNOPSIS
cc [ flag... ] file... -lm [ library... ] #include <math.h> double trunc(double x); float truncf(float x); long double truncl(long double x); DESCRIPTION
These functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument. RETURN VALUES
Upon successful completion, these functions return the truncated integer value. If x is NaN, a NaN is returned. If x is +-0 or +-Inf, x is returned. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
math.h(3HEAD), attributes(5), standards(5) SunOS 5.10 1 Sep 2002 trunc(3M)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy