当前位置:网站首页>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 .
边栏推荐
- 智能合约安全审计入门篇 —— delegatecall (2)
- I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
- 汇编语言(2)基础知识-debug
- Yasea APK Download Image
- Sanic服务启动失败
- 指南针炒股软件怎么样?安全吗?
- [practical series] full WiFi coverage at home
- 108页(4万字)未来公寓智能化设计平台项目方案建议书2022版
- Text border format and text block of rich text
- 2022年危险化学品经营单位安全管理人员考试试题及模拟考试
猜你喜欢

Deploy a production cluster using Loki microservice pattern

Add information on the left and add parts on the right of the status bar

QT electronic clock

The interview questions and answers for the high-frequency software test of Dachang help you prepare for the golden nine silver ten

Databinding quick start (still using findviewbyid?)

2022年全国最新消防设施操作员(高级消防设施操作员)模拟题及答案

108 pages (40000 words) proposal for future apartment intelligent design platform project (version 2022)

2022熔化焊接与热切割复训题库模拟考试平台操作

JS Chapter 1 Summary

丹麥技術大學首創將量子計算應用於能源系統潮流建模
随机推荐
2022安全员-C证考试模拟100题及在线模拟考试
What to learn in VB [easy to understand]
Mobile security tool -dex2jar
Which securities company should I choose to open an account online? Is it safe to open an account online?
[redis realizes seckill business ③] specific implementation of optimistic lock for oversold problem
腾讯云WeCity丨你好 2022!
2022年起重机司机(限桥式起重机)考试题库模拟考试平台操作
Scala classes inherit multiple attributes
智能合约安全审计入门篇 —— delegatecall (2)
汇编语言(3)16位汇编基础框架与加减循环
adb shell sendevent
Scala IO reads by lexical units and numbers
adb shell getevent
[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS
使用 Loki 微服务模式部署生产集群
Introduction to smart contract security audit delegatecall (2)
Picture rotation move zoom gradient
15.线程同步的几种方法
生成订单30分钟未支付,则自动取消,该怎么实现?
The basic principle and application of iterator and enhanced for