Sqlserver È¡ºº×ֵĵÚÒ»¸ö×Öĸ£¬·½±ãÄ£ºý²éѯ
create function comm_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'鰒'
&nb
Ïà¹ØÎĵµ£º
SQLServer ģʽ¾ÍÊÇ£¬°ÑSession ´æ·ÅÔÚ SQL Server Êý¾Ý¿âÀעÒâ²»ÊÇ Oracle £¬¶¯¶¯½ÅÖº¶¼Äܲµ½ÔÒòÀ²£©£¬ÏÂÃ濪ʼ˵Ã÷Ò»ÏÂÉèÖõľßÌå²½Ö裺
1¡¢ Æô¶¯Ïà¹ØµÄÊý¾Ý¿â·þÎñ£¨Èçͼ£©
ÔËÐÐSQL Server ·þÎñ¹ÜÀíÆ÷ → Æô¶¯ SQL Server £¨×îºÃÉèΪ¿ª»ú×Ô¶¯ÔËÐУ© ......
Oracle±Ê¼Ç
l ¹ØÓÚTRUNCº¯Êý
SELECT
RELATED_ID ,
DOC_ID ,
CAT_ID ,
CAT_CODE ,
RELEASE_DATE ,
&n ......
Êýѧº¯Êý
ÔÚoracle ÖÐdistinct¹Ø¼ü×Ö¿ÉÒÔÏÔʾÏàͬ¼Ç¼ֻÏÔʾһÌõ
¡¡¡¡1.¾ø¶ÔÖµ
¡¡¡¡S:select abs(-1) value
¡¡¡¡O:select abs(-1) value from dual
¡¡¡¡2.È¡Õû(´ó)
¡¡¡¡S:select ceiling(-1.001) value
¡¡¡¡O:select ceil(-1.001) value from dual
¡¡¡¡3.È¡Õû£¨Ð¡£©
¡¡¡¡S:select floor(-1.001) value
......
1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......