Monday, February 20, 2012

Passing SMALLDATETIME into a Stored Proc

Hello people,

I am haivng an issue passing a smalldatetime into a stored proc.

The issue is on MSSQL to be valid, you have to enter it as

'2003-10-03 00:00:00'

This makes it into a stored proc with no issues,

but to be valid

I need something like this

select * from FIWORKING where DEALDATE > '@.WINDOW'

I can't seem to get the ' to stick in the stored proc,
is there a way to protect it ??

ChrisGot it to work by passing the datetime into the stored proc using the
below syntax

{ d '2003-31-11' }

Anyone know of another way to pass datetime into a Stored Proc ?

No comments:

Post a Comment