This is just for the fun of it.
How might one assign an empty string to an @variable without using a string literal? Here is it with a string literal:
declare @myvar varchar(50); set @myvar = ''; select '»'+@myvar+'«';
I came up with a couple ways to do it, but they were kludgy, at best. What can you come up with? Better solutions will work as expressions in WHERE clauses, too.
Dan Jameson
Associate Director of IT/DBA
Children's Oncology Group
http://www.ChildrensOncologyGroup.org