Anuncios


SQL Regular Expressions and Pattern Matching, Wildcards

In this course, we will learn about SQL REGEX operations in SQL Server database.

We will learn about pattern matching and how to use the wildcards.

We will learn how to use the following wildcards –

% – Any string of zero or more characters.

_ (underscore) Any single character.

[ ] Any single character within the specified range

[^] Any single character not within the specified range


All examples are base don the AdventureWorksLT database from Microsoft.


The table is SalesLt.Product.


You can download it from the Microsoft Website.


Select * from SalesLT.Product


Examples –

— % – Any string of zero or more characters.

Example 1 –    Name with ‘Bike’

— _ (underscore) Any single character.

Example 2 –  Second character is ‘R’

—   Third character is ‘-‘ and 4th character is ‘U’

  Check for Product Number pattern

Example 3 –   Any 2 characters followed by ‘-‘ followed

Example 4 –   by any 4 characters followed by ‘-‘ followed

Example 5 –   by any single character  – HL-U509-R

— [ ] Any single character within the specified range

Example 6 –    Above pattern with last char L or M

Example 7 –   Above pattern with last char between L and S

Example 8 –    Above pattern with last char between L and R

Anuncios

— [^] Any single character not within the specified range

Example 9 –    Above pattern with last char not between L and R

Example 10 –     Product number not starting with F

Example 11 –    Product number not starting with F or H

Example 12 –     Product NUmber not starting between A to H.

Example 13 – Data(Size) is Only One Character and Value is from A to Z

Example 14 – Data(Size) is Two Characters and Values are from A to Z

Example 15 – Text(rowguid) Rows Starting with a Number

Example 16 – Find a Number Pattern –

— Product Number with 4th and 5th chars as numbers

Example 17 – Number(List Price) with two decimal places ending in 2

— Using the Not Character for Regex with T-SQL

Example 18 Product Number – after 1st hyphen has either numbers or special characters

Example 19 – Name has Only alphabetic characters

Example 20 – Name has No special characters

SQL Server REGEX con ejercicios de práctica

SQL Regular Expressions and Pattern Matching, Wildcards”

Este curso es GRATIS

¿Quieres más cursos gratis?

Únete a nuestro canal en Telegram con cientos de cursos gratis publicados diariamente

Curso gratis en Udemy

Con los cursos gratis de Udemy puedes aprender muchas cosas sin tener que gastar en ello. Pero primero debes tener en cuenta varias cosas:

Contenido Gratuito

Los cursos gratis de Udemy te permiten aprender nuevas cosas sin tener que pagar. Aprovecha la oportunidad.

Aprendizaje

Pon en práctica todos tus conocimientos aprendidos. Realiza increíbles proyectos basados en el mundo real.

Limites

Debes tener en cuenta que todos los cursos gratuitos de Udemy son de máximo 2 horas y no incluyen un certificado.

Este curso se encuentra disponible de manera gratuita sin necesidad de ningún cupón, a través de la opción “GRATIS”.

Te recomendamos primero leer las diferencias entre un curso gratis y uno de pago para evitar malentendidos:

Cursos gratuitos
  • Contenido de vídeo en línea
Cursos de pago
  • Contenido de vídeo en línea
  • Certificado de finalización
  • Preguntas y respuestas de los instructores
  • Mensaje directo para el instructor

Aunque los cursos son colocados de manera gratuita, es posible que el autor del curso pueda cambiarlos a modalidad de pago, por lo cual te recomendamos revisar muy bien las características del curso.

Para obtener el curso de manera gratuita usa el siguiente botón:


Deja tus comentarios y sugerencias


Sobre Facialix

Facialix es un sitio web que tiene como objetivo apoyar en el aprendizaje y educación de jóvenes y grandes. Buscando y categorizando recursos educativos gratuitos de internet, de esta manera Facialix ayuda en el constante aprendizaje de todos.