标题: 在WR里面怎么写数据查询? [打印本页] 作者: lxhcba 时间: 2005-11-28 14:48 标题: 在WR里面怎么写数据查询? Declare @ProjectName varchar(200),@ProjectID int,@FileSystemID int
Declare @FileName varchar(200)
set @ProjectName = 'izAM8Wk8ZkXy'
set @FileName='Design'
set @ProjectID = (select ProjectID_int from project where ProjectName_vchar=@ProjectName)
set @FileSYstemID = (select FileSystemID_int
from FileSystemProjectRelation
where ProjectID_int=@ProjectID)
select F.FileSystemID_int,S.FileSystemName_vchar
from FileSystem_FindChildren_fn(@FileSYstemID) F
inner join FileSystem S on F.FileSystemID_int=S.FileSystemID_int
where isNull(S.FileItemID_int,0)=0 AND S.FileSystemName_vchar=@FileName