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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passthrough Query Date Problems

Status
Not open for further replies.

mkallover

Programmer
Feb 6, 2008
88
US
OK, this seems pretty basic to me but I'm having a hell of a time. I'm new to creating passthrough queries and I can't seem to get the date formatted right in the WHERE clause. I'm getting all kinds of errors no matter what I try.

The query is:
Code:
SELECT *
FROM TABLENAME.REQT
WHERE REQT_TMSP > '2006-01-01'

When I look at the table, the REQT_TMSP is a time stamp formatted like:

MM/DD/YYYY 00:00:00 AM/PM

I've tried all kinds of things that I've found with Google but everything I try returns an error.

This seems like it should be so simple but apparently there is something escaping me.
 
returns an error
Which error(s) ?

passthrough queries
Which flavor of SQL ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
They seem to be different depending on what kind of formatting I try but the errors are usually related to the datetime syntax.

"What flavor of SQL?"

I'm not sure. I really only use SQL in Access.
 



The passthru to to WHAT KIND of database? DB2, Oracle, SQL Server...???

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
That is what I'm trying to get help with. I've tried everything I can find on DB2 including the DATE and TIMESTAMP functions and those return errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top