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

sqlÁ½Áкϲ¢ÏÔʾ£¿

²éѯ½á¹û¼¯£º
ps  online  totle
a    0      10
b    1      11
c    5        8
ÏëÏÔʾ³ÉÕâÑù
ps      exp
a    (0)|(10)
b    (1)|(11)
c    (5)|(8)

ÈçºÎдsql
SQL code:
select
ps,
'('ltrim(online)+')|('+ltrim(totle)+')' as exp
from
tb


SQL code:
select ps , exp = '(' + cast(online as varchar) + ')|(' + cast(total as varchar) + ')' from tb


SQL code:
select ps,exp='('+cast(online as varchar(10))+')|('+cast(totle as varchar(10))+')' from ±í


SQL code:

--> ²âÊÔÊý¾Ý£º@tb
declare @tb table([ps] varchar(1),[online] int,[totle] int)
insert @tb
select 'a',0,10 union all
select 'b',1,11 union all
select 'c',5,8




select ps,exp='('+ltrim(online)+')'+'('+ltrim([totle])+')' from @tb

/*
ps exp
---- ----------------------------
a (0)(10)
b (1)(1


Ïà¹ØÎÊ´ð£º

¼òµ¥µÄsqlÎÊÌâ

ÐÕÃû  ѧ¿Æ
a      ÓïÎÄ
a      Êýѧ
b      Ó¢Óï
b      ÕþÖÎ

ÎÒÏëµÃµ½  a    ÓïÎÄ£¬Êýѧ
  ......

Çë½ÌÒ»¸öSQLÓ¦ÓÃÎÊÌâ

ÓÐʱºòÔÚÊý¾ÝÖвéѯÊý¾ÝµÄʱºò¿¼ÂÇÐÔÄÜÎÊÌ⣬»á½«¸´ÔÓÓï¾ä²ð·Ö»ò½èÓÃÁÙʱ±íÀ´¶à´Î²éѯ×îÖյõ½ÏëÒªµÄÊý¾Ý£¬ÏÖÔÚ½«ÕâЩ²éѯÄÚÈÝ×ö³É±¨±í£¬ÐèҪд¸öÓï¾äÒ»ÆøºÇ³É¡£
ÎÒÏëÎʵÄSQLÊÇ·ñ¿ÉÒÔÔÚ²éѯÓï¾äÒ»½áÊøºó£¬ÔÙ×Ô¶¯Ô ......

ÇóSQLÒ»ÌõÓï¾äµÄ½â¾ö·½·¨

±ÈÈç ÎÒÓÐÒ»¸ö±í bumen

ÀïÃæ ÓÐÒ»¸öÁР quanxian
id  name  quanxian

1    a    001;002;003;
2    b    002;003;
3    ......

ÓÐÈËÓùýsql server2005 ´´½¨·¢²¼Âð£¿

¾ÍÊÇÕ¹¿ªreplication ÓÒ¼üµ¥»÷ local Subscription ´´½¨·¢²¼£¬ ÓÐÈËÓùýÂ𣬳ɹ¦´´½¨·¢²¼µÄÓÐÂð£¿
Óùý£¬¿ÉÒԳɹ¦

ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦

Ã×ÓùýµÄ°ï¶¥

ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦

µÚÒ»²½ÎҾ͹ý² ......

sql server left join ÎÊÌâ

sqlÓï¾ä£º
select loan_plan_id,l_collect_plan.loan_id,l_collect_detail.collect_isfinished from l_collect_plan
left join l_collect_detail on l_collect_plan.return_times=l_collect_detail.collect_vo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ