日期:2014-05-18 浏览次数:20699 次
SELECT [_std_item_code],[_std_item_name] FROM [_tbl_std_item] [color=#FF0000]$#%&^*($%...[/color] WHERE [_user_category_name]=[color=#0000FF]strCategoryname[/color]
declare @strCategoryname varchar(30) select * from _tbl_user_category a,_tbl_user_item b,_tbl_std_item c where a._user_category_id=b._user_item_category_id and b._user_item_id=c._std_item_id and a._user_category_name=@strCategoryname
------解决方案--------------------
SELECT [_std_item_code],[_std_item_name] FROM [_tbl_std_item] c join tbl_user_item b on b._user_std_item_id=c._std_item_id join tbl_user_category on a._user_category_id=b._user_item_categpry_id WHERE [_user_category_name]=strCategoryname