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

SqlserverµÃµ½ºº×ÖÆ´ÒôÊ××Öĸ´æ´¢¹ý³Ì

SqlserverµÃµ½ºº×ÖÆ´ÒôÊ××Öĸ´æ´¢¹ý³Ì:
create function [dbo].[fun_getPY]
(
@str nvarchar(4000)
)
returns nvarchar(4000)
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'桛'
    &nb


Ïà¹ØÎĵµ£º

sqlserverÊý¾Ý¿âDateTime¸ñʽ²Ù×÷

Êý¾ÝÀï(sqlserver) µÄ²Ù×÷ £º
eg £º2008-3-31 10:34 --> 2008-3-31
Ò».½ØÈ¡×Ö·û´®·½Ê½
select substring('2008-3-31 10:34',0,charindex(' ','2008-3-31 10:34'))
¶þ.
Select
CONVERT(varchar, getdate(), 1),--mm/dd/yy
CONVERT(varchar, getdate(), 2),--yy.mm.dd
CONVERT(varchar, getdate() ......

sqlserver°²×°ºÍ¿ò¼Ü

ÎÒÃÇ×ÜÊÇ°ÑSQL Server Õâ¸öµ¥´Ê¹ÒÔÚ×ì±ß£¬Ò²ÐíºÜÉÙÓÐÈË˼¿¼¹ý SQL Server µ½µ×ÊÇʲô¶«Î÷¡£Õâ¸öÎÊÌâºÜÄÑÓü¸¾ä»°½²Çå³þ¡£ÎÒÃÇÖ®ËùÒÔÒªÓÃÁ¬Ôصķ½Ê½ÌÖÂÛ SQL Server£¬¾ÍÊÇÒª´Ó²»Í¬µÄ½Ç¶È²ûÊöÕâ¸öÎÊÌâ¡£
¡¡¡¡Ò»¡¢·þÎñÆ÷×é¼þ
¡¡¡¡SQL Server 2000ÓÉÁ½¸ö²¿·Ö×é³É£º·þÎñÆ÷×é¼þºÍ¿Í»§¶Ë¹¤¾ß¡£
¡¡¡¡1.ÄÚÈÝ
¡¡¡¡SQL ServerµÄ·þ ......

´¿JSP·ÖÒ³´úÂëÖ®sqlserver2005/2008

ÉÏһƪ·ÖÒ³ÎÄÕ£¬ÊÇÓÃÓÚmysql£¬ÉÔ΢ÐÞ¸ÄÏ£¬ÓÃÓÚSqlserver2005/2008£¬Ã»ÓÐÒì³£´¦Àí¡£Ã»Óп¼ÂÇÐÔÄܵȡ£
ÏÖ½«´úÂëÌù³ö£¬ÒÔ¹©³õѧÕ߲ο¼£º
×¢£ºÑûÔÂʹÓû·¾³Eclipse 3.4.2+Tomcat 6.18+Sqlserver2005 sp3µ÷ÊԳɹ¦¡£
Ò³ÃæpagelistDemo.jspÄÚÈÝ£º
Code
<%@ page language="java" contentType="text/html; ......

SQLServerÊý¾Ý¿âά¶È±íºÍÊÂʵ±í¸ÅÊö

¡¡¡¡ÊÂʵ±í
¡¡¡¡Ã¿¸öÊý¾Ý²Ö¿â¶¼°üº¬Ò»¸ö»òÕ߶à¸öÊÂʵÊý¾Ý±í¡£ÊÂʵÊý¾Ý±í¿ÉÄÜ°üº¬ÒµÎñÏúÊÛÊý¾Ý£¬ÈçÏÖ½ðµÇ¼ÇÊÂÎñ
¡¡¡¡Ëù²úÉúµÄÊý¾Ý£¬ÊÂʵÊý¾Ý±íͨ³£°üº¬´óÁ¿µÄÐС£ÊÂʵÊý¾Ý±íµÄÖ÷ÒªÌصãÊÇ°üº¬Êý×ÖÊý¾Ý(ÊÂʵ)£¬²¢ÇÒÕâЩÊý×ÖÐÅÏ¢¿ÉÒÔ»ã×Ü£¬ÒÔÌṩÓйص¥Î»×÷ΪÀúÊ·µÄÊý¾Ý£¬Ã¿¸öÊÂʵÊý¾Ý±í°üº¬Ò»¸öÓɶà¸ö²¿·Ö×é³ÉµÄË÷Òý£¬¸ÃË÷Òý ......

sqlServerÖеÄ×ÔÔö×Ö¶Î


 
SQLÓï¾äÈçÏÂ:
CREATE TABLE [dbo].[test_table] (
    [ID] [int] IDENTITY (1, 1) NOT NULL ,
    [NAME] [varchar] (80)
)
Éè¼ÆÊÓͼÏÂ,ÔÚÌí¼ÓÒ»¸öINTÐ͵Ä×Ö¶ÎÊÇ,Ñ¡ÖÐÏ·½µÄ"±êʶ"Ϊ"ÊÇ",ÏÂÃæÓÐ"±êʶÖÖ×Ó"ºÍ"±êʶ×ÔÔöÁ¿",¿ÉÒÔ×Ô¼ºÉèÖÃ,ĬÈ϶¼Îª1
µ«ÊDz»ÖªµÀΪʲô,ʹÓÃÈÎÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ