Tags: XML lis Delete str arc var specify create created1.for XML Path ("), stitching multiple rows of data into an XML format substring 2.stuff (string,index,length,otherstring), removes characters of a specified length and inserts another set of characters Instance: Creating Tables CREATE table Pro_list (pro_no nvarchar (50)) 1. SELECT distinct top pro_no as Z from pro_list for XML Path (' P ') Output: 2. SELECT distinct top pro_no as Z from pro_li
searched.CompareOptional. Indicates the value of the comparison type used to calculate the substring. For values, see the "Settings" section. If omitted, binary comparison is executed.
The properties of the two functions are very similar. It is used to search for a character in another string.
Patindex FunctionThe patindex function returns the starting position of a character or string in another string or expression. The patindex function supports searching strings with wildcards, which makes
SQL Server Character Processing (LastIndexOf usage), STUFF, CHARINDEX, REVERSE, LEN, charindexDECLARE @ s VARCHAR (100)SET @ s = 'r1-1-1 'Get the number after the last "-"Select REVERSE (@ s) Return Value: 1-1-1R reversed characters select LEN (@ s) Return Value: 6 get length select CHARINDEX ('-', REVERSE (@ s) return value: 2 -- Obtain the position where a string appears for the first time. If no character is changed, 0 select
Use [erp2015]go/****** object:storedprocedure [dbo]. [GetUser] Script date:03/14/2015 13:27:04 ******/set ansi_nulls ongoset quoted_identifier ongo--=============================== ==============--author:wangyanling--Create date:205-03-12--Description: Get customer information--================================ =============alter PROCEDURE [dbo]. [GetUser]--ADD the parameters for the stored procedure here@uname varchar ($) asbegin--SET NOCOUNT on added to prevent Extra result sets from--inter
SQL Stuff Usage1. functionDeletes a character of the specified length and inserts another set of characters at the specified starting point.2. GrammarSTUFF (character_expression, start, length, character_expression)3. ExampleThe following example removes the three characters from the 2nd position (character B) in the first string abcdef, and then inserts a second string at the beginning of the deletion, creating and returning a stringSELECT
Label:Function Stuff (param1, startIndex, length, param2)function DescriptionWillparam1In selfStartIndex (SQLare all from1Start, rather than0)Up, deleteLengthcharacters, and then use aparam2 replaces the deleted character. Example I have a #tmp1 table with the contents of Execute the following statement SELECTProdid,ktl_custref, PO= Stuff((SELECT ' ' +PO from#tmp1 asTWHERET. PRODID=Tb. PRODID forXML Path (
1. Role
Delete characters of the specified length and insert a group of characters at the specified start point.
2. Syntax
Stuff (character_expression, start, length, character_expression)
3. Example
The following example deletes the three characters starting from the first position (character B) in abcdef, and inserts the second string at the start of the deletion to create and return a string.
Select stuff
::tr1::shared_ptrError when manually releasing resources, recommended class ExplicitDo not persist in single statement, for RAII reason:The time order in which a function parameter is created between C + + is based on efficiency,std::tr1::shared_ptrIf the order is as followsNewTestshared_ptr to pass the argument.Test error then shared_ptr naturally blew up. Resource leaks.Try to replace Pass-by-value with Pass-by-reference-to-constStatic object Design (threat), multithreading security?It is diff
Reverse basic Finding important/interesting stuff in the code (2) zing
Chapter 2
Call assert
Sometimes, the emergence of assert () macro is also useful: Usually this macro will leak the source file name, row number and condition.
The most useful information is included in the assert condition, from which we can infer the variable name or struct name. Another useful information is the file name. We can infer the type of code used. It is also possible t
Reverse basic Finding important/interesting stuff in the code (1)
V. Search for interesting or important parts of the Code
In modern software design, minimalism is not particularly important.
It is not because programmers write a lot of code, but because many libraries are usually statically linked to executable files. If all the external libraries are moved into the external DLL file, the situation will be different. (Another reason why C ++ uses ST
infinite expansion. The Daji class not only increases the difficulty of the group members ' understanding of the code, but also increases the difficulty of troubleshooting when problems arise. In this respect, the Uiviewcontroller base class design is extremely unsuccessful: Mmuiviewcontroller.
Provides easy-to-use tool classes. Some easy-to-use tools often become an integral part of the framework, solving local problems quickly and easily without introducing too much complexity. Nstimer's re
Quick-x Data Encryption
I. Data Encryption
As long as quick encapsulation is used
Local crypto = require ("framework. crypto") -- algorithm encryption and decryption
To make
Function crypto. encryptxxtea (plaintext, key)Plaintext = tostring (plaintext)Key = tostring (key)Return cccrypto: encryptxxtea (plaintext, String. Len (plaintext), key, String. Len (key ))End
This is something in the framework. If you are interested, take a look.
Here, my encrypted data is decrypted, read, and encrypte
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [p_stuff] ') and objectproperty (ID, n' isprocedure') = 1)Drop procedure [DBO]. [p_stuff]Go
/* -- Ntext Field Processing
Simulate the string processing function stuffComplete the stuff processing of the ntext field in the tableNote: The table must have the primary key (or ID field) with the column name ID, and the data type is int.If this primary key field does not exist or is of
forwards it to the Br-vlan bridge. Br-vlan This bridge will put a real tag on the packet and send it to the corresponding Br-vlan Bridge of the other compute node. The bag will be sent to Br-vlan on this bridge.On the same node2 there is also a QBR bridge in charge of the flow of incoming and out. If this is allow then the packet is sent to the vm2.In fact, when our OpenStack platform deployment is complete, Br-vlan and Br-int have been created below to see a few configuration filesNetwork node
, asset restructuring and debt issuing business. Previously, he served in one of the five major domestic lines, responsible for high net worth clients wealth management business.Host:JoyceHe has worked at the headquarters Risk Management Department of a well-known commercial bank in Thailand and participated in the market risk model.Video Address: http://v.qq.com/page/e/r/p/e03196a9zrp.htmlThis issue: Corton finance frm lectures free Download: Http://d.gaodun.cn/f/jM4m96?x_field_1=qita_cnbolgsWh
school, I became a good student in my impression. Remember then the class teacher is very strict, grumpy, often in class, is forced to mercy his fear of becoming good, or because after high school went to county High School, where a collection of excellent students, and I would appear so ordinary not prominent, consciously changed to behave. The purpose of recalling these details is to find the bones of their own, this other people do not know I do not know the self. This is very important, in
In the future, we will add a link here for the good stuff on the network! Too rich!
No more opportunities!
1. programming and development, Emule download, edonkey2000, and P2P Network Resources Sharing
Http://www.eye888.com/dev/index.html
2. My Yahoo briefcase:
Http://cn.f2.pg.briefcase.yahoo.com/gaoyuanxue118
3. China Online Game R D center:
Http://www.ogdev.net/school/default.asp
4. My blog on verycd!
Http://blog.verycd.com/boyeestudio/
operators, how to generate an operator after the answer to the operator, and later on the internet found that the Python function library has this function, as long as the easy to call it. Later did not know how to generate documents, and later on the Internet to check a bit, and found that the function is called. And so the two of them did it slowly.
PSP TablePerformance analysisThe algorithm runs slowly, does not use the data structure to optimize, uses the library function extensively,
expect the demand will have random read operations, then can only use std::advance to get good use of STL algorithm, if you encounter STL data processing first see there is no corresponding STL algorithm because the STL code can be very long, all can build a file to put the global macro definition, similar to QtGlobal file . Do not skip to assign tasks, otherwise you will let subordinates do only the upper level of things The excessive publicity of personal responsibility and punishm
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.