Frontpage Query

J

John

Hi,
I am trying to query a database and have it return a list
from one date to another date. I have a SQL query that
works fine except for when I paste it into Frontpage.

I keep getting a syntax error. Here is part of it...
where d.batchstartdatetime>'Date'and
d.batchstartdatetime<'Date + 1' some more stuff....

The error is saying syntax near '>' which I think is the
way I am trying to get the system date. What I want to do
is to grab the system date and use it in the query so I
only get todays stuff.

Thanks for any help!!
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That wordage "near '>'" is MS SQL Server error type verbiage. Are you
reading from an SQL Server db? If so you can use the SQL Server T-SQL
getdate() function in place of the VBA/JET function Date(). To add a
day to the current date use the T-SQL dateadd() function. E.g.:

where d.batchstartdatetime> getdate()and
d.batchstartdatetime < dateadd(day, 1, getdate()) ....

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRBorIechKqOuFEgEQLbqwCfTAiMl7oGk+H0En4vya88r0ddH6wAn1Xq
eUGX+lSW8D+OfNI3ymMvawqN
=ekMI
-----END PGP SIGNATURE-----
 
J

John

Hi,
Thanks for your help! I did try to change things as you
suggested and am still having no luck. I am still getting
the same error.

I am using Frontpage and pasting in a SQL query that has
been used to query a MS SQL server. I think it maybe
having trouble with the greater than sign >

I know that this query works on the MS SQL server. I just
think that the robot in Frontpage needs something else to
read as the greater than sign.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top