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

MS Query (excel) select statment (time stamps) sybase

Status
Not open for further replies.

joeb007

MIS
Apr 5, 2012
4
US
Hello all :)

Sorry if this is applied to the wrong forum.

I have a database "sybase" the stores data through out the day by time stamp "2012-04-04 02:44:59.000"


What im trying to run a select statment pulling my data and summing it for all of the time stamps that occured today in my data base for today only

was trying to use:

This works on OK in MS ACCESS
Select
""
""
having system_info.date_time)>=Date()+1 And (system_info.date_time)<Date()+2)


but when trying to apply that same statment with the having part in MS query "excel" it errors out.

Was also tried this but no luck
(system_info.date_time = DATEADD(dd,1,GETDATE()) and GETDATE())


So looking for the correct syntax to query my table data and summing it for all the today in MS query "excel"

Thanks SO MUCH...
 


hi,

Well what is the time stamp field name?

As far as system date, you need Sybase Key Words/syntax, so you might want to Google to find. I'd GUESS, SYSDATE, in which case...
Code:
Select *
From [YourTable]
Where TRUNC([YourTimeStamp]) = TRUNC(SYSDATE)


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top