Zookeeper
///
/// Split the string with commas (,)/// If a field contains a comma (Note: fields containing a comma must be referenced in double quotation marks), splice the fields./// Remove the double quotation marks of the
About commas-Transact-SQL formatting standard (encoding style)
This article is a translation. For the original article, see:Http://www.simple-talk.com/ SQL /t-sql-programming/transact-sql-formatting-standards (coding-Styles)
SQL code formatting tool:
During project creation, we often encounter such a table structure that stores a column in the master table separated by commas (,).
During project creation, we often encounter such a table structure that stores a column in the master table
How to convert a string separated by commas into a list, as an example of a comma delimiter:For example, there is a string whose value is: Hong Kong, Zhangjiagang, Beijing, ShanghaiThe way to convert this string into a list with SQL is:1, Method one
Problem:What delimiters should be used to connect a list parameter? For example:
1. The get method has the key1 parameter. Its corresponding value is a list and its value is value1 and value2. What delimiters are used to connect the two value values.
Background: when creating a project, we often encounter a table structure that stores a column in the master table separated by commas. For example, when an employee belongs to multiple departments, a project belongs to multiple cities, and a device
Background: when creating a project, we often encounter a table structure that stores a column in the master table separated by commas. For example, when an employee belongs to multiple departments, a project belongs to multiple cities, and a device
Since Oracle9i, you can use the SYS_CONNECT_BY_PATH function to display the content from the parent node to the current row in the form of "path" or a list of hierarchical elements. Obtain the names of all fields in a table and separate them with
A very common requirement in our daily development process,In the front we introduced the [original]sql to convert the comma-separated contents of the field stored in the table into a list form, of course, it is possible to change it in this way,
1, use, remove the extra line break >>> for I in Range (0,5):... print I...01234>>> for I in Range (0,5):... print I,...0 1 2) 3 4It is obvious that the print statement defaults to a newline followed by a comma followed by a newline that becomes a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.