|
Posted by Sfj on 09/29/40 11:50
Hello folks,
Old programmer learning new tricks.
I think similar issues have been posted, but I would like to ask some help
with the following code...
select [t1.*],[t2.userid] as [userid2],[t2.approved],[t2.type]
from [tblMembers] as t1 left outer join [tblProfiles] as t2
on [t1.userid]=[t2.userid]
where ...
I get the following error...
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
't1.userid'.
....but there is a [userid] in both tables. Do I have to make them keys or
something? And I need to do work (add and update) on both tables after the
values are returned.
Also, how bad is my syntax? If you could give advice on removing extraneous
brackets and I would like to not have to use the "as" clause. I really just
want to keep it simple. Whatever works though.
Thanks
Navigation:
[Reply to this message]
|