Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

mssql Öн«ºº×Öת»»ÎªÆ´ÒôÊ××Öĸ·½·¨


1.
--½«ºº×Öת»»ÎªÆ´ÒôÊ××Öĸ
CREATE   function   GetAllPY(@str   nvarchar(4000))
returns   nvarchar(4000)
--WITH   ENCRYPTION
as
begin
declare   @intLen int
declare   @strRet nvarchar(4000)
declare   @temp   nvarchar(100)
set   @intLen   =   len(@str)
set   @strRet   =   ''
while   @intLen   >   0
begin
set   @temp   =   ''
select   @temp   =   case   
when   substring(@str,@intLen,1)   >=   '帀'   then   'Z'
when   substring(@str,@intLen,1)   >=   'Ѿ'   then   'Y'
when   substring(@str,@intLen,1)   >=   'Ϧ'   then   'X'
when   substring(@str,@intLen,1)   >=   '屲'   then   'W'
when   substring(@str,@intLen,1)   >=   'Ëû'   then   'T'
when   substring(@str,@intLen,1)   >=   'Øí'   then   'S'
when   substring(@str,@intLen,1)   >=   '呥'   then   'R'
when   substring(@str,@intLen,1)   >=   'Æß'   then   'Q'
when   substring(@str,@intLen,1)   >=   '妑'   then   'P'
when   substring(@str,@intLen,1)   >=   'àÞ'   then   'O'
when   substring(@str,@intLen,1)   >=   '拏'   then   'N'
when   substring(@str,@intLen,1)   >=   '嘸'   then   'M'
when   substring(@str,@intLen,1)   >=   'À¬'   then   'L'
when   substring(@str,@intLen,1)   >=   'ßÇ'   then   'K'
when   substring(@str,@intLen,1)   >=   'Ø¢'   then     'J'
when   substring(@str,@intLen,1)   >=   'îþ'   then   'H'
when   substring(@str,@intLen,1)   >=   'ê


Ïà¹ØÎĵµ£º

mssqlÖÐÓÃxmlµÄ·½·¨²ð·ÖÒÔ²»¶¨¿Õ¸ñΪ·Ö¸î·ûºÅµÄ×Ö·û´®

---xml²ð·ÖÒÔ²»¶¨¿Õ¸ñΪ·Ö¸î·ûºÅµÄ×Ö·û´®
--²âÊÔÊý¾Ý
if object_id('[tb]') is not null drop table [tb]
create table [tb]([a] varchar(200))
go
insert [tb]
select 'aaaa  bbbb cccc        dddd'
insert [tb]
select 'eeeeee  ffff hhhh     ......

ORACLE ÐÐÁÐת»»Í¨Óô洢¹ý³Ì£¬ÒѾ­×ª»»µÄMSSQL°æ±¾

ÏÂÃæÊÇORACLEÐÐÁÐת»»Í¨Óô洢¹ý³Ì£º
1¡¢
Function Fun_Split_Str(p_Str Varchar2, p_Division Varchar2, p_Seq Int)
    Return Varchar2 Is
    v_First Int;
    v_Last  Int;
  Begin
    If p_Seq < 1 Then
   &nbs ......

mssql´æ´¢¹ý³ÌÓï·¨Ïê½â£¨±¸Íü£©


Óï·¨
CREATE PROC[ EDURE ] [ owner. ] procedure_name [ ; number ] 
    [ { @parameter data_type } 
        [ VARYING ] [ = default ] [ OUTPUT ] 
   &n ......

mssql sysobjects type˵Ã÷

xtype ´ú±íÀàÐÍ 
C = CHECK Ô¼Êø 
D = ĬÈÏÖµ»ò DEFAULT Ô¼Êø 
F = FOREIGN KEY Ô¼Êø 
L = ÈÕÖ¾ 
FN = ±êÁ¿º¯Êý 
IF = ÄÚǶ±íº¯Êý 
P = ´æ´¢¹ý³Ì 
PK = PRIMARY KEY Ô¼Êø£¨ÀàÐÍÊÇ K£© 
RF = ¸´ÖÆÉ¸Ñ¡´æ´¢¹ý³Ì 
S = ϵͳ±í 
TF = ±íº¯Êý 
TR = ´¥· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ