Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
split¶
SELECT
A.state,
split.A.value('.', 'VARCHAR(100)') AS String
FROM (
SELECT
state,
CAST('<M>' + REPLACE(city, ',', '</M><M>') + '</M>' AS XML) AS string
FROM
TableA
) AS A
CROSS APPLY String.nodes ('/M') AS split(a)Improve the Performance of Spark
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Plan Your Work
- Have a clear idea about what you want to do is very important, especially when you are working on an explorative project. It often saves you time to …
Questions on SQL
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
比如在 LEFT JOIN 中过滤条件写在 ON 和 WHERE 的区别。
-
Table-value function 和 scalar-valued function 的区别.
-
char、varchar、nvarchar之间的区别(包括 …
General Tips on SQL
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Performance
-
Avoid implicit data convertion! This might cause full table scan which hurts performance badly. For more discussions, please refer to 一条垃圾SQL,把 64 核 CPU 快 …
Extract Identifier Names from a SQL Query Using Sqlfluff
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!