Hello.
I am trying to execute a statement that works fine in ms sql but will
not work in mysql. There are three tables. user (user_sid,
user_name, user_email), file (file_sid, file_name, file_desc),
file_access (file_sid, user_sid).
Here is what I want:
Given a particular file_sid return all users with an extra column
(1,0) inticated whether or not there was a match in the file_access
table for given file_sid. here is what I attempted that DOES work in
mssql.
select case when not (select file_access.user_sid from file_access
where file_access.file_sid=1 and file_access.user_sid=user.user_sid)
is null then 1 else 0 end as has_access, user.* from user
PLEASE HELP...