Greater Than and Less Than Equal to in SQL Server inner join NEED
<p>I am currently developing a system that allows you to loan money. The thing is in order to place a loan you must pass the required or must have greater amount in your deposit in your bank acct.</p>

<p>Here is the schema for the deposit</p>

<p><strong>tbl_fxd_dep</strong>:</p>

<pre><code>    fxid | amount
    1      10,000
    2      15,000.01
    3      20,000.01
</code></pre>

<p>Here is the schema for the employees amount deposited</p>

<p><strong>tbl_employee</strong>:</p>

<pre><code>    empid | amount
    1       15,100.01
</code></pre>

<p>as you can see there the amount of the employees deposit is neither equal to <code>15,000.01</code> and <code>20,000.01</code> but rather in between those amounts</p>

<p>Here is my sql statement</p>

<pre><code>Select 
    empid, fname, mname, lname, st, prv, city, cnt, fxid 
from 
    emp as e
inner join 
    fd as f on e.amount &gt;= f.amount
            and e.amount &lt;= f.amount
where 
    uname = @user and pwd = @pwd
</code></pre>

<p>This is an inner join statement that I created the problem is that whenever I try to log in using the users acct and password it does not query the profile of the user I tried removing this part <code>and e.amount &lt;= f.amount</code> the <code>fxid</code> that is pulls up is <code>1</code> rather than showing the <code>fxid</code> it should belong to in this case <code>2</code> by can somebody provide me a alternative solution to this problem </p>

<p>THANK YOU and appreciate any effort that you guys give...</p>