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

Why will this not work?

Status
Not open for further replies.

DarrinT

Programmer
Mar 8, 2005
2
US
I get the following Server MSG
"'datetime' is not a recognized CURSOR option."

When I do this

USE Archive

DECLARE DelDateA datetime
DECLARE DelDateB datetime

SET DelDateA = '3/9/04'
SET DelDateB = '3/15/04'

SELECT O.OrderID
INTO #PF_CRFMLData
FROM PF_Orders O (NOLOCK)
WHERE O.DeliveryDate BETWEEN DelDateA AND DelDateB
 
Ah yes I forgot the @

Should have been like --

DECLARE @DelDateA datetime
DECLARE @DelDateB datetime

SET @DelDateA = '3/9/04'
SET @DelDateB = '3/15/04'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top