I have a single SQL Server SELECT search which I search for an Account via a AccountCode (Accounts) and then a user within that Account identified by the resulting AccoutID (UserAccounts)
This is what I have but there is no ON because I've not searched the code to find the AccountID to then search for a username and password with that AccountID
Is this even possible?
Code:
Dim Cmd As New SqlCommand("SELECT * FROM AccountUsers LEFT JOIN Accounts ON WHERE Accounts.AccountCode = @AccountCode AND AccountUsers.UserName = @UserName AND AccountUsers.UserPassword = @UserPassword", conn)
Is this even possible?