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

SQL ÖÐÎÄתƴÒô


--º¯ÊýÈçÏ£º
/*
CREATE FUNCTION dbo.fnpbGetPYFirstLetter 

@str NVARCHAR(4000) 

RETURNS NVARCHAR(4000) 
--WITH ENCRYPTION 
AS 
BEGIN 
DECLARE @WORD NCHAR(1),@PY NVARCHAR(4000)
SET @PY=''
WHILE LEN(@STR)>0 
BEGIN 
SET @WORD=LEFT(@STR,1)
--Èç¹û·Çºº×Ö×Ö·û£¬·µ»ØÔ­×Ö·û 
SET @PY=@PY+(CASE WHEN UNICODE(@WORD) BETWEEN 19968 AND 19968+20901 
THEN ( 
SELECT TOP 1 PY 
from 

SELECT 'A' AS PY,N'驁' AS WORD 
UNION ALL SELECT 'B',N'²¾' 
UNION ALL SELECT 'C',N'錯' 
UNION ALL SELECT 'D',N'鵽' 
UNION ALL SELECT 'E',N'樲' 
UNION ALL SELECT 'F',N'鰒' 
UNION ALL SELECT 'G',N'腂' 
UNION ALL SELECT 'H',N'夻' 
UNION ALL SELECT 'J',N'攈' 
UNION ALL SELECT 'K',N'穒' 
UNION ALL SELECT 'L',N'鱳' 
UNION ALL SELECT 'M',N'旀' 
UNION ALL SELECT 'N',N'桛' 
UNION ALL SELECT 'O',N'漚' 
UNION ALL SELECT 'P',N'ÆØ' 
UNION ALL SELECT 'Q',N'囕' 
UNION ALL SELECT 'R',N'鶸' 
UNION ALL SELECT 'S',N'蜶' 
UNION ALL SELECT 'T',N'籜' 
UNION ALL SELECT 'W',N'鶩' 
UNION ALL SELECT 'X',N'鑂' 
UNION ALL SELECT 'Y',N'韻' 
UNION ALL SELECT 'Z',N'咗' 
) T 
WHERE WORD>=@WORD COLLATE CHINESE_PRC_CS_AS_KS_WS 
ORDER BY PY ASC 

ELSE @WORD 
END) 
SET @STR=RIGHT(@STR,LEN(@STR)-1) 
END
RETURN @PY
END
 
 
*/
 
µ÷ÓÃʾÀý£º
 
--City PinYin
select dbo.fnpbGetPYFirstLetter('ÉϺ£ÊÐ')
Result: "SHS"
 
 


Ïà¹ØÎĵµ£º

aspµ÷ÓÃsql server´æ´¢¹ý³Ì

ASPµ÷Óô洢¹ý³ÌµÄ·½·¨£º    
 
----  ¡¡¡¡µ÷Óô洢¹ý³ÌµÄ·½·¨ÐèҪʹÓÃADOµÄCommand¶ÔÏó¡£Command¶ÔÏóÊǶÔÒ»¸öÊý¾ÝÔ´ÔËÐÐÌض¨ÃüÁîµÄ¶¨Ò壨ÀýÈ磬һ¸öSQL²éѯ»òÒ»¸öSQL´æ´¢¹ý³Ì£©¡£ÏÂÃæÒÔMS  SQL  SERVER6.5Ϊºǫ́Êý¾Ý¿â£¬½éÉÜASPµ÷Óô洢¹ý³ÌµÄ·½·¨¡£    
 
----  ¡ ......

SQL Server 2005 Óë SQL Express µÄÒìͬ


SQL Server Express 2005£¨ÒÔϼò³Æ SQLExpress£© ÊÇÓÉ΢Èí¹«Ë¾¿ª·¢µÄ SQL Server 2005£¨ÒÔϼò³Æ SQL2005£©µÄËõ¼õ°æ£¬Õâ¸ö°æ±¾ÊÇÃâ·ÑµÄ£¬Ëü¼Ì³ÐÁË SQL Server 2005 µÄ¶àÊý¹¦ÄÜÓëÌØÐÔ£¬È磺°²È«ÐÔÉèÖá¢×Ô¶¨Ò庯ÊýºÍ¹ý³Ì¡¢Transact-SQL¡¢SQL¡¢CLR µÈ£¬»¹Ãâ·ÑÌṩÁ˺ÍËüÅäÌ׵ĹÜÀíÈí¼þ SQL Server Management Studio Expre ......

Oracle Sql Óï¾äÐÔÄܵ÷ÓÅ

ÕâƪÎÄÕÂÊÇÐþ»úÒÝʿΪijÉÏÊй«Ë¾µÄERPϵͳµ÷ÓÅËù׫д±¨¸æµÄ²¿·Öժ¼£¬Ï£ÍûÄܹ»¶Ô´ó¼ÒÓÐËù°ïÖú£º
ÏÂÃæ¸ø³öSQLÓÅ»¯¾­³£Óöµ½µÄÇéÐΡ£ËüÃÇÊÇÔںܶàÈ˳¤ÆÚ»ýÀ۵ľ­ÑéÉÏ×ܽá³öÀ´µÄ£¬ÕâЩ¶¼ÊÇһЩһ°ãÐԵĽáÂÛ£¬ÔÚʵ¼Ê¹¤×÷ÖУ¬»¹Ó¦µ±¾ßÌåÇé¿ö¾ßÌå·ÖÎö£¬²¢¼ÓÒÔÁé»îÔËÓá£
(1)  ÓÃNOT EXISTSÌæ»»NOT IN ½«¸üÏÔÖøµØÌá¸ßЧÂÊ£¬¾ ......

set autotrace in SQL*Plus

set autotrace off  
set autotrace on  
set autotrace traceonly  
 
set autotrace on explain  
set autotrace on statistics  
set autotrace on explain statistics  
 
set autotrace traceonly explain  
set ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ