473,486 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Oracle 10 Query by Unix Sysdate

1 New Member
Hi,
i like to do a query that shows me all added lines to a table at the end of the day (used for storing a repository file list).

At 23:59 i like to invoke a cron job script that makes a query.

Inside the table i have a 2 collums, one is NAME1, the other is INSERTED_DATE – this line is a DATE formatted DD-Mmm-YYYY eg.: 16-Sep-2011

I like to convert this to match my Solaris System Date and output the list of NAME1

Something like:

select NAME1 from TABLE1 where trunc(INSERTED_DATE) = (trunc)sysdate;

Does that work, or can I also use a variable I set before I login to the db earlier in my shell script – in that case I can set a date variable in solaris using the same format then the oracle used date. But how to I compare to a unix variable?

Earlier in the script I defined: date="date '+%e-%b-%Y'"

Now, at least in the solaris shell, $date is 16-Sep-2011 – can I use that in the query?
Sep 16 '11 #1
0 1738

Sign in to post your reply or Sign up for a free account.

Similar topics

2
437
by: Asfand Yar Qazi | last post by:
Ahem.. Anyway, here's whats happening... construct tables in MySQL: DROP TABLE EMP; CREATE TABLE EMP (EMPNO INT(4) NOT NULL, ENAME CHAR(6) NOT NULL,
0
1069
by: tristant | last post by:
Hi All, I am the poster of the thread : 'Has anybody succesfully used VB.NET on Oracle on UNIX ? ' Some has teplied that It will be just fine. I forget to mention, we are using Crystal report...
14
1681
by: tristant | last post by:
Hi All, Our client has just decided to migrate from SQLServer2k to Oracle 9i on AIX. We are considering what development tool / language as the application/ front end platform. We almost...
3
4333
by: RLN | last post by:
Re: Access 2003/Oracle 9i I have an Access app that connects to an Oracle DB via OLEDB/VBA code (no DSN or ODBC) Queries against straight Oracle tables run fine. For this query, however,...
1
2757
by: mm27603 | last post by:
I'm trying to do a simple query of an Oracle 10g database within some vbscript code. <% 'Get protocol information to display in dropdown list %> <!--#include file="dbconnect2.inc"--> <%...
11
16278
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
2
6120
by: smitamahadik | last post by:
Hi, I need to connect to oracle from unix , excute a stored procedure and find out the error code if any in unix. Can somebody give detail commands to extract the error code?
2
13481
by: rafficabdullah | last post by:
I need to get input from user and search in the database in shell scrpit I have given the code below how to pass the value of varialbe Count to that query . I have bolded the variable since idont...
0
1416
by: sowmyar123 | last post by:
I am writing a unix kshell script where i need to update some table.. and also after the update i have to echo on the unix screen the no of records updated. how do i do this?
1
1658
by: laxmikumar999 | last post by:
Hi all, I have a data as given below. ID RATE1 DATE1 RATE2 DATE2 CODE 10 A 2007-FEB-01 U 2007-JAN-01 BIG 10 B 2007-FEB-01 V 2007-JAN-01 BIG 10 C 2007-JAN-01 W 2007-FEB-01 SMALL...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.