Debugging a Stored Proc
-
SQL 2000 has a method in the query analyzer to debug a stored procedure. (Use object browser, select the stored proc, then right click and select debug). This is really nifty, with the exception of passing dates to a datetime parameter. I cannot figure out the format for the date. String mm/dd/yy doesn't work, either with or without single quote. I am stuck, any help would be greatly appreciated. "It takes a minimum of redesign to turn a crucifix into a pogo stick"
-
SQL 2000 has a method in the query analyzer to debug a stored procedure. (Use object browser, select the stored proc, then right click and select debug). This is really nifty, with the exception of passing dates to a datetime parameter. I cannot figure out the format for the date. String mm/dd/yy doesn't work, either with or without single quote. I am stuck, any help would be greatly appreciated. "It takes a minimum of redesign to turn a crucifix into a pogo stick"
yyyy-mm-dd works, IIRC. If all else fails, try converting to a number:
SELECT CAST( CAST( '2003-01-01' AS datetime ) AS int )
-
SQL 2000 has a method in the query analyzer to debug a stored procedure. (Use object browser, select the stored proc, then right click and select debug). This is really nifty, with the exception of passing dates to a datetime parameter. I cannot figure out the format for the date. String mm/dd/yy doesn't work, either with or without single quote. I am stuck, any help would be greatly appreciated. "It takes a minimum of redesign to turn a crucifix into a pogo stick"
Dave S wrote: String mm/dd/yy doesn't work, either with or without single quote. That depends totally on the configuration of the database. There's always the date functions and/or ISO format "yyyy-mm-dd" :) -- I am of The Clan of Xymox. I wear a pink kilt!