Monday, February 13, 2012

ARGH! Cant pass smalldatetime to stored procedure in DEBUGGER!

I know this is probably user error, but here's the scoop:

I have a stored procedure...

CREATE PROCEDURE [dbo].[sp_Build_CurrentPortfolio_By_Date]
@.NewDate smalldatetime

and when I try to run it in debug in the SQL Query Analyzer, I sent in the parameter via the debug interface as '2004/02/02', and as GETDATE(), and a number of other formats, but cannot even get into the procedure once debugger starts up!

I get the following error once I hit "execute" after putting in the above data in the parameter text box...

[Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification

HELP PLEASE!!! (I'm about to punch my new monitor!!!)Remove apostrophe and pass it as 2004-02-02 00:00:00.000|||I LOVE YOU, Man!!!

why, if'n I wasn't already married... ;)

That worked...thanks so much!

I'll hafta file that one on my scorch list!!!

Thanks again!
Paul

No comments:

Post a Comment