|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQLDATE select statement to force reading from . . .
. . . a Access DB column.
Is it possible to force a *select* statement in include a db column? Orginal: SQLDATE = "SELECT * FROM Events WHERE # " & DateValue(dateSelect) & "# BETWEEN DateValue([Date]) AND DateValue([endDate]) Order By TimeValue([Date])" RSDATE.Open SQLDATE, Conn, 1, 3 On my own: SQLDATE = "SELECT * FROM Events WHERE Category = 'ballet' " & DateValue(dateSelect) & "'ballet' BETWEEN DateValue([Date]) AND DateValue([endDate]) Order By TimeValue([Date]) " RSDATE.Open SQLDATE, Conn, 1, 3 This produces: Microsoft JET Database Engine (0x80040E14) Syntax error (missing operator) in query expression 'Category = 'dance' 5/1/2003 BETWEEN DateValue([Date]) AND DateValue([endDate])'. /cms/cal/dance.asp, line 187 Line 187 is -> RSDATE.Open SQLDATE, Conn, 1, 3 Thanks! pr |
|
#2
|
||||
|
||||
|
Could you try and explain it a bit more? I'm not sure what you're trying to do.
|
|
#3
|
|||
|
|||
|
Hey Stumpy -
I figured it out! Thanks though for the reply! Set RSDATE = Server.CreateObject("ADODB.Recordset") SQLDATE = "SELECT * " _ & " FROM Events " _ & " WHERE # " & DateValue(dateSelect) & "#" _ & " BETWEEN DateValue([Date]) AND DateValue([endDate])" _ & " AND Category = 'dance' " _ & " ORDER BY TimeValue([Date])" RSDATE.Open SQLDATE, Conn, 1, 3 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > SQLDATE select statement to force reading from . . . |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|