Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Report query parameters

edited December 2010 in General
Trying to get this query to ask the user for a text field (logonID) but
it wants a number (int) for US_MD_ID.
Can I make it work;

SELECT
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name,
vw_US_User_Software_Assign.sc_sw_Version,
vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_User_Data.Txt_ID,
vw_User_Data.Lastname,
vw_User_Data.Firstname,
vw_rpt_Users_Workstations.Computername,
vw_rpt_Users_Workstations.IPAddress,
vw_rpt_Users_Workstations.Location_City,
vw_rpt_Users_Workstations.Location_State,
vw_rpt_Users_Workstations.MAC,
vw_rpt_Users_Workstations.WKS_Description,
vw_rpt_Users_Workstations.Wks_Lastupdate,
vw_rpt_Users_Workstations.SerialNumber,
vw_GetModelNames.Model,
vw_GetModelNames.Description
FROM
vw_US_User_Software_Assign vw_US_User_Software_Assign
INNER JOIN vw_User_Data vw_User_Data ON
(vw_User_Data.ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_rpt_Users_Workstations vw_rpt_Users_Workstations ON
(vw_rpt_Users_Workstations.UD_ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_GetModelNames vw_GetModelNames ON
(vw_GetModelNames.ID = vw_rpt_Users_Workstations.Model_ID)

WHERE
( vw_US_User_Software_Assign.US_MD_ID =
(SELECT TOP (1) US_MD_ID FROM vw_US_User_Software_Assign AS
vw_US_User_Software_Assign_1
WHERE
(US_UD_ID =
(SELECT TOP (1) ID FROM vw_User_Data AS vw_User_Data_1
WHERE (Txt_ID LIKE '%LogonID%'))))

ORDER BY vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name



--- posted by geoForum on http://www.newswhat.com

Comments

This discussion has been closed.