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

sql ×Ö·û´®´¦ÀíÎÊÌâ À´ÕßÓзÖ


@s='S1,S2,S12,S23';

½«@sÀïÃæµÄS1,S2Ìæ»»³É´¦Àí£¬Î´´¦Àí


À´ÕßÓзÖ.

REPLACE(@s,'S1,S2','´¦Àí,δ´¦Àí')

REPLACE ²»ºÃÓà ×Ô¼ºÊÔÏÂ

SQL code:

declare @s varchar(200)
set @s='S1,S2,S12,S23'
select replace(@s,'S1,S2','´¦Àí,δ´¦Àí')


´ó¼ÒÕâÑùÊÔÏÂ
@s='S1,S12,S2,S23';

½«@sÀïÃæµÄS1,S2Ìæ»»³É´¦Àí£¬Î´´¦Àí

SQL code:
declare @s varchar(200)
set @s='S1,S12,S2,S23'
set @s = ',' + @s +','
set @s = replace(@s, ',S1,',',´¦Àí,')
set @s = replace(@s, ',S2,',',δ´¦Àí,')
select substring(@s, 2, len(@s) - 2)
/*
´¦Àí,S12,δ´¦Àí,S23
*/


SQL code:
DECLARE @s varchar(MAX);
SET @s = 'S1,S12,S2,S23,S1';

SELECT @s = REPLACE(REPLACE(','+@s+',',',S1,',',´¦Àí,'),',S2,',',δ´¦Àí,')

SELECT STUFF(LEFT(@s,LEN(@s)-1),1,1,'')


SQL code:
declare @s varchar(200)
set @s='S1,S12,S2,S23'
set @s = ',' + @s +','
set @s = replace(replace(@s, ',S1,',',´¦Àí,'),',S2,',',δ´¦Àí,')
select su


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

ÇóÒ»¸öSQLÓï¾ä - MS-SQL Server / »ù´¡Àà

×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......

asp wap sqlÓï¾äÖлñÈ¡µÄºº×Ö²»ºÃÊ - Web ¿ª·¢ / ASP

SQL code:

rs.open "select * from guide where city_name='±±¾©' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
¡£¡£
¡£¡£
¡£¡£
rs.movenext
loop
Õâ¸ösqlÓï¾äÔÚwapÕ¾Àï ±¾ÉíÓÐ ......

SQLÄܽøÐжþ½øÖƵÄɸѡÂ𣿠- MS-SQL Server / »ù´¡Àà

ÎÒÓÐÒ»¸ö×Ö¶ÎÊÇ varchar(1) ÀàÐÍ£¬¶þ½øÖƱíʾҲ¾ÍÊÇ8λµÄ ¡®0000 0000¡¯
±ÈÈçÕâ¸öʱºòÎÒÐèҪɸѡ³öÕâ¸ö×Ö¶ÎΪËùÓÐµÄ ¡®0000 0100¡¯µÄÐУ¬ÇëÎÊSQLÄÜʵÏÖÕâÑùµÄ¡°Î»¡±µÄɸѡÂð£¿
лл~~~

ÓÐλ²Ù×ݺ¯ÊýÂ𣿲»ÐоÍ× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ