Correct, TTOD()is not available in SQLServer.

ls

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Tracy Pearson
Sent: Tuesday, December 28, 2010 12:43 PM
To: [email protected]
Subject: RE: select on ms sql 2005 data on web server

James E Harvey wrote on 2010-12-28: 
> I can connect and pull all the records using:
> 
> SQLEXEC(m.lih,"SELECT * FROM hsf_webct")
> 
> 
> But when I try the where clause it fails:
> 
> SQLEXEC(m.lih,"SELECT * FROM hsf_webct where TTOD(DTE_OWN)  =
> {^2010/12/28}")
> 
> 
> 
> dte_own is a datetime MS SQL2005 datatype
> 
> 
> 

James,

I don't specifically now if TTOD() is just a VFP thing, or if it would work
in SQLServer.
You might need to use the between clause.

dFrom = {^2010/12/28 0:00:00}
dTo   = {^2010/12/29 0:00:00}
sqlexec(m.lih,"select * from hsf_webct where dte_own between ?dFrom and
?dTo")

bit rusty with sql pass thru right now, but it looks right to me

Tracy Pearson
PowerChurch Software




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/02c401cba6d2$2adfbcc0$809f36...@com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to