sql server查询数据库信息做为附件发送邮件信息

select @mistakes=count(*) from lot_loc_mst where  unit_cost >20 or unit_cost<=0    --料工费分开     IF  (@mistakes>0)     BEGIN  SET  @SQL='select * from item_mst' EXEC msdb.dbo.sp_send_dbmail            
相关文章
相关标签/搜索