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

MS SQL Funtion Resources

Status
Not open for further replies.

bholm

Programmer
Aug 28, 2001
17
0
0
US
I'm in need of an online reference to MS SQL Server supported functions I can use in my Cold Fusion queries to an Access 97 db.

I can't get a simple select like the following to be accepted!

SELECT date1, event, locname, city, state
FROM rof_events
WHERE date1 > 2001-04-01

Is lists all entries in the table.
Help! Thanks!
 
Try this:

SELECT date1, event, locname, city, state
FROM rof_events
WHERE date1 > '2001-04-01'

 
I did try that. The server complains of a type conflict. I think it thinks it is a string data type instead of a date type.

This is such a basic question but I can't figure out how they expect you to specify the date and get it to accept it.
 
I just now figured it out... you have to put # symbols around the date....so its
WHERE date1 > #04/01/2001#

Then in Cold Fusion I have to escape those with additional # symbols so it becomes

WHERE date1 > ##04/01/2001##

I'd still like an online reference to the Date type functions that MS supports. Like what if I want just the year in a date? What if I want just the month of a date?
Your help would be appreciated!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top