Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/04/2005, 19:07
rdm
 
Fecha de Ingreso: noviembre-2003
Ubicación: Buenos Aires, Argentina
Mensajes: 57
Antigüedad: 20 años, 6 meses
Puntos: 0
Hola, te copio parte de la documentación respecto de LIKE que figura en la ayuda provista por el propio sqlserver. Si tienes instalado el sql query analyzer, escribe la palabra like, luego te paras sobre ella con el cursor y si haces shift+F1, te desplegará toda la ayuda disponible para el comando like (o el que quieras).

pattern

Is the pattern to search for in match_expression, and can include these valid SQL Server wildcard characters.

Wildcard character Description Example
% Any string of zero or more characters. WHERE title LIKE '%computer%' finds all book titles with the word 'computer' anywhere in the book title.

_ (underscore) Any single character. WHERE au_fname LIKE '_ean' finds all four-letter first names that end with ean (Dean, Sean, and so on).

[ ] Any single character within the specified range ([a-f]) or set ([abcdef]). WHERE au_lname LIKE '[C-P]arsen' finds author last names ending with arsen and beginning with any single character between C and P, for example Carsen, Larsen, Karsen, and so on.

[^] Any single character not within the specified range ([^a-f]) or set ([^abcdef]). WHERE au_lname LIKE 'de[^l]%' all author last names beginning with de and where the following letter is not l.

Espero te sirva. Saludos.