• Hmmmm, it appears I don't have much of a point, but, if I did, it would be that it is not good practice to cast a variable unless it is strongly typed.

    select * from(

    select 'red' textfield

    union select 'blue' textfield

    union select 'green' textfield

    union select 'yellow' textfield

    union select 'orange' textfield

    union select 'purple' textfield)x

    where convert(varchar(1),textfield) like '%red%'

    ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/282cd982-f4fb-4b22-b2df-9e8478f13f6a.htm

    When n is not specified in a data definition or variable declaration statement, the default length is 1. When n is not specified when using the CAST and CONVERT functions, the default length is 30.

    Not 100% sure but I think the rule of default length applies only to variable declaration; functions have other rules: CONVERT(VARCHAR, expression) defaults to VARCHAR(30).

    But, I was unaware that the varchar declaration has a default. Normally, I wouldn't think of trying this so now the question has forced me to think outside the box. To wit, perhaps it is a good question after all.

    Jamie