Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Oracle Query

Status
Not open for further replies.

btscotland

Technical User
Aug 30, 2007
2
GB
Hi there

I am quite new to working with Oracle and I am having a problem with a query that I am trying to create to deliver through a web page which is very basic indeed.

I have a web form(.asp) that passes through a date to a page that queries the oracle DB.

The query that I am executing is:

SELECT CALL_LIST, WRAP_CODE, ACCOUNT, CUSTOMER_NAME, HANDLE, DIALLED_NUMBER, AGENT_ID, AGENT_DN, MISC, DTM, BUSINESS_AREA FROM LMS.WRAP_CODE where DTM > to_timestamp('12-NOV-10')

This statement works perfectly and returns me what I expect. The problem is that I want to introduce the time element to this as the date in the field is 'dd/mm/yyyy hh:mm:ss' however when I try to do this like this:

SELECT CALL_LIST, WRAP_CODE, ACCOUNT, CUSTOMER_NAME, HANDLE, DIALLED_NUMBER, AGENT_ID, AGENT_DN, MISC, DTM, BUSINESS_AREA FROM LMS.WRAP_CODE where DTM > to_timestamp('12-NOV-10 19:00:00')

I get no results. The field does have both time date and time in it so I am sure it must be something simple.

Any help would be much appreciated.

Brian
 
I have solved this one myself. Not sure how to delete it.
 
So that you will know for next time, BTScotland, the way to delete an entire thread is to go to the original posting (i.e., the top entry of the thread) and click the link that reads Inappropriate post? If so, Red Flag it!, along with a description similar to: "Please delete this thread since I have resolved the problem."

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
Alternatively, you could post how you solved it for the benefit of others who may be searching the forum for the answer to a similar problem in the future.

The internet - allowing those who don't know what they're talking about to have their say.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top