473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Urgent help needed! Compare a string to Sysdate in Oracle

I am trying to write a simple SQL statement which will take a string
(startdate) in the format DDMMYYYY and compare it to a date stored in
an Oracle database. My SQL is as follows:

<%

"select * from tblhistory where datechanged = '" & startdate & "'"

%>

The field datechanged in the Oracle database is set up using the
Sysdate variable, on a previous occasion.

Any ideas how I can get my startdate variable into the correct format
so that I can compare it with the 'datechanged' field?

Thanks in advance.
Jul 19 '05 #1
1 7324
look up the to_date function in oracle help.

Here is what we use (replace %%DATE%% with the date string in yyyy-mm-dd
hh24:mi:ss format):

TO_DATE('%%DATE%%','YYYY-MM-DD HH24:MI:SS')

--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
ms*****@ielearning.com
http://www.ielearning.com
714.637.9480 x17
"WroteForLuck" <k_*******@hotmail.com> wrote in message
news:1b**************************@posting.google.c om...
I am trying to write a simple SQL statement which will take a string
(startdate) in the format DDMMYYYY and compare it to a date stored in
an Oracle database. My SQL is as follows:

<%

"select * from tblhistory where datechanged = '" & startdate & "'"

%>

The field datechanged in the Oracle database is set up using the
Sysdate variable, on a previous occasion.

Any ideas how I can get my startdate variable into the correct format
so that I can compare it with the 'datechanged' field?

Thanks in advance.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: choksi | last post by:
Hello All I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Linux and with a fake (internal)ip. Php Configure command './configure' '--with-apxs=/www/bin/apxs'...
10
by: Tony Archer | last post by:
Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a production box. On the dev box everything works fine, in production it hoses: One of...
1
by: Tony Archer | last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior post.) Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a...
0
by: felix_william | last post by:
Attention=3A Dear friend=2C REQUEST FOR BUSINESS RELATIONSHIP OF GREAT PROFITS I am HON=2E =28DR=2E=29 Felix William=2C the Director of Procurement and Contract Award at the Nigerian National...
12
by: Vibhajha | last post by:
Hi friends, My sister is in great problem , she has this exam of C++ and she is stuck up with some questions, if friends like this group provides some help to her, she will be very grateful....
4
by: Random | last post by:
The way I've built my page is to take the user through a multi-form process, only rendering those controls that are needed for each section. The ViewState is working the way I want it to,...
7
by: meenasamy | last post by:
Hi all, i need to create a function that takes three parameters( Original currency, needed currency, amount) i need to convert from the original currency to the needed currency the amount and...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
2
by: Preetam Pattanashetty | last post by:
Hi I am learning ASP.NET using C#. I am able to run .aspx files on local system, but when I load them to the server, I get the "Server Error in '/' Application" error. I have tried to configure the...
0
by: Christopher | last post by:
Urgent Help Needed: The EPVH-1.1 Visual Hull Library. Dear All, I am a student doing research in computer vision. The EPVH-1.1 Visual Hull Library will really help a lot in my research. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.