Viewing 9 posts - 31 through 39 (of 39 total)
This worked!
Date_Submitted > ''' + CONVERT(varchar(23), @DateFilter, 101) + '''
December 20, 2007 at 9:51 am
Bingo!
CONVERT(varchar(20), @DateFilter, 1)
Spoke to soon...The query runs but it appears that it is ignoring the date filter now. So, instead of returning records that are newer than the date specified,...
December 20, 2007 at 9:22 am
Well, I've tried it directly from my asp.net app and directly from sql management studio and it doesn't work.
When I changed it to that format, it says:
Msg 102, Level...
December 20, 2007 at 9:12 am
Thanks for all the great help guys! My very last issue is trying to get it to accept a smalldatetime type.
I was able to Cast all the variables directly in...
December 20, 2007 at 9:00 am
Crap didnt work. Just saw replies, that should work.
Thanks!
December 19, 2007 at 3:38 pm
Fixed:
declare @sql varchar
December 19, 2007 at 3:35 pm
OK, Cool. I think I can figure that out. However, after messing with it for a bit, now my declaration for @sql is messed up....
ALTER PROCEDURE [dbo].[procedure_name]
@DateFilter smalldatetime =...
December 19, 2007 at 3:24 pm
B Hilderman (12/19/2007)
Not sure why you're using int(10) rather than just int.You have;
DECLARE @prod_num INT(10)
use
DECLARE @prod_num INT
Sorry, that was a typo in haste. Any ideas why it would still not...
December 19, 2007 at 3:08 pm
Jeff Moden (12/19/2007)
The table name cannot be variable without using some form of dynamic SQL... kinda like...DECLARE @TableName SYSNAME
SET @TableName = 'sometablename'
EXEC ('SELECT * FROM ' + @TableName)
Jeff,
I'm having a...
December 19, 2007 at 2:55 pm
Viewing 9 posts - 31 through 39 (of 39 total)