我正在使用sql server 2005.在這個查詢中,我希望登錄用戶的詳細信息也應該顯示,但它不顯示。 因此,請修改查詢,以便登錄用戶的詳細信息也應顯示與會議[userId] .tostring()的幫助;在asp.net中修改sql查詢?
查詢我寫的是:
SELECT DISTINCT MUDMEMBER.PK_ID,MUDMEMBER.EMPLOYEE_ID,LKB.BANK_NAME,MUHD:
SELECT DISTINCT MUDMEMBER.PK_ID, MUDMEMBER.EMPLOYEE_ID, LKB.BANK_NAME, MUHD.SALARY_ACCOUNT_NO, MUHD.PF_NO,
MUHD.PAN_NO, MUHD.GENDER, LKD.DESIGNATION_NAME FROM M_LEADERLED MLL INNER JOIN M_USER_DETAILS MUDMEMBER ON
MLL.LED_ID = MUDMEMBER.PK_ID AND MLL.START_DATE <= Getdate() AND MLL.END_DATE > Getdate() AND MLL.LEADER_ID = '1' LEFT OUTER JOIN
M_USER_HR_DETAILS MUHD ON MUHD.FK_USER_ID = MUDMEMBER.PK_ID AND MUHD.IS_ACTIVE =1 LEFT OUTER JOIN
LK_BANKS LKB ON LKB.PK_ID = MUHD.FK_BANK_ID LEFT OUTER JOIN LK_DESIGNATION LKD ON
LKD.DESIGNATION_VALUE = MUHD.FK_DESIGNATION_VALUE AND LKD.FK_ORGANIZATION_ID = 1 AND LKD.IS_ACTIVE = 1 WHERE MUDMEMBER.ACTIVE = 1
你能提供更多細節嗎?比如你想要顯示哪些列,以及你想在哪裏使用會話[userid]? – 2010-10-14 12:18:56
@Shalni:你在哪裏寫這個查詢,在ASP.net頁面或StoreProcedure – Vijjendra 2010-10-14 12:22:27
我想要顯示的列如上所示。我只想添加一行登錄用戶與上面相同的列。喜歡:PK_ID =會話[userid] .Tostring() – Shalni 2010-10-14 12:22:48