Microsoft
Software
Hardware
Network
Question : Need a SQL query
2 tables: userfile & rcvfile
need a query to create a list of distinct users that are authorized to receive materials, how many times they have received materials and the last date they received materials
userfile
userid
authorized (list of authorized actions for userid separated by a tilde (~), RECEIVER means they can receive materials)
rcvfile
receiveperson (matches userid above)
receiptdate
I believe that is all you should need. I have thus far:
SELECT userid FROM userfile
WHERE authorized LIKE '%RECEIVER%'
Thanks in advance.
- Jim
Answer : Need a SQL query
SELECT u.userid, COUNT(r.rcvfile), MAX(r.receiptdate)
FROM userfile u
left join rcvfile r on r.receiveperson = u.userid
WHERE u.authorized LIKE '%RECEIVER%'
group by u.userid
>> SQL 2008 and intellisense.... expanded my "m" to "master"
Random Solutions
Where is the Default Printer set in Crystal Reports?
window 7 OS: blank (black) screen only, as it logs in
Need to show image above datalist if user selects. the image.
Exchange 2010 Antivirus Options
added a function to webservice. Why can't i see it by intellesense on the client
Cisco ASA 8.3 RDP Configuration Syntax
T SQL Query and Dates
Insert Script from the command prompt
Exchange 2010 resource mailbox for meeting room
Setting Folder Permission in Windows XP - VB Script