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
_______________________________________________
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/000701cba6cf$cb1197c0$6134c7...@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.