当前位置:网站首页>Introduction to bi-sql wildcards
Introduction to bi-sql wildcards
2022-06-25 01:12:00 【Powerbi white tea】

wildcard
The concept of wildcard is an important part of database language .
The important reason must be that you can guess , The data level of data warehouse is usually large , Many times we do data query , You can't guarantee the accuracy of your query conditions , Or we need fuzzy query to get a kind of data , Wildcards are useful in this case .
Compare with SQL,PowerBI There are few opportunities to use wildcards .
The fundamental reason lies in their different positioning .PowerBI Focus on the front-end display of data ,SQL It is the back-end data cleaning and storage .
SQL Wildcard category
| wildcard | describe |
|---|---|
| % | Replace one or more characters |
| _ | Replace a character |
| [ list ] | Scope of Supply |
| [^ list ] | Not in the scope of supply |
| [! list ] | Not in the scope of supply |
notes : The wildcard must be associated with LIKE Use it with .
Using examples
Case data :

In the database of white tea machine , There is a name “TEST” The database of , There is a name “ Product list ” Case data for .
Example 1:
stay PowerBI Get the product table in [ Name of commodity ] Beginning with “ child ” All data for .
SELECT * FROM Product list WHERE Name of commodity LIKE N' child %'

give the result as follows :

Example 2:
stay PowerBI Get the product table in [ Name of commodity ] It ends with “ pants ” All data for .
SELECT * FROM Product list WHERE Name of commodity LIKE N'% pants '

give the result as follows :

Example 3:
stay PowerBI Get the product table in [ Name of commodity ] The middle contains “ son ” All data for .
SELECT * FROM Product list WHERE Name of commodity LIKE N'% son %'

give the result as follows :

Example 4:
stay PowerBI Get the product table in [ Name of commodity ] The middle contains “ son ” And the number of characters is 3 All the data .
SELECT * FROM Product list WHERE Name of commodity LIKE N'_ son _'

give the result as follows :

Example 5:
stay PowerBI Get the product table in [ Name of commodity ] It begins with “ mouth 、 Infant 、 child ” All data for .
SELECT * FROM Product list WHERE Name of commodity LIKE N'[ Oral infant child ]%'

give the result as follows :

Example 6:
stay PowerBI Get the product table in [ Name of commodity ] Does not begin with “ mouth 、 Infant 、 child ” All data for .
SELECT * FROM Product list WHERE Name of commodity LIKE N'[^ Oral infant child ]%'

give the result as follows :



This is white tea , One PowerBI Beginners .
边栏推荐
- ImageView shows network pictures
- VB learning notes
- The optimism about technology is making Dell achieve more than expected
- VB 学习笔记
- adb shell sendevent
- Convert MySQL query timestamp to date format
- Programmer: did you spend all your savings to buy a house in Shenzhen? Or return to Changsha to live a "surplus" life?
- I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
- 图书馆管理系统代码源码(php+css+js+mysql) 完整的代码源码
- [practical series] full WiFi coverage at home
猜你喜欢

2022安全员-C证考试模拟100题及在线模拟考试

Zuckerberg demonstrated four VR head display prototypes, and meta revealed the "family" of metauniverse

程序员:是花光积蓄在深圳买房?还是回到长沙过“富余”生活?

大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十

使用 Loki 微服务模式部署生产集群

Examination questions and mock examination for safety management personnel of hazardous chemical business units in 2022

I brush the question I - copy the linked list with random pointer

Scala IO read by line

重磅:国产IDE发布,由阿里研发,完全开源!(高性能+高定制性)

Heavyweight: the domestic ide was released, developed by Alibaba, and is completely open source! (high performance + high customization)
随机推荐
启动服务11111
2022年全国最新消防设施操作员(高级消防设施操作员)模拟题及答案
2022 melting welding and thermal cutting recurrent training question bank simulated examination platform operation
Scala object blending trait
智能合约安全审计入门篇 —— delegatecall (2)
Which securities company should I choose to open an account online? Is it safe to open an account online?
Redis + Lua implementation of distributed interface current limiting
汇编语言(3)16位汇编基础框架与加减循环
MySQL common basic statements (collation)
Leetcode 1248. Statistics of "graceful subarray" (harm, suddenly found that it can only enumerate violently)
VB learning notes
扎克伯格上手演示四款VR头显原型机,Meta透露元宇宙「家底」
EVM Brief
大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十
Scala trait construction mechanism
【无标题】
指南针炒股软件怎么样?安全吗?
Add information on the left and add parts on the right of the status bar
Introduction to smart contract security audit delegatecall (2)
Text editor for QT project practice -- Episode 9