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

select statement :sybase getdate

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 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...
 
Using 'having' is erroneus in the first place, but Jet-SQL is very permissive. Instead of 'having' use a regular 'where' clause instead.



Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top