代码
1 /*
2 SQL 根据汉字获取全拼(有些字还没有添加上去,请自已加上去,涂聚文注)
3 1.生成所有读音临时表
4 2.根据Chinese_PRC_CS_AS_KS_WS 排序获取读音
5 3.geovindu@163.com 2009-12-2 其它功能請商討,我是在繁體的環境測試,簡體會更方便一些。
6 */
7 if exists(select 1 from sysobjects where name = 'f_GetPy' and xtype = 'FN')
8 drop function f_GetPy
9 go
10 CREATE function f_GetPy(@str varchar(100))
11 returns varchar(8000)
12 as
13 begin
14 declare @re varchar(8000)
15 --生成临时表
16 --geovindu@163.com www.dusystem.com www.dupcit.com
17 declare @geovindu table(chr nchar(2) collate Chinese_PRC_CS_AS_KS_WS,py nvarchar(20))
18 insert into @geovindu select N'吖','a'
19 insert into @geovindu select N'厑','aes'
20 insert into @geovindu select N'哎','ai'
21 insert into @geovindu select N'安','an'
22 insert into @geovindu select N'肮','ang'
23 insert into @geovindu select N'凹','ao'
24 insert into @geovindu select N'八','ba'
25 insert into @geovindu select N'挀','bai'
26 insert into @geovindu select N'兡','baike'
27 insert into @geovindu select N'瓸','baiwa'
28 insert into @geovindu select N'扳','ban'
29 insert into @geovindu select N'邦','bang'
30 insert into @geovindu select N'勹','bao'
31 insert into @geovindu select N'萡','be'
32 insert into @geovindu select N'陂','bei'
33 insert into @geovindu select N'奔','ben'
34 insert into @geovindu select N'伻','beng'
35 insert into @geovindu select N'皀','bi'
36 insert into @geovindu select N'边','bian'
37 insert into @geovindu select N'辪','uu'
38 insert into @geovindu select N'灬','biao'
39 insert into @geovindu select N'憋','bie'
40 insert into @geovindu select N'汃','bin'
41 insert into @geovindu select N'冫','bing'
42 insert into @geovindu select N'癶','bo'
43 insert into @geovindu select N'峬','bu'
44 insert into @geovindu select N'嚓','ca'
45 insert into @geovindu select N'偲','cai'
46 insert into @geovindu select N'乲','cal'
47 insert into @geovindu select N'参','can'
48 insert into @geovindu select N'仓','cang'
49 insert into @geovindu select N'撡','cao'
50 insert into @geovindu select N'冊','ce'
51 insert into @geovindu select N'膥','cen'
52 insert into @geovindu select N'噌','ceng'
53 insert into @geovindu select N'硛','ceok'
54 insert into @geovindu select N'岾','ceom'
55 insert into @geovindu select N'猠','ceon'
56 insert into @geovindu select N'乽','ceor'
57 insert into @geovindu select N'叉','cha'
58 insert into @geovindu select N'犲','chai'
59 insert into @geovindu select N'辿','chan'
60 insert into @geovindu select N'伥','chang'
61 insert into @geovindu select N'抄','chao'
62 insert into @geovindu select N'车','che'
63 insert into @geovindu select N'抻','chen'
64 insert into @geovindu select N'阷','cheng'
65 insert into @geovindu select N'吃','chi'
66 insert into @geovindu select N'充','chong'
67 insert into @geovindu select N'抽','chou'
68 insert into @geovindu select N'出','chu'
69 insert into @geovindu select N'膗','chuai'
70 insert into @geovindu select N'巛','chuan'
71 insert into @geovindu select N'刅','chuang'
72 insert into @geovindu select N'吹','chui'
73 insert into @geovindu select N'旾','chun'
74 insert into @geovindu select N'踔','chuo'
75 insert into @geovindu select N'呲','ci'
76 insert into @geovindu select N'嗭','cis'
77 insert into @geovindu select N'从','cong'
78 insert into @geovindu select N'凑','cou'
79 insert into @geovindu select N'粗','cu'
80 insert into @geovindu select N'汆','cuan'
81 insert into @geovindu select N'崔','cui'
82 insert into @geovindu select N'邨','cun'
83 insert into @geovindu select N'瑳','cuo'
84 insert into @geovindu select N'撮','chua'
85 insert into @geovindu select N'咑','da'
86 insert into @geovindu select N'呔','dai'
87 insert into @geovindu select N'丹','dan'
88 insert into @geovindu select N'当','dang'
89 insert into @geovindu select N'刀','dao'
90 insert into @geovindu select N'恴','de'
91 insert into @geovindu select N'揼','dem'
92 insert into @geovindu select N'扥','den'
93 insert into @geovindu select N'灯','deng'
94 insert into @geovindu select N'仾','di'
95 insert into @geovindu select N'嗲','dia'
96 insert into @geovindu select N'敁','dian'
97 insert into @geovindu select N'刁','diao'
98 insert into @geovindu select N'爹','die'
99 insert into @geovindu select N'哋','dei'
100 insert into @geovindu select N'嚸','dim'
101 insert into @geovindu select N'丁','ding'
102 insert into @geovindu select N'丟','diu'
103 insert into @geovindu select N'东','dong'
104 insert into @geovindu select N'吺','dou'
105 insert into @geovindu select N'剢','du'
106 insert into @geovindu select N'耑','duan'
107 insert into @geovindu select N'叾','dug'
108 insert into @geovindu select N'垖','dui'
109 insert into @geovindu select N'吨','dun'
110 insert into @geovindu select N'咄','duo'
111 insert into @geovindu select N'妸','e'
112 insert into @geovindu select N'奀','en'
113 insert into @geovindu select N'鞥','eng'
114 insert into @geovindu select N'仒','eo'
115 insert into @geovindu select N'乻','eol'
116 insert into @geovindu select N'旕','eos'
117 insert into @geovindu select N'儿','er'
118 insert into @geovindu select N'发','fa'
119 insert into @geovindu select N'帆','fan'
120 insert into @geovindu select N'匚','fang'
121 insert into @geovindu select N'飞','fei'
122 insert into @geovindu select N'吩','fen'
123 insert into @geovindu select N'丰','feng'
124 insert into @geovindu select N'瓰','fenwa'
125 insert into @geovindu select N'覅','fiao'
126 insert into @geovindu select N'仏','fo'
127 insert into @geovindu select N'垺','fou'
128 insert into @geovindu select N'夫','fu'
129 insert into @geovindu select N'猤','fui'
130 insert into @geovindu select N'旮','ga'
131 insert into @geovindu select N'侅','gai'
132 insert into @geovindu select N'甘','gan'
133 insert into @geovindu select N'冈','gang'
134 insert into @geovindu select N'皋','gao'
135 insert into @geovindu select N'戈','ge'
136 insert into @geovindu select N'给','gei'
137 insert into @geovindu select N'根','gen'
138 insert into @geovindu select N'更','geng'
139 insert into @geovindu select N'啹','geu'
140 insert into @geovindu select N'喼','gib'
141 insert into @geovindu select N'嗰','go'
142 insert into @geovindu select N'工','gong'
143 insert into @geovindu select N'兝','gongfen'
144 insert into @geovindu select N'兣','gongli'
145 insert into @geovindu select N'勾','gou'
146 insert into @geovindu select N'估','gu'
147 insert into @geovindu select N'瓜','gua'
148 insert into @geovindu select N'乖','guai'
149 insert into @geovindu select N'关','guan'
150 insert into @geovindu select N'光','guang'
151 insert into @geovindu select N'归','gui'
152 insert into @geovindu select N'丨','gun'
153 insert into @geovindu select N'呙','guo'
154 insert into @geovindu select N'妎','ha'
155 insert into @geovindu select N'咍','hai'
156 insert into @geovindu select N'乤','hal'
157 insert into @geovindu select N'兯','han'
158 insert into @geovindu select N'魧','hang'
159 insert into @geovindu select N'茠','hao'
160 insert into @geovindu select N'兞','haoke'
161 insert into @geovindu select N'诃','he'
162 insert into @geovindu select N'黒','hei'
163 insert into @geovindu select N'拫','hen'
164 insert into @geovindu select N'亨','heng'
165 insert into @geovindu select N'囍','heui'
166 insert into @geovindu select N'乊','ho'
167 insert into @geovindu select N'乥','hol'
168 insert into @geovindu select N'叿','hong'
169 insert into @geovindu select N'齁','hou'
170 insert into @geovindu select N'乎','hu'
171 insert into @geovindu select N'花','hua'
172 insert into @geovindu select N'徊','huai'
173 insert into @geovindu select N'欢','huan'
174 insert into @geovindu select N'巟','huang'
175 insert into @geovindu select N'灰','hui'
176 insert into @geovindu select N'昏','hun'
177 insert into @geovindu select N'吙','huo'
178 insert into @geovindu select N'嚿','geo'
179 insert into @geovindu select N'夻','hwa'
180 insert into @geovindu select N'丌','ji'
181 insert into @geovindu select N'加','jia'
182 insert into @geovindu select N'嗧','jialun'
183 insert into @geovindu select N'戋','jian'
184 insert into @geovindu select N'江','jiang'
185 insert into @geovindu select N'艽','jiao'
186 insert into @geovindu select N'阶','jie'
187 insert into @geovindu select N'巾','jin'
188 insert into @geovindu select N'坕','jing'
189 insert into @geovindu select N'冂','jiong'
190 insert into @geovindu select N'丩','jiu'
191 insert into @geovindu select N'欍','jou'
192 insert into @geovindu select N'凥','ju'
193 insert into @geovindu select N'姢','juan'
194 insert into @geovindu select N'噘','jue'
195 insert into @geovindu select N'军','jun'
196 insert into @geovindu select N'咔','ka'
197 insert into @geovindu select N'开','kai'
198 insert into @geovindu select N'乫','kal'
199 insert into @geovindu select N'刊','kan'
200 insert into @geovindu select N'冚','hem'
201 insert into @geovindu select N'砊','kang'
202 insert into @geovindu select N'尻','kao'
203 insert into @geovindu select N'坷','ke'
204 insert into @geovindu select N'肎','ken'
205 insert into @geovindu select N'劥','keng'
206 insert into @geovindu select N'巪','keo'
207 insert into @geovindu select N'乬','keol'
208 insert into @geovindu select N'唟','keos'
209 insert into @geovindu select N'厼','keum'
210 insert into @geovindu select N'怾','ki'
211 insert into @geovindu select N'空','kong'
212 insert into @geovindu select N'廤','kos'
213 insert into @geovindu select N'抠','kou'
214 insert into @geovindu select N'扝','ku'
215 insert into @geovindu select N'夸','kua'
216 insert into @geovindu select N'蒯','kuai'
217 insert into @geovindu select N'宽','kuan'
218 insert into @geovindu select N'匡','kuang'
219 insert into @geovindu select N'亏','kui'
220 insert into @geovindu select N'坤','kun'
221 insert into @geovindu select N'拡','kuo'
222 insert into @geovindu select N'穒','kweok'
223 insert into @geovindu select N'垃','la'
224 insert into @geovindu select N'来','lai'
225 insert into @geovindu select N'兰','lan'
226 insert into @geovindu select N'啷','lang'
227 insert into @geovindu select N'捞','lao'
228 insert into @geovindu select N'仂','le'
229 insert into @geovindu select N'雷','lei'
230 insert into @geovindu select N'塄','leng'
231 insert into @geovindu select N'唎','li'
232 insert into @geovindu select N'俩','lia'
233 insert into @geovindu select N'嫾','lian'
234 insert into @geovindu select N'簗','liang'
235 insert into @geovindu select N'蹽','liao'
236 insert into @geovindu select N'毟','lie'
237 insert into @geovindu select N'厸','lin'
238 insert into @geovindu select N'伶','ling'
239 insert into @geovindu select N'溜','liu'
240 insert into @geovindu select N'瓼','liwa'
241 insert into @geovindu select N'囖','lo'
242 insert into @geovindu select N'龙','long'
243 insert into @geovindu select N'娄','lou'
244 insert into @geovindu select N'噜','lu'
245 insert into @geovindu select N'驴','lv'
246 insert into @geovindu select N'寽','lue'
247 insert into @geovindu select N'孪','luan'
248 insert into @geovindu select N'掄','lun'
249 insert into @geovindu select N'頱','luo'
250 insert into @geovindu select N'呣','m'
251 insert into @geovindu select N'妈','ma'
252 insert into @geovindu select N'遤','hweong'
253 insert into @geovindu select N'埋','mai'
254 insert into @geovindu select N'颟','man'
255 insert into @geovindu select N'牤','mang'
256 insert into @geovindu select N'匁','mangmi'
257 insert into @geovindu select N'猫','mao'
258 insert into @geovindu select N'唜','mas'
259 insert into @geovindu select N'庅','me'
260 insert into @geovindu select N'呅','mei'
261 insert into @geovindu select N'椚','men'
262 insert into @geovindu select N'掹','meng'
263 insert into @geovindu select N'踎','meo'
264 insert into @geovindu select N'瞇','mi'
265 insert into @geovindu select N'宀','mian'
266 insert into @geovindu select N'喵','miao'
267 insert into @geovindu select N'乜','mie'
268 insert into @geovindu select N'瓱','miliklanm'
269 insert into @geovindu select N'民','min'
270 insert into @geovindu select N'冧','lem'
271 insert into @geovindu select N'名','ming'
272 insert into @geovindu select N'谬','miu'
273 insert into @geovindu select N'摸','mo'
274 insert into @geovindu select N'乮','mol'
275 insert into @geovindu select N'哞','mou'
276 insert into @geovindu select N'母','mu'
277 insert into @geovindu select N'旀','myeo'
278 insert into @geovindu select N'丆','myeon'
279 insert into @geovindu select N'椧','myeong'
280 insert into @geovindu select N'拏','na'
281 insert into @geovindu select N'腉','nai'
282 insert into @geovindu select N'囡','nan'
283 insert into @geovindu select N'囔','nang'
284 insert into @geovindu select N'乪','keg'
285 insert into @geovindu select N'孬','nao'
286 insert into @geovindu select N'疒','ne'
287 insert into @geovindu select N'娞','nei'
288 insert into @geovindu select N'焾','nem'
289 insert into @geovindu select N'嫩','nen'
290 insert into @geovindu select N'莻','neus'
291 insert into @geovindu select N'鈪','ngag'
292 insert into @geovindu select N'銰','ngai'
293 insert into @geovindu select N'啱','ngam'
294 insert into @geovindu select N'妮','ni'
295 insert into @geovindu select N'年','nian'
296 insert into @geovindu select N'娘','niang'
297 insert into @geovindu select N'茑','niao'
298 insert into @geovindu select N'捏','nie'
299 insert into @geovindu select N'脌','nin'
300 insert into @geovindu select N'宁','ning'
301 insert into @geovindu select N'牛','niu'
302 insert into @geovindu select N'农','nong'
303 insert into @geovindu select N'羺','nou'
304 insert into @geovindu select N'奴','nu'
305 insert into @geovindu select N'女','nv'
306 insert into @geovindu select N'疟','nue'
307 insert into @geovindu select N'瘧','nve'
308 insert into @geovindu select N'奻','nuan'
309 insert into @geovindu select N'黁','nun'
310 insert into @geovindu select N'燶','nung'
311 insert into @geovindu select N'挪','nuo'
312 insert into @geovindu select N'筽','o'
313 insert into @geovindu select N'夞','oes'
314 insert into @geovindu select N'乯','ol'
315 insert into @geovindu select N'鞰','on'
316 insert into @geovindu select N'讴','ou'
317 insert into @geovindu select N'妑','pa'
318 insert into @geovindu select N'俳','pai'
319 insert into @geovindu select N'磗','pak'
320 insert into @geovindu select N'眅','pan'
321 insert into @geovindu select N'乓','pang'
322 insert into @geovindu select N'抛','pao'
323 insert into @geovindu select N'呸','pei'
324 insert into @geovindu select N'瓫','pen'
325 insert into @geovindu select N'匉','peng'
326 insert into @geovindu select N'浌','peol'
327 insert into @geovindu select N'巼','phas'
328 insert into @geovindu select N'闏','phdeng'
329 insert into @geovindu select N'乶','phoi'
330 insert into @geovindu select N'喸','phos'
331 insert into @geovindu select N'丕','pi'
332 insert into @geovindu select N'囨','pian'
333 insert into @geovindu select N'缥','piao'
334 insert into @geovindu select N'氕','pie'
335 insert into @geovindu select N'丿','pianpang'
336 insert into @geovindu select N'姘','pin'
337 insert into @geovindu select N'乒','ping'
338 insert into @geovindu select N'钋','po'
339 insert into @geovindu select N'剖','pou'
340 insert into @geovindu select N'哣','deo'
341 insert into @geovindu select N'兺','ppun'
342 insert into @geovindu select N'仆','pu'
343 insert into @geovindu select N'七','qi'
344 insert into @geovindu select N'掐','qia'
345 insert into @geovindu select N'千','qian'
346 insert into @geovindu select N'羌','qiang'
347 insert into @geovindu select N'兛','qianke'
348 insert into @geovindu select N'瓩','qianwa'
349 insert into @geovindu select N'悄','qiao'
350 insert into @geovindu select N'苆','qie'
351 insert into @geovindu select N'亲','qin'
352 insert into @geovindu select N'蠄','kem'
353 insert into @geovindu select N'氢','qing'
354 insert into @geovindu select N'銎','qiong'
355 insert into @geovindu select N'丘','qiu'
356 insert into @geovindu select N'曲','qu'
357 insert into @geovindu select N'迲','keop'
358 insert into @geovindu select N'峑','quan'
359 insert into @geovindu select N'蒛','que'
360 insert into @geovindu select N'夋','qun'
361 insert into @geovindu select N'亽','ra'
362 insert into @geovindu select N'囕','ram'
363 insert into @geovindu select N'呥','ran'
364 insert into @geovindu select N'穣','rang'
365 insert into @geovindu select N'荛','rao'
366 insert into @geovindu select N'惹','re'
367 insert into @geovindu select N'人','ren'
368 insert into @geovindu select N'扔','reng'
369 insert into @geovindu select N'日','ri'
370 insert into @geovindu select N'栄','rong'
371 insert into @geovindu select N'禸','rou'
372 insert into @geovindu select N'嶿','ru'
373 insert into @geovindu select N'撋','ruan'
374 insert into @geovindu select N'桵','rui'
375 insert into @geovindu select N'闰','run'
376 insert into @geovindu select N'叒','ruo'
377 insert into @geovindu select N'仨','sa'
378 insert into @geovindu select N'栍','saeng'
379 insert into @geovindu select N'毢','sai'
380 insert into @geovindu select N'虄','sal'
381 insert into @geovindu select N'三','san'
382 insert into @geovindu select N'桒','sang'
383 insert into @geovindu select N'掻','sao'
384 insert into @geovindu select N'色','se'
385 insert into @geovindu select N'裇','sed'
386 insert into @geovindu select N'聓','sei'
387 insert into @geovindu select N'森','sen'
388 insert into @geovindu select N'鬙','seng'
389 insert into @geovindu select N'閪','seo'
390 insert into @geovindu select N'縇','seon'
391 insert into @geovindu select N'杀','sha'
392 insert into @geovindu select N'筛','shai'
393 insert into @geovindu select N'山','shan'
394 insert into @geovindu select N'伤','shang'
395 insert into @geovindu select N'弰','shao'
396 insert into @geovindu select N'奢','she'
397 insert into @geovindu select N'申','shen'
398 insert into @geovindu select N'升','sheng'
399 insert into @geovindu select N'尸','shi'
400 insert into @geovindu select N'兙','shike'
401 insert into @geovindu select N'瓧','shiwa'
402 insert into @geovindu select N'収','shou'
403 insert into @geovindu select N'书','shu'
404 insert into @geovindu select N'刷','shua'
405 insert into @geovindu select N'摔','shuai'
406 insert into @geovindu select N'闩','shuan'
407 insert into @geovindu select N'双','shuang'
408 insert into @geovindu select N'谁','shei'
409 insert into @geovindu select N'脽','shui'
410 insert into @geovindu select N'吮','shun'
411 insert into @geovindu select N'哾','shuo'
412 insert into @geovindu select N'丝','si'
413 insert into @geovindu select N'螦','so'
414 insert into @geovindu select N'乺','sol'
415 insert into @geovindu select N'忪','song'
416 insert into @geovindu select N'凁','sou'
417 insert into @geovindu select N'苏','su'
418 insert into @geovindu select N'痠','suan'
419 insert into @geovindu select N'夊','sui'
420 insert into @geovindu select N'娑','suo'
421 insert into @geovindu select N'他','ta'
422 insert into @geovindu select N'襨','tae'
423 insert into @geovindu select N'囼','tai'
424 insert into @geovindu select N'坍','tan'
425 insert into @geovindu select N'铴','tang'
426 insert into @geovindu select N'仐','tao'
427 insert into @geovindu select N'畓','tap'
428 insert into @geovindu select N'忒','te'
429 insert into @geovindu select N'膯','teng'
430 insert into @geovindu select N'唞','teo'
431 insert into @geovindu select N'朰','teul'
432 insert into @geovindu select N'剔','ti'
433 insert into @geovindu select N'天','tian'
434 insert into @geovindu select N'旫','tiao'
435 insert into @geovindu select N'怗','tie'
436 insert into @geovindu select N'厅','ting'
437 insert into @geovindu select N'乭','tol'
438 insert into @geovindu select N'囲','tong'
439 insert into @geovindu select N'偷','tou'
440 insert into @geovindu select N'凸','tu'
441 insert into @geovindu select N'湍','tuan'
442 insert into @geovindu select N'推','tui'
443 insert into @geovindu select N'旽','tun'
444 insert into @geovindu select N'乇','tuo'
445 insert into @geovindu select N'屲','wa'
446 insert into @geovindu select N'歪','wai'
447 insert into @geovindu select N'乛','wan'
448 insert into @geovindu select N'尣','wang'
449 insert into @geovindu select N'危','wei'
450 insert into @geovindu select N'塭','wen'
451 insert into @geovindu select N'翁','weng'
452 insert into @geovindu select N'挝','wo'
453 insert into @geovindu select N'乌','wu'
454 insert into @geovindu select N'夕','xi'
455 insert into @geovindu select N'诶','ei'
456 insert into @geovindu select N'疨','xia'
457 insert into @geovindu select N'仙','xian'
458 insert into @geovindu select N'乡','xiang'
459 insert into @geovindu select N'灱','xiao'
460 insert into @geovindu select N'楔','xie'
461 insert into @geovindu select N'心','xin'
462 insert into @geovindu select N'星','xing'
463 insert into @geovindu select N'凶','xiong'
464 insert into @geovindu select N'休','xiu'
465 insert into @geovindu select N'旴','xu'
466 insert into @geovindu select N'昍','xuan'
467 insert into @geovindu select N'疶','xue'
468 insert into @geovindu select N'坃','xun'
469 insert into @geovindu select N'丫','ya'
470 insert into @geovindu select N'咽','yan'
471 insert into @geovindu select N'欕','eom'
472 insert into @geovindu select N'央','yang'
473 insert into @geovindu select N'涂','tu'
474 insert into @geovindu select N'聚','ju'
475 insert into @geovindu select N'文','wen'
476 insert into @geovindu select N'吆','yao'
477 insert into @geovindu select N'椰','ye'
478 insert into @geovindu select N'膶','yen'
479 insert into @geovindu select N'一','yi'
480 insert into @geovindu select N'乁','i'
481 insert into @geovindu select N'乚','yin'
482 insert into @geovindu select N'应','ying'
483 insert into @geovindu select N'哟','yo'
484 insert into @geovindu select N'佣','yong'
485 insert into @geovindu select N'优','you'
486 insert into @geovindu select N'迂','yu'
487 insert into @geovindu select N'囦','yuan'
488 insert into @geovindu select N'曰','yue'
489 insert into @geovindu select N'蒀','yun'
490 insert into @geovindu select N'帀','za'
491 insert into @geovindu select N'災','zai'
492 insert into @geovindu select N'兂','zan'
493 insert into @geovindu select N'牂','zang'
494 insert into @geovindu select N'遭','zao'
495 insert into @geovindu select N'啫','ze'
496 insert into @geovindu select N'贼','zei'
497 insert into @geovindu select N'怎','zen'
498 insert into @geovindu select N'曽','zeng'
499 insert into @geovindu select N'吒','zha'
500 insert into @geovindu select N'甴','gad'
501 insert into @geovindu select N'夈','zhai'
502 insert into @geovindu select N'毡','zhan'
503 insert into @geovindu select N'张','zhang'
504 insert into @geovindu select N'钊','zhao'
505 insert into @geovindu select N'蜇','zhe'
506 insert into @geovindu select N'贞','zhen'
507 insert into @geovindu select N'凧','zheng'
508 insert into @geovindu select N'之','zhi'
509 insert into @geovindu select N'中','zhong'
510 insert into @geovindu select N'州','zhou'
511 insert into @geovindu select N'劯','zhu'
512 insert into @geovindu select N'抓','zhua'
513 insert into @geovindu select N'专','zhuan'
514 insert into @geovindu select N'转','zhuai'
515 insert into @geovindu select N'妆','zhuang'
516 insert into @geovindu select N'骓','zhui'
517 insert into @geovindu select N'宒','zhun'
518 insert into @geovindu select N'卓','zhuo'
519 insert into @geovindu select N'孜','zi'
520 insert into @geovindu select N'唨','zo'
521 insert into @geovindu select N'宗','zong'
522 insert into @geovindu select N'棸','zou'
523 insert into @geovindu select N'哫','zu'
524 insert into @geovindu select N'劗','zuan'
525 insert into @geovindu select N'厜','zui'
526 insert into @geovindu select N'尊','zun'
527 insert into @geovindu select N'昨','zuo'
528 insert into @geovindu select N'孙','sun'
529 insert into @geovindu select N'斯','si'
530
531 declare @strlen int
532 select @strlen=len(@str),@re=''
533 while @strlen>0
534 begin
535 select top 1 @re=UPPER(substring(py,1,1) )+substring(py,2,len(py))+@re,@strlen=@strlen-1
536 from @geovindu a where chr<=substring(@str,@strlen,1)
537 order by chr collate Chinese_PRC_CS_AS_KS_WS desc
538 if @@rowcount=0
539 select @re=substring(@str,@strlen,1)+@re,@strlen=@strlen-1
540 end
541 return(@re)
542 end
543 GO
544 GO
2 SQL 根据汉字获取全拼(有些字还没有添加上去,请自已加上去,涂聚文注)
3 1.生成所有读音临时表
4 2.根据Chinese_PRC_CS_AS_KS_WS 排序获取读音
5 3.geovindu@163.com 2009-12-2 其它功能請商討,我是在繁體的環境測試,簡體會更方便一些。
6 */
7 if exists(select 1 from sysobjects where name = 'f_GetPy' and xtype = 'FN')
8 drop function f_GetPy
9 go
10 CREATE function f_GetPy(@str varchar(100))
11 returns varchar(8000)
12 as
13 begin
14 declare @re varchar(8000)
15 --生成临时表
16 --geovindu@163.com www.dusystem.com www.dupcit.com
17 declare @geovindu table(chr nchar(2) collate Chinese_PRC_CS_AS_KS_WS,py nvarchar(20))
18 insert into @geovindu select N'吖','a'
19 insert into @geovindu select N'厑','aes'
20 insert into @geovindu select N'哎','ai'
21 insert into @geovindu select N'安','an'
22 insert into @geovindu select N'肮','ang'
23 insert into @geovindu select N'凹','ao'
24 insert into @geovindu select N'八','ba'
25 insert into @geovindu select N'挀','bai'
26 insert into @geovindu select N'兡','baike'
27 insert into @geovindu select N'瓸','baiwa'
28 insert into @geovindu select N'扳','ban'
29 insert into @geovindu select N'邦','bang'
30 insert into @geovindu select N'勹','bao'
31 insert into @geovindu select N'萡','be'
32 insert into @geovindu select N'陂','bei'
33 insert into @geovindu select N'奔','ben'
34 insert into @geovindu select N'伻','beng'
35 insert into @geovindu select N'皀','bi'
36 insert into @geovindu select N'边','bian'
37 insert into @geovindu select N'辪','uu'
38 insert into @geovindu select N'灬','biao'
39 insert into @geovindu select N'憋','bie'
40 insert into @geovindu select N'汃','bin'
41 insert into @geovindu select N'冫','bing'
42 insert into @geovindu select N'癶','bo'
43 insert into @geovindu select N'峬','bu'
44 insert into @geovindu select N'嚓','ca'
45 insert into @geovindu select N'偲','cai'
46 insert into @geovindu select N'乲','cal'
47 insert into @geovindu select N'参','can'
48 insert into @geovindu select N'仓','cang'
49 insert into @geovindu select N'撡','cao'
50 insert into @geovindu select N'冊','ce'
51 insert into @geovindu select N'膥','cen'
52 insert into @geovindu select N'噌','ceng'
53 insert into @geovindu select N'硛','ceok'
54 insert into @geovindu select N'岾','ceom'
55 insert into @geovindu select N'猠','ceon'
56 insert into @geovindu select N'乽','ceor'
57 insert into @geovindu select N'叉','cha'
58 insert into @geovindu select N'犲','chai'
59 insert into @geovindu select N'辿','chan'
60 insert into @geovindu select N'伥','chang'
61 insert into @geovindu select N'抄','chao'
62 insert into @geovindu select N'车','che'
63 insert into @geovindu select N'抻','chen'
64 insert into @geovindu select N'阷','cheng'
65 insert into @geovindu select N'吃','chi'
66 insert into @geovindu select N'充','chong'
67 insert into @geovindu select N'抽','chou'
68 insert into @geovindu select N'出','chu'
69 insert into @geovindu select N'膗','chuai'
70 insert into @geovindu select N'巛','chuan'
71 insert into @geovindu select N'刅','chuang'
72 insert into @geovindu select N'吹','chui'
73 insert into @geovindu select N'旾','chun'
74 insert into @geovindu select N'踔','chuo'
75 insert into @geovindu select N'呲','ci'
76 insert into @geovindu select N'嗭','cis'
77 insert into @geovindu select N'从','cong'
78 insert into @geovindu select N'凑','cou'
79 insert into @geovindu select N'粗','cu'
80 insert into @geovindu select N'汆','cuan'
81 insert into @geovindu select N'崔','cui'
82 insert into @geovindu select N'邨','cun'
83 insert into @geovindu select N'瑳','cuo'
84 insert into @geovindu select N'撮','chua'
85 insert into @geovindu select N'咑','da'
86 insert into @geovindu select N'呔','dai'
87 insert into @geovindu select N'丹','dan'
88 insert into @geovindu select N'当','dang'
89 insert into @geovindu select N'刀','dao'
90 insert into @geovindu select N'恴','de'
91 insert into @geovindu select N'揼','dem'
92 insert into @geovindu select N'扥','den'
93 insert into @geovindu select N'灯','deng'
94 insert into @geovindu select N'仾','di'
95 insert into @geovindu select N'嗲','dia'
96 insert into @geovindu select N'敁','dian'
97 insert into @geovindu select N'刁','diao'
98 insert into @geovindu select N'爹','die'
99 insert into @geovindu select N'哋','dei'
100 insert into @geovindu select N'嚸','dim'
101 insert into @geovindu select N'丁','ding'
102 insert into @geovindu select N'丟','diu'
103 insert into @geovindu select N'东','dong'
104 insert into @geovindu select N'吺','dou'
105 insert into @geovindu select N'剢','du'
106 insert into @geovindu select N'耑','duan'
107 insert into @geovindu select N'叾','dug'
108 insert into @geovindu select N'垖','dui'
109 insert into @geovindu select N'吨','dun'
110 insert into @geovindu select N'咄','duo'
111 insert into @geovindu select N'妸','e'
112 insert into @geovindu select N'奀','en'
113 insert into @geovindu select N'鞥','eng'
114 insert into @geovindu select N'仒','eo'
115 insert into @geovindu select N'乻','eol'
116 insert into @geovindu select N'旕','eos'
117 insert into @geovindu select N'儿','er'
118 insert into @geovindu select N'发','fa'
119 insert into @geovindu select N'帆','fan'
120 insert into @geovindu select N'匚','fang'
121 insert into @geovindu select N'飞','fei'
122 insert into @geovindu select N'吩','fen'
123 insert into @geovindu select N'丰','feng'
124 insert into @geovindu select N'瓰','fenwa'
125 insert into @geovindu select N'覅','fiao'
126 insert into @geovindu select N'仏','fo'
127 insert into @geovindu select N'垺','fou'
128 insert into @geovindu select N'夫','fu'
129 insert into @geovindu select N'猤','fui'
130 insert into @geovindu select N'旮','ga'
131 insert into @geovindu select N'侅','gai'
132 insert into @geovindu select N'甘','gan'
133 insert into @geovindu select N'冈','gang'
134 insert into @geovindu select N'皋','gao'
135 insert into @geovindu select N'戈','ge'
136 insert into @geovindu select N'给','gei'
137 insert into @geovindu select N'根','gen'
138 insert into @geovindu select N'更','geng'
139 insert into @geovindu select N'啹','geu'
140 insert into @geovindu select N'喼','gib'
141 insert into @geovindu select N'嗰','go'
142 insert into @geovindu select N'工','gong'
143 insert into @geovindu select N'兝','gongfen'
144 insert into @geovindu select N'兣','gongli'
145 insert into @geovindu select N'勾','gou'
146 insert into @geovindu select N'估','gu'
147 insert into @geovindu select N'瓜','gua'
148 insert into @geovindu select N'乖','guai'
149 insert into @geovindu select N'关','guan'
150 insert into @geovindu select N'光','guang'
151 insert into @geovindu select N'归','gui'
152 insert into @geovindu select N'丨','gun'
153 insert into @geovindu select N'呙','guo'
154 insert into @geovindu select N'妎','ha'
155 insert into @geovindu select N'咍','hai'
156 insert into @geovindu select N'乤','hal'
157 insert into @geovindu select N'兯','han'
158 insert into @geovindu select N'魧','hang'
159 insert into @geovindu select N'茠','hao'
160 insert into @geovindu select N'兞','haoke'
161 insert into @geovindu select N'诃','he'
162 insert into @geovindu select N'黒','hei'
163 insert into @geovindu select N'拫','hen'
164 insert into @geovindu select N'亨','heng'
165 insert into @geovindu select N'囍','heui'
166 insert into @geovindu select N'乊','ho'
167 insert into @geovindu select N'乥','hol'
168 insert into @geovindu select N'叿','hong'
169 insert into @geovindu select N'齁','hou'
170 insert into @geovindu select N'乎','hu'
171 insert into @geovindu select N'花','hua'
172 insert into @geovindu select N'徊','huai'
173 insert into @geovindu select N'欢','huan'
174 insert into @geovindu select N'巟','huang'
175 insert into @geovindu select N'灰','hui'
176 insert into @geovindu select N'昏','hun'
177 insert into @geovindu select N'吙','huo'
178 insert into @geovindu select N'嚿','geo'
179 insert into @geovindu select N'夻','hwa'
180 insert into @geovindu select N'丌','ji'
181 insert into @geovindu select N'加','jia'
182 insert into @geovindu select N'嗧','jialun'
183 insert into @geovindu select N'戋','jian'
184 insert into @geovindu select N'江','jiang'
185 insert into @geovindu select N'艽','jiao'
186 insert into @geovindu select N'阶','jie'
187 insert into @geovindu select N'巾','jin'
188 insert into @geovindu select N'坕','jing'
189 insert into @geovindu select N'冂','jiong'
190 insert into @geovindu select N'丩','jiu'
191 insert into @geovindu select N'欍','jou'
192 insert into @geovindu select N'凥','ju'
193 insert into @geovindu select N'姢','juan'
194 insert into @geovindu select N'噘','jue'
195 insert into @geovindu select N'军','jun'
196 insert into @geovindu select N'咔','ka'
197 insert into @geovindu select N'开','kai'
198 insert into @geovindu select N'乫','kal'
199 insert into @geovindu select N'刊','kan'
200 insert into @geovindu select N'冚','hem'
201 insert into @geovindu select N'砊','kang'
202 insert into @geovindu select N'尻','kao'
203 insert into @geovindu select N'坷','ke'
204 insert into @geovindu select N'肎','ken'
205 insert into @geovindu select N'劥','keng'
206 insert into @geovindu select N'巪','keo'
207 insert into @geovindu select N'乬','keol'
208 insert into @geovindu select N'唟','keos'
209 insert into @geovindu select N'厼','keum'
210 insert into @geovindu select N'怾','ki'
211 insert into @geovindu select N'空','kong'
212 insert into @geovindu select N'廤','kos'
213 insert into @geovindu select N'抠','kou'
214 insert into @geovindu select N'扝','ku'
215 insert into @geovindu select N'夸','kua'
216 insert into @geovindu select N'蒯','kuai'
217 insert into @geovindu select N'宽','kuan'
218 insert into @geovindu select N'匡','kuang'
219 insert into @geovindu select N'亏','kui'
220 insert into @geovindu select N'坤','kun'
221 insert into @geovindu select N'拡','kuo'
222 insert into @geovindu select N'穒','kweok'
223 insert into @geovindu select N'垃','la'
224 insert into @geovindu select N'来','lai'
225 insert into @geovindu select N'兰','lan'
226 insert into @geovindu select N'啷','lang'
227 insert into @geovindu select N'捞','lao'
228 insert into @geovindu select N'仂','le'
229 insert into @geovindu select N'雷','lei'
230 insert into @geovindu select N'塄','leng'
231 insert into @geovindu select N'唎','li'
232 insert into @geovindu select N'俩','lia'
233 insert into @geovindu select N'嫾','lian'
234 insert into @geovindu select N'簗','liang'
235 insert into @geovindu select N'蹽','liao'
236 insert into @geovindu select N'毟','lie'
237 insert into @geovindu select N'厸','lin'
238 insert into @geovindu select N'伶','ling'
239 insert into @geovindu select N'溜','liu'
240 insert into @geovindu select N'瓼','liwa'
241 insert into @geovindu select N'囖','lo'
242 insert into @geovindu select N'龙','long'
243 insert into @geovindu select N'娄','lou'
244 insert into @geovindu select N'噜','lu'
245 insert into @geovindu select N'驴','lv'
246 insert into @geovindu select N'寽','lue'
247 insert into @geovindu select N'孪','luan'
248 insert into @geovindu select N'掄','lun'
249 insert into @geovindu select N'頱','luo'
250 insert into @geovindu select N'呣','m'
251 insert into @geovindu select N'妈','ma'
252 insert into @geovindu select N'遤','hweong'
253 insert into @geovindu select N'埋','mai'
254 insert into @geovindu select N'颟','man'
255 insert into @geovindu select N'牤','mang'
256 insert into @geovindu select N'匁','mangmi'
257 insert into @geovindu select N'猫','mao'
258 insert into @geovindu select N'唜','mas'
259 insert into @geovindu select N'庅','me'
260 insert into @geovindu select N'呅','mei'
261 insert into @geovindu select N'椚','men'
262 insert into @geovindu select N'掹','meng'
263 insert into @geovindu select N'踎','meo'
264 insert into @geovindu select N'瞇','mi'
265 insert into @geovindu select N'宀','mian'
266 insert into @geovindu select N'喵','miao'
267 insert into @geovindu select N'乜','mie'
268 insert into @geovindu select N'瓱','miliklanm'
269 insert into @geovindu select N'民','min'
270 insert into @geovindu select N'冧','lem'
271 insert into @geovindu select N'名','ming'
272 insert into @geovindu select N'谬','miu'
273 insert into @geovindu select N'摸','mo'
274 insert into @geovindu select N'乮','mol'
275 insert into @geovindu select N'哞','mou'
276 insert into @geovindu select N'母','mu'
277 insert into @geovindu select N'旀','myeo'
278 insert into @geovindu select N'丆','myeon'
279 insert into @geovindu select N'椧','myeong'
280 insert into @geovindu select N'拏','na'
281 insert into @geovindu select N'腉','nai'
282 insert into @geovindu select N'囡','nan'
283 insert into @geovindu select N'囔','nang'
284 insert into @geovindu select N'乪','keg'
285 insert into @geovindu select N'孬','nao'
286 insert into @geovindu select N'疒','ne'
287 insert into @geovindu select N'娞','nei'
288 insert into @geovindu select N'焾','nem'
289 insert into @geovindu select N'嫩','nen'
290 insert into @geovindu select N'莻','neus'
291 insert into @geovindu select N'鈪','ngag'
292 insert into @geovindu select N'銰','ngai'
293 insert into @geovindu select N'啱','ngam'
294 insert into @geovindu select N'妮','ni'
295 insert into @geovindu select N'年','nian'
296 insert into @geovindu select N'娘','niang'
297 insert into @geovindu select N'茑','niao'
298 insert into @geovindu select N'捏','nie'
299 insert into @geovindu select N'脌','nin'
300 insert into @geovindu select N'宁','ning'
301 insert into @geovindu select N'牛','niu'
302 insert into @geovindu select N'农','nong'
303 insert into @geovindu select N'羺','nou'
304 insert into @geovindu select N'奴','nu'
305 insert into @geovindu select N'女','nv'
306 insert into @geovindu select N'疟','nue'
307 insert into @geovindu select N'瘧','nve'
308 insert into @geovindu select N'奻','nuan'
309 insert into @geovindu select N'黁','nun'
310 insert into @geovindu select N'燶','nung'
311 insert into @geovindu select N'挪','nuo'
312 insert into @geovindu select N'筽','o'
313 insert into @geovindu select N'夞','oes'
314 insert into @geovindu select N'乯','ol'
315 insert into @geovindu select N'鞰','on'
316 insert into @geovindu select N'讴','ou'
317 insert into @geovindu select N'妑','pa'
318 insert into @geovindu select N'俳','pai'
319 insert into @geovindu select N'磗','pak'
320 insert into @geovindu select N'眅','pan'
321 insert into @geovindu select N'乓','pang'
322 insert into @geovindu select N'抛','pao'
323 insert into @geovindu select N'呸','pei'
324 insert into @geovindu select N'瓫','pen'
325 insert into @geovindu select N'匉','peng'
326 insert into @geovindu select N'浌','peol'
327 insert into @geovindu select N'巼','phas'
328 insert into @geovindu select N'闏','phdeng'
329 insert into @geovindu select N'乶','phoi'
330 insert into @geovindu select N'喸','phos'
331 insert into @geovindu select N'丕','pi'
332 insert into @geovindu select N'囨','pian'
333 insert into @geovindu select N'缥','piao'
334 insert into @geovindu select N'氕','pie'
335 insert into @geovindu select N'丿','pianpang'
336 insert into @geovindu select N'姘','pin'
337 insert into @geovindu select N'乒','ping'
338 insert into @geovindu select N'钋','po'
339 insert into @geovindu select N'剖','pou'
340 insert into @geovindu select N'哣','deo'
341 insert into @geovindu select N'兺','ppun'
342 insert into @geovindu select N'仆','pu'
343 insert into @geovindu select N'七','qi'
344 insert into @geovindu select N'掐','qia'
345 insert into @geovindu select N'千','qian'
346 insert into @geovindu select N'羌','qiang'
347 insert into @geovindu select N'兛','qianke'
348 insert into @geovindu select N'瓩','qianwa'
349 insert into @geovindu select N'悄','qiao'
350 insert into @geovindu select N'苆','qie'
351 insert into @geovindu select N'亲','qin'
352 insert into @geovindu select N'蠄','kem'
353 insert into @geovindu select N'氢','qing'
354 insert into @geovindu select N'銎','qiong'
355 insert into @geovindu select N'丘','qiu'
356 insert into @geovindu select N'曲','qu'
357 insert into @geovindu select N'迲','keop'
358 insert into @geovindu select N'峑','quan'
359 insert into @geovindu select N'蒛','que'
360 insert into @geovindu select N'夋','qun'
361 insert into @geovindu select N'亽','ra'
362 insert into @geovindu select N'囕','ram'
363 insert into @geovindu select N'呥','ran'
364 insert into @geovindu select N'穣','rang'
365 insert into @geovindu select N'荛','rao'
366 insert into @geovindu select N'惹','re'
367 insert into @geovindu select N'人','ren'
368 insert into @geovindu select N'扔','reng'
369 insert into @geovindu select N'日','ri'
370 insert into @geovindu select N'栄','rong'
371 insert into @geovindu select N'禸','rou'
372 insert into @geovindu select N'嶿','ru'
373 insert into @geovindu select N'撋','ruan'
374 insert into @geovindu select N'桵','rui'
375 insert into @geovindu select N'闰','run'
376 insert into @geovindu select N'叒','ruo'
377 insert into @geovindu select N'仨','sa'
378 insert into @geovindu select N'栍','saeng'
379 insert into @geovindu select N'毢','sai'
380 insert into @geovindu select N'虄','sal'
381 insert into @geovindu select N'三','san'
382 insert into @geovindu select N'桒','sang'
383 insert into @geovindu select N'掻','sao'
384 insert into @geovindu select N'色','se'
385 insert into @geovindu select N'裇','sed'
386 insert into @geovindu select N'聓','sei'
387 insert into @geovindu select N'森','sen'
388 insert into @geovindu select N'鬙','seng'
389 insert into @geovindu select N'閪','seo'
390 insert into @geovindu select N'縇','seon'
391 insert into @geovindu select N'杀','sha'
392 insert into @geovindu select N'筛','shai'
393 insert into @geovindu select N'山','shan'
394 insert into @geovindu select N'伤','shang'
395 insert into @geovindu select N'弰','shao'
396 insert into @geovindu select N'奢','she'
397 insert into @geovindu select N'申','shen'
398 insert into @geovindu select N'升','sheng'
399 insert into @geovindu select N'尸','shi'
400 insert into @geovindu select N'兙','shike'
401 insert into @geovindu select N'瓧','shiwa'
402 insert into @geovindu select N'収','shou'
403 insert into @geovindu select N'书','shu'
404 insert into @geovindu select N'刷','shua'
405 insert into @geovindu select N'摔','shuai'
406 insert into @geovindu select N'闩','shuan'
407 insert into @geovindu select N'双','shuang'
408 insert into @geovindu select N'谁','shei'
409 insert into @geovindu select N'脽','shui'
410 insert into @geovindu select N'吮','shun'
411 insert into @geovindu select N'哾','shuo'
412 insert into @geovindu select N'丝','si'
413 insert into @geovindu select N'螦','so'
414 insert into @geovindu select N'乺','sol'
415 insert into @geovindu select N'忪','song'
416 insert into @geovindu select N'凁','sou'
417 insert into @geovindu select N'苏','su'
418 insert into @geovindu select N'痠','suan'
419 insert into @geovindu select N'夊','sui'
420 insert into @geovindu select N'娑','suo'
421 insert into @geovindu select N'他','ta'
422 insert into @geovindu select N'襨','tae'
423 insert into @geovindu select N'囼','tai'
424 insert into @geovindu select N'坍','tan'
425 insert into @geovindu select N'铴','tang'
426 insert into @geovindu select N'仐','tao'
427 insert into @geovindu select N'畓','tap'
428 insert into @geovindu select N'忒','te'
429 insert into @geovindu select N'膯','teng'
430 insert into @geovindu select N'唞','teo'
431 insert into @geovindu select N'朰','teul'
432 insert into @geovindu select N'剔','ti'
433 insert into @geovindu select N'天','tian'
434 insert into @geovindu select N'旫','tiao'
435 insert into @geovindu select N'怗','tie'
436 insert into @geovindu select N'厅','ting'
437 insert into @geovindu select N'乭','tol'
438 insert into @geovindu select N'囲','tong'
439 insert into @geovindu select N'偷','tou'
440 insert into @geovindu select N'凸','tu'
441 insert into @geovindu select N'湍','tuan'
442 insert into @geovindu select N'推','tui'
443 insert into @geovindu select N'旽','tun'
444 insert into @geovindu select N'乇','tuo'
445 insert into @geovindu select N'屲','wa'
446 insert into @geovindu select N'歪','wai'
447 insert into @geovindu select N'乛','wan'
448 insert into @geovindu select N'尣','wang'
449 insert into @geovindu select N'危','wei'
450 insert into @geovindu select N'塭','wen'
451 insert into @geovindu select N'翁','weng'
452 insert into @geovindu select N'挝','wo'
453 insert into @geovindu select N'乌','wu'
454 insert into @geovindu select N'夕','xi'
455 insert into @geovindu select N'诶','ei'
456 insert into @geovindu select N'疨','xia'
457 insert into @geovindu select N'仙','xian'
458 insert into @geovindu select N'乡','xiang'
459 insert into @geovindu select N'灱','xiao'
460 insert into @geovindu select N'楔','xie'
461 insert into @geovindu select N'心','xin'
462 insert into @geovindu select N'星','xing'
463 insert into @geovindu select N'凶','xiong'
464 insert into @geovindu select N'休','xiu'
465 insert into @geovindu select N'旴','xu'
466 insert into @geovindu select N'昍','xuan'
467 insert into @geovindu select N'疶','xue'
468 insert into @geovindu select N'坃','xun'
469 insert into @geovindu select N'丫','ya'
470 insert into @geovindu select N'咽','yan'
471 insert into @geovindu select N'欕','eom'
472 insert into @geovindu select N'央','yang'
473 insert into @geovindu select N'涂','tu'
474 insert into @geovindu select N'聚','ju'
475 insert into @geovindu select N'文','wen'
476 insert into @geovindu select N'吆','yao'
477 insert into @geovindu select N'椰','ye'
478 insert into @geovindu select N'膶','yen'
479 insert into @geovindu select N'一','yi'
480 insert into @geovindu select N'乁','i'
481 insert into @geovindu select N'乚','yin'
482 insert into @geovindu select N'应','ying'
483 insert into @geovindu select N'哟','yo'
484 insert into @geovindu select N'佣','yong'
485 insert into @geovindu select N'优','you'
486 insert into @geovindu select N'迂','yu'
487 insert into @geovindu select N'囦','yuan'
488 insert into @geovindu select N'曰','yue'
489 insert into @geovindu select N'蒀','yun'
490 insert into @geovindu select N'帀','za'
491 insert into @geovindu select N'災','zai'
492 insert into @geovindu select N'兂','zan'
493 insert into @geovindu select N'牂','zang'
494 insert into @geovindu select N'遭','zao'
495 insert into @geovindu select N'啫','ze'
496 insert into @geovindu select N'贼','zei'
497 insert into @geovindu select N'怎','zen'
498 insert into @geovindu select N'曽','zeng'
499 insert into @geovindu select N'吒','zha'
500 insert into @geovindu select N'甴','gad'
501 insert into @geovindu select N'夈','zhai'
502 insert into @geovindu select N'毡','zhan'
503 insert into @geovindu select N'张','zhang'
504 insert into @geovindu select N'钊','zhao'
505 insert into @geovindu select N'蜇','zhe'
506 insert into @geovindu select N'贞','zhen'
507 insert into @geovindu select N'凧','zheng'
508 insert into @geovindu select N'之','zhi'
509 insert into @geovindu select N'中','zhong'
510 insert into @geovindu select N'州','zhou'
511 insert into @geovindu select N'劯','zhu'
512 insert into @geovindu select N'抓','zhua'
513 insert into @geovindu select N'专','zhuan'
514 insert into @geovindu select N'转','zhuai'
515 insert into @geovindu select N'妆','zhuang'
516 insert into @geovindu select N'骓','zhui'
517 insert into @geovindu select N'宒','zhun'
518 insert into @geovindu select N'卓','zhuo'
519 insert into @geovindu select N'孜','zi'
520 insert into @geovindu select N'唨','zo'
521 insert into @geovindu select N'宗','zong'
522 insert into @geovindu select N'棸','zou'
523 insert into @geovindu select N'哫','zu'
524 insert into @geovindu select N'劗','zuan'
525 insert into @geovindu select N'厜','zui'
526 insert into @geovindu select N'尊','zun'
527 insert into @geovindu select N'昨','zuo'
528 insert into @geovindu select N'孙','sun'
529 insert into @geovindu select N'斯','si'
530
531 declare @strlen int
532 select @strlen=len(@str),@re=''
533 while @strlen>0
534 begin
535 select top 1 @re=UPPER(substring(py,1,1) )+substring(py,2,len(py))+@re,@strlen=@strlen-1
536 from @geovindu a where chr<=substring(@str,@strlen,1)
537 order by chr collate Chinese_PRC_CS_AS_KS_WS desc
538 if @@rowcount=0
539 select @re=substring(@str,@strlen,1)+@re,@strlen=@strlen-1
540 end
541 return(@re)
542 end
543 GO
測試代碼如下:
--測試在功(其它应用于可想而知了,这里不多说了)
SELECT dbo.f_GetPy('人昨涂聚文宗斯博') as '拼音'
GO
1 測試代碼如下:
2
3 --測試在功(其它应用于可想而知了,这里不多说了)
4 SELECT dbo.f_GetPy('人昨涂聚文涂斯博') as '拼音'
5 GO
2
3 --測試在功(其它应用于可想而知了,这里不多说了)
4 SELECT dbo.f_GetPy('人昨涂聚文涂斯博') as '拼音'
5 GO
544 GO