Criterias in Select Statement

M

Max

Hi i am having two tables
1: Code (3 fields)
2. Data (4 fields)


Code-asset_value-Month_fig_refer
X-1000-2006/01
X-2000-2006/11

Data:
Cust-Code-Current_month-Asset_value
abc-X-2006/10-1000
abc-X-2006/11-2000

My question is i want to make select query which check current month value
if this value is small than Month_fig_refer, it should pick up the value for
that code, for the particular range.

Suppose user select code 'X' then Current_Month value is 2006/11 then
asset_value should be return as 2000, and not 1000

is it possible

thanx
 
J

Jerry Whittle

Might be. What date types are Month_fig_refer and Current_month?

What is the primary key field in the Code table?

Are the dashes ( - ) in your examples actually part of the data or your way
of showing different fields?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top