Viewing 5 posts - 1 through 5 (of 5 total)
Great, it worked, but can you explain to me exactly what's going on here:
isnull(@franchise,'-999')=case when @franchise is not null then lis_franchise else '-999' end
What does isnull(@franchise,'-999')= mean and what...
December 5, 2007 at 4:12 pm
Matt, I get a "Conversion failed when converting the varchar value 'some franchise' to data type int." error with your case statement. Again I like to keep the solution using...
December 5, 2007 at 2:53 pm
Thanks Ramesh, works out great.
I have also been trying something like:
select * from Listings where lis_name=@lis_name
(
case when @franchise is not null then ' AND lis_franchise=@lis_franchise'
)
What I want...
December 5, 2007 at 10:33 am
The conversion caused the radius value to lose precision:
declare @sql nvarchar(4000)
declare @radius float
set @radius = -0.256712789599778
set @sql='SELECT lis_id, distance = ' + cast(@radius as varchar(20)) + ' FROM Listings'
EXEC sp_executesql...
November 28, 2007 at 1:58 pm
Sorry, I don't quite follow. How do I save the following to another CTE for use in another recursive call:
with Recurse_1 as
(
-- select statement
)
select * From Recurse_1
November 14, 2007 at 11:59 am
Viewing 5 posts - 1 through 5 (of 5 total)