当前位置:网站首页>Bi-sql select into
Bi-sql select into
2022-06-25 01:13:00 【Powerbi white tea】

SELECT INTO
SELECT INTO Statement can usually be used to create a backup . I believe that the small partners will not be unfamiliar with the concept of backup , We're doing it BI When reporting , Or build DAX Function procedures like to PBI File backup . occasionally , This is a good habit , We can roll back the version in time when an error occurs .
Again , stay SQL in , The concept of backup is also very important , For example, we need to back up the database regularly , Or you need to back up certain tables and data at certain times .
purpose
Can be used to select data and insert it into another table
You can create a backup of a table and archive it
grammar
SELECT Column (*) INTO New table [IN database ] FROM Source table
Using examples
Case data :


In the database of white tea machine , There is a name “TEST” The database of , There is a name “Customer” and “Fact” Case data for .
Example 1:
Create a “Fact20210814” Of Fact Table backup .
SELECT * INTO Fact20210814 FROM Fact


give the result as follows :

Example 2:
Create a “FactAmount” Of Fact Table backup , among Amount Greater than 1300.
SELECT * INTO FactAmount FROM Fact WHERE Amount>1300


give the result as follows :

Example 3:
take Fact Table and Customer Table for combined query backup , Name it FactDetail.
SELECT Fact.AMOUNT,Customer.* INTO FactDetail From Customer JOIN Fact ON Customer.IDKEY=Fact.IDKEY


give the result as follows :



This is white tea , One PowerBI Beginners .
边栏推荐
- 【直播回顾】2022腾讯云未来社区城市运营方招募会暨SaaS 2.0新品发布会!
- Première application de l'informatique quantique à la modélisation des flux de puissance dans les systèmes énergétiques à l'Université technique danoise
- 2022年危险化学品经营单位安全管理人员考试试题及模拟考试
- 图片旋转移动缩放渐变
- Sanic服务启动失败
- JS Chapter 1 Summary
- 汇编语言(2)基础知识-debug
- Examination questions and mock examination for safety management personnel of hazardous chemical business units in 2022
- Introduction to bi-sql wildcards
- 使用 Loki 微服务模式部署生产集群
猜你喜欢

4 ans d'expérience de travail, 5 modes de communication Multi - thread ne peuvent pas être décrits, vous osez croire?

Scala IO reads by lexical units and numbers

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

Première application de l'informatique quantique à la modélisation des flux de puissance dans les systèmes énergétiques à l'Université technique danoise

15.线程同步的几种方法

生成订单30分钟未支付,则自动取消,该怎么实现?

Text border format and text block of rich text

Deploy a production cluster using Loki microservice pattern

2022 simulated 100 questions of safety officer-c certificate examination and online simulated examination

How to store dataframe data in pandas into MySQL
随机推荐
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
用手机在同花顺上开户靠谱吗?这样炒股有没有什么安全隐患
Introduction to smart contract security audit delegatecall (2)
How much commission does CICC wealth securities open an account? Is stock account opening and trading safe and reliable?
腾讯云WeCity丨你好 2022!
Introduction to bi-sql wildcards
Super detailed description and derivation of convolution and deconvolution (deconvolution is also called transpose convolution and fractional step convolution)
The interview questions and answers for the high-frequency software test of Dachang help you prepare for the golden nine silver ten
Bi-sql between
Add information on the left and add parts on the right of the status bar
对技术的乐观,正让戴尔取得比想象中更多的成就
汇编语言(4)函数传参
2022年全国最新消防设施操作员(高级消防设施操作员)模拟题及答案
Leetcode 1248. 统计「优美子数组」(害,突然发现只会暴力枚举了)
Welcome to the new world of Lenovo smart screen
网上开户选哪个证券公司?网上开户安全么?
指南针炒股软件怎么样?安全吗?
Convolution and transpose convolution
Sanic service startup failed
Sanic服务启动失败