I'm attempting to JOIN two tables in SQL Server 2000, but I need to pass a variable somehow from one to the other (or perhaps there is some other method I'm not aware of).
Here is my current JOIN and gives me the results I currently want, but I need to expand it.
TABLE1 has 10 fields, but only 2 of value for the problem: AccessValue, AccessType
TABLE2 has about 30 fields.
The new approach I want is to JOIN the table on:
I'm just not sure I know where to start to get this to work. I attempted Declaring a variable, but it didn't work
=================
There are 10 kinds of people in this world, those that understand binary and those that do not.
Here is my current JOIN and gives me the results I currently want, but I need to expand it.
Code:
SELECT e.*
FROM Table1 AS e INNER JOIN Table2 AS p
ON e.AccessValue = p.PositionTitle
TABLE1 has 10 fields, but only 2 of value for the problem: AccessValue, AccessType
TABLE2 has about 30 fields.
The new approach I want is to JOIN the table on:
Code:
Table1.AccessValue = Table2.<[i]the value from Table1.AccessType[/i]>
I'm just not sure I know where to start to get this to work. I attempted Declaring a variable, but it didn't work
=================
There are 10 kinds of people in this world, those that understand binary and those that do not.