adapter = new SimpleCursorAdapter(this,R.layout.listview_items,cursor,
new String[] { "Name" },
new int[] { android.R.id.text1 },
0);
我有4个表(SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [Deal].[USP_LoadDealHistoryByDealId]
(@DealId int,
@chk int)
AS
if(@chk = 1)
BEGIN
SELECT
DDT.FieldType AS field,
DDT.OldValue as old,
DDT.NewValue as new,
AU.FullName AS Name,
DU.CompanyName As MarchentName ,
DDT.UpdateOn AS UpdatedOn
FROM [Deal].[DealTransaction] as DDT
Inner Join AD.Users as AU
on AU.UserId =DDT.[UpdateBy]
INNER JOIN dbo.UserProfile as DU
ON DDT.[UpdateBy]= DU.ProfileID
where DDT.dealId=@DealId
END
ELSE if(@chk=2)
BEGIN
SELECT
'No Data' as field ,
0 as old ,
0 as new ,
AU.FullName AS Name,
DU.CompanyName As MarchentName,
DD.UpdatedOn AS UpdatedOn
FROM AD.Users as AU
INNER JOIN [Deal].[Deals] AS DD
ON AU.UserId=DD.UploadedBy
INNER JOIN dbo.UserProfile as DU
ON DD.UploadedBy= DU.ProfileID
where DD.dealId=@DealId
END
,Deal.Deals
,deal.DealTransaction
和AD.User
)。我希望在同一列中的两列dbo.UserProfile
,AU.FullName AS Name
和另一列之间进行联合。问题是,如果我搜索交易DU.CompanyName As MarchentName
,结果只会ID
- 明智但是当我搜索包含UserProfile UserId
结果的交易ID
时,结果没有来了..有没有加入的问题?