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

SQLºº×Öת»»Æ´Òô

/*
¸ù¾Ýºº×Ö»ñȡȫƴ
1.Éú³ÉËùÓжÁÒôÁÙʱ±í
2.¸ù¾ÝChinese_PRC_CS_AS_KS_WS ÅÅÐò»ñÈ¡¶ÁÒô
*/
Create function ChineseSpell(@str varchar(100))
returns varchar(8000)
as
begin
declare @re varchar(8000)
--Éú³ÉÁÙʱ±í
declare @t table(chr nchar(1) collate Chinese_PRC_CS_AS_KS_WS,py nvarchar(20))
insert into @t select'ß¹','a'
insert into @t select'厑','aes'
insert into @t select'°¥','ai'
insert into @t select'°²','an'
insert into @t select'°¹','ang'
insert into @t select'°¼','ao'
insert into @t select'°Ë','ba'
insert into @t select'挀','bai'
insert into @t select'兡','baike'
insert into @t select'瓸','baiwa'
insert into @t select'°â','ban'
insert into @t select'°î','bang'
insert into @t select'Ùè','bao'
insert into @t select'萡','be'
insert into @t select'Úé','bei'
insert into @t select'±¼','ben'
insert into @t select'伻','beng'
insert into @t select'皀','bi'
insert into @t select'±ß','bian'
insert into @t select'辪','uu'
insert into @t select'ìá','biao'
insert into @t select'±ï','bie'
insert into @t select'汃','bin'
insert into @t select'Ùû','bing'
insert into @t select'癶','bo'
insert into @t select'峬','bu'
insert into @t select'àê','ca'
insert into @t select'偲','cai'
insert into @t select'乲','cal'
insert into @t select'²Î','can'
insert into @t select'²Ö','cang'
insert into @t select'撡','cao'
insert into @t select'冊','ce'
insert into @t select'膥','cen'
insert into @t select'àá','ceng'
insert into @t select'硛','ceok'
insert into @t select'岾','ceom'
insert into @t select'猠','ceon'
insert into @t select'乽','ceor'
insert into @t select'²æ','cha'
insert into @t select'犲','chai'
insert into @t select'辿','chan'
insert into @t select'Øö','chang'
insert into @t select'³­','chao'
insert into @t select'³µ','che'
insert into @t select'ÞÓ','chen'


Ïà¹ØÎĵµ£º

SQL Server Ë÷Òý½á¹¹¼°ÆäʹÓã¨Ò»£©

SQL Server Ë÷Òý½á¹¹¼°ÆäʹÓã¨Ò»£©
Ò»¡¢ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¡¡¡¡Êµ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý£¨clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý£©ºÍ·Ç¾Û¼¯Ë÷Òý£¨nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý£©¡£ÏÂÃæ£¬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄ ......

SQL Server Ë÷Òý½á¹¹¼°ÆäʹÓã¨ËÄ£©

SQL Server Ë÷Òý½á¹¹¼°ÆäʹÓã¨ËÄ£©
×÷Õߣºfreedk
Ò»¡¢ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¶þ¡¢¸ÄÉÆSQLÓï¾ä
Èý¡¢ÊµÏÖСÊý¾ÝÁ¿ºÍº£Á¿Êý¾ÝµÄͨÓ÷ÖÒ³ÏÔʾ´æ´¢¹ý³Ì
¾Û¼¯Ë÷ÒýµÄÖØÒªÐÔºÍÈçºÎÑ¡Ôñ¾Û¼¯Ë÷Òý
¡¡¡¡ÔÚÉÏÒ»½ÚµÄ±êÌâÖУ¬±ÊÕßдµÄÊÇ£ºÊµÏÖСÊý¾ÝÁ¿ºÍº£Á¿Êý¾ÝµÄͨÓ÷ÖÒ³ÏÔʾ´æ´¢¹ý³Ì¡£ÕâÊÇÒòΪÔÚ½«±¾´æ´¢¹ý³ÌÓ¦ÓÃÓÚ“°ì¹«×Ô¶ ......

SQLµÝ¹é²éѯ²¿ÃÅ

create function [dbo].[DeptTree](@initDeptCode  varchar(10))/*¶¨Ò庯Êýc_tree£¬ÊäÈë²ÎÊýΪ³õʼ½ÚµãDeptCode*/
returns @t table(DeptCode varchar(10),UpDeptCode  varchar(10),lev int)/*¶¨Òå±ítÓÃÀ´´æ·ÅÈ¡³öµÄÊý¾Ý*/
begin
  declare @i int/*±êÖ¾µÝ¹é¼¶±ð*/
  set @i=1
  insert @t ......

SQLÎÞÏÞ·ÖÀà´æ´¢¹ý³ÌÕûÀí2

Ä£·Â²Î¿¼:¶¯Ò×ÎÞÏÞ·ÖÀà
Óŵã:ËãµÃÉÏÊÇÕæÕýµÄÎÞÏÞ·ÖÀ࣬²»¹ýParentPathÊÇÓоÖÏÞÐÔ,ClassIDÊDZêʶÁÐ×Ô¶¯ÔöÒ».
ȱµã:ÐÂÔö¹ý³ÌÖÐParentID²»´æÔÚ»¹Ã»ÓÐÍêÉÆ£¬»á²åÈëNULLÊý¾Ý.ºóÃæÈý¸ö´æ´¢¹ý³Ì»¹ÔÚ²âÊÔ¡£
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ArticleClass]') and OBJECTPROPERTY(id, N'Is ......

SQLʱ¼ä¶Î²éѯ


SQLʱ¼ä¶Î²éѯ
ACCESSµÄ»°
select * from table where date1<#2008-1-20# and date2>#2007-8-30#
MYSQLµÄ»°
select * from table where date1<'2008-1-20' and date2>'2007-3-30'
Ò²¿ÉÒÔ
select * from table where date1 between '2008-1-20' and '2007-3-30'
ÆäÖÐdate1,date2¶¼ÊÇÈÕÆÚÀàÐ͵Ä× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ