Jane--Traditional transformation function

Source: Internet
Author: User
Tags key ming
function | Convert if EXISTS (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ F_gb2big] and Xtype in (n ' FN ', n ' IF ', n ' TF '))
Drop function [dbo]. [F_gb2big]
Go

--Generate Code table
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (n ' [codetable] ') and OBJECTPROPERTY (ID, N ' isusertable ') = 1)
drop table [codetable]
Go

declare @j nvarchar (watts), @f nvarchar (2000)
Select @j= ' Ai io Hinder love ao ao dam strike to do trip help tied pound slander to peel full bao Pao, abalone Jackal prepare exhausted the closing of the coin is closed to the change of the braid standard turtle not to have a flat bin bin, and dial the PT to complement the money Ginseng silkworm residue I'm so ashamed. Cang Cang bin Cang astonished side book measurement layer mixed with cicada greedy slander the shovel production of a long time to pay for intestinal factory Chang-chong-chen lining braces to call the correctional Cheng Che-chi, the shame of the teeth blazing a bug in the 踌 to raise silk ugly cupboard kitchen hoe young At the same place, the touch of the sores break through the hammer pure words to give Cong chimneys from the bundle together jump up the wrong to take credit Tan Shan bile mend A Christmas bomb when the party swings the island and pray for the guide to steal Light Deng enemy the ingot set to throw East move the frozen bucket calf to read the betting on the satin team to the ton of blunt the goose the amount to be very hungry er the bait to send the punishment valve to be the same, the 诽 of the rice------------------ Feng-qi-qi-qi-qi-qi-qi-qi-qi-qi-fu-fu-zhi fu re-tie the calcium Gaigan to catch the stalk Gan Gang steel outline hillock Gao pick Pigeon Pavilion Chrome to Shing tribute hook Ditch construction to buy enough cruel gu Guan Guan Hall accustomed to the turtle friend of the Ark of the roll pot Guo Hanhan There crane he Wang hung after a pot of Hu Hu-hua painting, and the bad Huan Huan, the ring also slow change call 痪 Huan Huan yellow lie wave to destroy bribe dirty will be braised in the meat of the goods, the product The hunger and the chicken, the order of the Polar series, the number of thistles, the Ji-ji, the memory of the second-class clip pod checking the base and alkali and picking up the Jiang, reducing the threshold, practicing cheap and seeing the key ship sword money gradually splash the pulp Jiang Oar award to speak sauce gum pouring pride and stirring hinge straightening richest foot dumplings paying off a car compared to the straw-stalk whale by the neck Jing Jing Jing the old colt lifting according to the saw fear of the cuckoo Juan Jie Jie commandment session tight Kam Jin Jin only to make the best Jin Jing Jue jue June Army Chun Kai Shell Class Ken dug the storehouse of the Executioner wide mine open condition deficient kui peep feed burst widen wax Lai Lai lan bar Stop the basket Lan speak browsing lazy cable suck Lao Lok Lei Lei class lei Li Lai li 厉励砾 calendar Li Lian Lian even sickle of pity ripple the curtain gathers the face chain to practice the grain to cool two cures the sea to be tested to be near the neighbour Scale Lin lease age Bell Linglingling collar run Liu Long deaf throat Cage Ridge Long Long Lou Lou Lian Lou Lu Lu Lou you lu Ling bribery LU Record Lu Lu aluminum companion repeatedly worry about filter green Luan Twin Luan Disorderly whirl Lun Lun, Luo luo luo logos gongs luo ma ma yards horse scold? Buy wheat sell mai cheat eels pretty full 谩 cat anchor riveting trade Mody not magnesium door stuffy manganese dream riddle find Power Cotton Burma temple out of the Min Ming and Ming absurd seek mu na na difficult to tickle the brain annoyed and tired of the stuffed birds Nie ni-ning hunting ning twist muddy button new pus-rich malaria Connaught Ouchi fight vomit retting dish pang compensate jet peng cheat drift Frequency The poor Apple on the evaluation of the spread of the spectrum of habitat melancholy umbilical qi ride not to open the air to abandon the pull of lead brazing move to sign modest money pliers dive shallow graben gun choke wall Qiang strong Rob Spade bridge Chowa to sleep light hydrogen dumping in Qing June area of the impoverished body drive caries zygomatic right advised but Magpie really let Rao around hot-thread rong velvet soft sharp run sprinkle SA three umbrella mourning sweep dry wipe screen Shine Shan support damage reward burn Shaoxing credit to set the chance to examine the kidney infiltration sound rope wins the Holy Lion wet On the death of the corpse in the body when the test of the life of the animal pivot book Redemption of the tree vertical number handsome double who is the tax shun Shuo impressive Su although with the sui old sun damaged bamboo shoot shrinkage Lock rex tart Heave-state-held the beach Tan to talk about the Tang hot Tao to make a copy of antimony title Body drawer bar sticking Iron Hall hearing hydrocarbon copper head bald figure Coating Regiment decay shed tuo tuo camel-Bend Bay stubborn million net Wei Wai Wei Wei Pseudo Wei Wei Wen to hear the grain steady ask Urn The sacrifice of the fog of Wu Wu in a spiral vortex nestThe fine shrimp in the milling scene the Xia Xia Xia man narrow mansion frighten shovel fresh fiber salty Yin Title Carefree show Danger present Xianxian stuffing Xian Xian line Xiang detailed sound of the small Xiao Xiao selling the Scorpion association with the threat of harmonic writing Xie Xie Zinc Peacemaker hing because they rust embroidery Xu Yin must Xussu Xu Xuan Hung select Tinea Xuan Learn the training hearing the weak pressure raven duck dumb ya Yan Yan 鸯 yan Yan Proverbs Test Yang Yuyang yang itching nourishing like Yao Yao Yao Liu-Liu-zhi-yi-ye-li-li-li-Wei Yi, the Art of memory On the yin and the silver drink hidden cherry Baby Eagle Ching Fluorescent Ying, Ying-fu carbuncle Dance Yong Yong Yu-chuan-Chuan-Chuan-Yu and Yu-Chuan-yi-Chuan-yi-Chuan-chuan-fish entertainment and Yue language to the Imperial prison reputation in the Yuan Yuan shafts Park members round margin is willing to Yue Yue Yue to read cloud Yunyang evenly Yun Yun Christie Halo rhyme Miscellaneous Disaster load save temporary praise dirty cut jujube focus on the case of the damage to the world of the theft of a rolling mill to trap the gate of the trap of debt felt to cut the stack battle into Zhang, the expansion of the account swelling Zhao zhe zhen needle detection The township of the town to earn open 狰 competition frame Zheng Certificate weaving paper Zhi-chung, the end of the species swelling masses of the day suddenly pig to cast and build a brick to make a pile of bricks to earn a strong-shaped cone pendant Zhun the turbidity of the total longitudinal 邹诅 Group drill '
     , @f= ' 皚 藹 翺 襖 Olympic dams strike to issue to help bind the pound 絆 謗 saturated stripped lifetime Bob 鋇 reserve 狽 pen after shot the awareness change debate 辮 Mark 鼈 癟 Endangered riverwalk Waffles and 擯 flick 缽 Platinum connected ashamed sad brightening flies hatch barn 滄 toilet and 詫 攙 摻 cicadas 饞 讒 dogfight a spade field to be in the same------------------makes The piles broke creative cylinders pure Dolcevita resignation onion from the bush Chimney Compact The fault of the 躥 竄 憚, the 搗, The Pirate Beacon, Tang enemy 滌, 締 upside, cushion, fishing, fold top 錠 subscribe to building freeze 犢 plated forgings ribbons troops confirmed tons capture dull abortion the goose 訛 the bait to be punished 貳 the valve of the 琺 and the 礬 of the trouble 釩 the trafficking of the flight Lyon and 誹 Fung Sewing ironic Phoenix radiation were the 訃 bondage tetrahydrate to do so to 稈 贛 the of the Car, Longgang, 臯 Hao of the same stranded chrome to the 龔 鞏 hook communication structure 蠱 care about the museum's habits 剮 wide silicon consistent turtle orbit 閨 tricks 劊 輥 rolling pan country hackers Korean Hans 閡 鶴 Hubbard Huan Pot protect 滬 rushing the plan of the paralyzed Longoza to destroy 渙 bribery the 穢 will 燴 and conceal 誨 to draw 葷 渾 to attack the volume of accident Hunger 譏 Chicken Grade Warrant Extreme editor 薊, and pods cheeks Steve Potassium, and the hardness of destroyers 緘 Cocoon Berberine alkaline chosen pick simple 儉 recommended threshold draw practices cheap See key battleship Sword 餞 Splash 澗 will plasma 蔣 plastic watering proud delicate stirring 鉸 矯 僥 leg 餃 paying 絞 vehicles 稭 campaign penis The old neck 痙 the tangled the 廄 of the campaign 駒 and then saw the Huan Silk commandments to the end She, Antony to the Army 駿 Open the shell course settlements chickens copied library pants boast snobbish wide mines 曠 scenario thanks 巋 Glimpse Feedback breakdown wide fence intercept basketball 闌 瀾 讕 攬 Browse lazy cables torn abused 撈 labor 澇 music beam softball tears fence away She calendars asphalt, scythe poor ripples curtain 斂 facial link Alchemy Food 遼 鐐 Scales 凜, 賃 fanling--distillation-Chris Lau Deaf, the throat-cage--monopolistic-a-, and the- Paul Donkey Lu Aluminum Couples floundering Hamamelis consider filter green 巒 攣 孿 灤 Chaos stall London Rurunrun boundary 綸 theory of Prime Robert Gong 籮 騾 mom, 螞蟻, scoid? To buy a hiding 饅 謾 road cat 鉚, and not magnesium dream mystery the 覓 冪 sponge Myanmar Temple Extinction Mercy 閩 resonance motto absurd conspiracy acre sodium harass 餒 the 膩 the of the 攆 the birds linen stuffed 聶 Rodents The 鑷 鎳 the Lemonade 獰 The ning of the new screwed the concentrated agriculture 濘 the European 膿 malaria The Seagull 毆 the 嘔 Poor apple thin Songkran Aleppo Poker cobblestone Pot recipe habitat 淒 belly the wouldn't the 訖 the 扡 to lead 釺 the lead sign humility money bleeder potential shallow condemnation graben gun 嗆 wall 薔 Rob 鍬 bridge Joe 僑 dead tricks theft Chin dear bedroom light hydrogen 頃 Please celebrate Vigénère Poor District Torso TD 齲 Zygomatic rights advise but Choquette make spare disturbed by sewing honor fuzzy the soft sharp rinjita sprinkled gills umbrella harassment the Shibuya to kill yarn the filter to have a 曬 陝 the 贍 to be burned 繕 to 賒 the deterrent to trial gentleman 嬸 At the time of the erosion, I was in the knowledge of the actual drive. Longevity hubs input Salvation the erector spinae of both who taxes, handsome welcome flashing 飼 Towering 慫 celebrate courts recite the Soviet 擻 serious the 綏-year-old grandchildren 筍 paralyzed beach altar Tantra talk about Marvel soup hot Wentao 縧 discussion burn 謄 銻 subject drawer The media to listen 烴 bronze head bald paint Groups 頹 transformation off Ostrich 馱 Camel elliptical orbits 窪 Sock Bend Bay Friend the internet 濰 葦The jar 撾 蝸 swirl hive The oooo tungsten Ukraine pollution 誣 No 蕪 Wu Hollywood fog mission wide 銑 The game lobster the strait Batman narrow Building, 鍁, 謙賢 title did nothing filling the county envy compartment the Constitution 鑲, depression tsunami Die gimp threats harmony write 瀉 Thank Firebrake provocative happy 洶 rusty embroidery virtual 噓 Syria Lingxuan learning 癬 絢 hoon Untamed, Jefferson, opium, and duck to smoke salt, dumb to the oxen, to experience 閻 硯. Nutritional 瑤 Yau remote 窯 She medicine to 銥 頤 heritage 彜 ants Art 詣 The 繹 of the shade the Cherry Baby eagle should 纓 crystal the 熒 flies win stand Yo to have maid 癰 踴 ving Tsun 輿 Fish Fishing Entertainment and the language of the harness 鴛 depths 轅 Park members of the Circle of Keys Chow, Cantonese, 鄖, evenly, crater, 蘊 and 醞 dizzy the rhythmic, 攢 the dirty 贓-鑿 竈 Sepia Bars Scams Fasting 氈 盞 cutting 輾 brand Hoteis War bloomed Zhang increases account accounts hyperinflation 趙 蟄 轍 鍺 This Joan needle diagnostics The Struggle open my 猙 War frame Cheng certified paper sincere dropped flag quality 滯 minutes eventually swelling crush 謅 axis wrinkled day 誅, candles, 矚 Testament, storage, cast and stationed brick the "strong stake", and cone the 贅 of the 綴, to be in the 諄. 濁

CREATE TABLE codetable (GB nchar (1), big nchar (1))
Select Top 1298 id=identity (int,1,1) to #t from sysobjects a,sysobjects b
Insert Codetable
Select substring (@j,id,1), substring (@f,id,1)
From #t
where Id<=len (@j)

drop table #t
Go

/*--transformation function of simple propagation

Using the coding table to realize the conversion of simplified--> traditional and traditional--> simplified
Note that the conversion function uses a Unicode encoding

--Jiangjian 2004.07--*/

/*--Call Example

--Convert to traditional
Select Dbo.f_gb2big (' I am Chinese ', 1)

--Convert to Simplified
Select Dbo.f_gb2big (' I am Chinese ', 0)
--*/
Create Function F_gb2big (
@str nvarchar (4000),--the string to convert
@toBIG bit--Conversion sign, for 1, gb-->big, or BIG-->GB
) returns nvarchar (4000)
As
Begin
If @toBIG =1
Select @str =replace (@str, Gb,big)
From codetable
where CHARINDEX (GB, @str) >0
Else
Select @str =replace (@str, BIG,GB)
From codetable
where CHARINDEX (big, @str) >0
Return (@str)
End
Go



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.