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

×Ü»áÅöµ½¹ÖµÄÎÊÌ⣬sqlÎÊÌâ

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),Ö´ÐÐËÙ¶ÈÂýµÄÒªËÀ£¬µ«ÊÇÈç¹û°Ñ(xxf>0 and  xxfwzf <>0 )£¬ÕâÁ½¸öÌõ¼þ£¬¸ÄÈκÎÒ»¸ö£¬Ëٶȶ¼Ô¶±È¼ÓÁ½¸öÒª¿ì£¬¾ÍËãÊǼǼÊýÒª¶à£¬Ò²Ã»ÓÐÓã¬ÆæÁ˸ö¹ÖÁË£¬²»ÖªµÀÊÇÔõô»ØÊ£¬ÎÒ°Ñv_ddxxµÄÊÓͼÌù³öÀ´

SELECT    d_id, d_psz, d_bdrq, d_hdzs, d_smjz, d_bxf, d_zcf, d_sfqs, d_xcf, d_shf, d_yqdhrq, dbfy, g_gsmc, d_ssbm, d_sfsc, d_gsid, d_ddms, d_fhflxr,
                      d_fhflxdh, d_mdd, g_yyjsff, bmmc, d_ntime, d_czy, d_sfd, g_ssbm, jsfsmc, d_skfs, d_shfdw, d_shflxr, d_shflxdh, d_shflxdz, d_je, tydh, d_xxfsh,
                      d_tffsh, d_jsd, d_ztsh, u_xm, g_hsxs, jssl, hwjs, zyf, ysxjje, yshfje, ystfje, xxfyzf, CASE WHEN d_skfs = 97 OR
                      d_skfs = 112 THEN isnull(d_je, zyf) ELSE 0 END - ISNULL(ystfje, 0) AS wtfje, CASE WHEN d_skfs = 109 THEN isnull(d_je, zyf) WHEN (d_skfs = 112) AND
                      (isnull(zyf, 0) - isnull(d_je, zyf)) > 0 THEN (isnull(zyf, 0) - isnull(d_je, zyf)) ELSE 0 END - ISNULL(yshfje, 0) AS whfje, CASE WHEN (d_skfs = 97 OR
                    &nb


Ïà¹ØÎÊ´ð£º

sql ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

SQLÌæ»»×Ö·û´®µÄÎÊÌâ

¸÷λ´óÏÀ£¬ÓиöÎÊÌâÇë½Ì£¬ÎÒÏÖÔÚÓÐÁ½ÕűíA,B×ֶζ¼ÓÐnum£¬Èç
A                    B
num                  ......

ÇóÒ»ÌõSQLÓï¾ä¡£

ID  ²Í±ð    ʱ¼ä
1  ÖÐ²Í 2009-10-25
2  ÖÐ²Í 2009-10-26
3  Íí²Í 2009-10-26
4  Ôç²Í 2009-10-27

½á¹û
1  ÖÐ²Í 2009-10-25
3  Íí²Í ......

ÇóÒ»¸ö¸ßÄѶȵÄSQLͳ¼ÆÃüÁî

Ô­À´±í½á¹¹Îª£º

  ʱ¼ä    Àà ÐÍ  ÊýÁ¿
2009-1-2  ëÒ  23 
2009-1-2  ëÒ  11 
2009-1-2  ÃÞÒ  3 
2009-1-3  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ