°ï¿´Ò»¸öSQL²éѯ½á¹û - MS-SQL Server / »ù´¡Àà
/*
±íÀï3Ìõ¼Ç¼Ƭ¶Î£º
SORDER EDA BUN CUST NOUBA JITU0 APRICE
RR128254 0 1 CSZ003U CSZ004U 62.700 62.10000000
RR128254 0 2 CSZ003U CSZ004U 213.750 62.10000000
RR128254 0 3 CSZ003U CSZ004U 8.550 62.10000000
*/
select case when cust='chf001j'and nouba='chf001j' then ceiling(jitu0*aprice)
when right(cust,1)='j'and cust<>'chf001j'and nouba<>'chf001j'then round(jitu0*aprice,0)
else round(jitu0*aprice,2) end
from xract where sorder='RR128254'
--ÕÕÀíÓ¦³öÀ´ round(jitu0*aprice,2)µÄ½á¹û£¬µ«ÊÇÈ´³öÀ´ceiling(jitu0*aprice)µÄ½á¹û£¬Ôõô»ØÊ£¿
ÓеãõèõΣ¬²»ÖªµÀɶÔÒò¡£ÎÒÔÚÎÒ»úÆ÷ÉÏûÎÊÌ⣬³öÀ´ÕýÈ·½á¹û¶øÀ´¡£
ΪÁËÕýȷ˵Ã÷ÄãµÃµ½µÄ½á¹û£¬½«then ºó¶¼ÓÃ×Ö·û´®ÊÔÊÔ±ÈÈç then 'a' then 'b' else 'c'
Äã¿ÉÒÔÕâÑù²âÊÔ£¬¾ÍÖªµÀËü¶ÁÈ¡µÄÊÇÄĸöÖµ
select case when cust='chf001j'and nouba='chf001j' then 'a' when right(cust,1)='j'and cust<>'chf001j'and nouba<>'chf001j'then 'b'
else 'c' end
from xract where sorder='RR128254'
³öÀ´Ó¦¸ÃÊÇc
to 2Â¥£¬ÎÒÊÔ¹ýÁË£¬ÓÃ×Ö·û´®µÃµ½µÄ½á¹ûÊǶԵģ¬µ«Ò»ÓÃÕýʽµÄÓï¾ä¾Í²»ÐÐÁË¡£¼û¹í¡£
select
case when cust='chf001j'and nouba='chf001j' then 'a'
when right(cust,1)='j'and cust<>'chf001j'and nouba<>'chf001j'then 'b'
else 'c' end,
* from xract where sorder='RR128254'
³öÀ´ÊÇc
µ«ÓÃ
select case when cust='chf001j'and
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿
ÖÁÉٵø½¼Óµ½sqlserverÉÏ
¾ßÌåÔõôŪ°¡ ÎҵıÏÒµÉè¼ÆµÄÊý¾Ý¿âÊÇ´ÓÍøÉÏdownÏÂÀ´µÄ£¿£¿
Ä㻹²»ÈçÖ±½ÓÓÃsqlserverÄØ
º¯Êý¡¢´æ´¢¹ý³Ì¶¼µÃ¸ÄÁË¡£
sqlserverûÔõôÓùý¡£Ò²Ã»Óа²× ......
¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......
ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,...
CreateTble C=Answer N="»ØÌû±í"
(
C=ID T="INTEGER" P=No M=No N="񅧏" Z=false,
C=Ques ......