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 table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001
ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......