Results based on ("Left") ("Right") criteria. Please help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need Transaction Description for a given TR_NO displayed.

My results displayed need to come from the following criteria..

If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)
 
Thank you for your help..However I am getting a error stating...You tried to
excute a query that does not include the specified expression
CMPSWONER_UNITS_BUY_SELL.BYPASS_TRANS_FLAG="Y" AND
LEFT9CMPSOWNER_TERANSACT_DETAIL.TR_NO,1)=RIGHT([HLP_CODE],1)' as part of an
aggregate function.

I hope this helps you help me to figure this out. But you helped me get
farther than what I was yesterday. I am learning and that is what counts!
Thanks so much.

KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

TKM said:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
Sorry I pulled down the wrong field. Thank you very mcuh it works perfectly!

KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

TKM said:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
I am sorry I forgot to complete my query. The results are fine but here is
the kicker. I need to display all the records in my HLP_TEXT field when they
match the results from the following.. Check: Left([TR_NO],1)>
Then use this as criteria --
Right([HLP_CODE],1)

I tried to bring down the filed in my query and put the above in the
criteria but that did not work. tried other things also but no luck. I know
it has to be simple from here but? Any ideas?

Thanks again for all your help! It is most appreciated!


KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

TKM said:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
I do not follow what you are asking. Please restate what you want it to do.

TKM said:
I am sorry I forgot to complete my query. The results are fine but here is
the kicker. I need to display all the records in my HLP_TEXT field when they
match the results from the following.. Check: Left([TR_NO],1)>
Then use this as criteria --
Right([HLP_CODE],1)

I tried to bring down the filed in my query and put the above in the
criteria but that did not work. tried other things also but no luck. I know
it has to be simple from here but? Any ideas?

Thanks again for all your help! It is most appreciated!


KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

TKM said:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
I have a field named HLP_TEXT I want to show all the records that are based
on the criteria you sent me. Your criteria is correct. Those records are like
a combination. If the first digit of one field equals the last digit of the
other field. Then show me all the records in (HLP_TEXT) based on the match
from those two fields. The HLP_TEXT is associated to the above criteria. Say
TR_NO 3001 matches HLP_CODE 20033 because the first digit of the TR_NO
matches the last digit of the HLP_CODE that combination is the locator number
for a paticular HLP_TEXT. What I was trying to do is bring down the HLP_TEXT
from my table and use your expressions as the Criteria for that field. In
essance that is what I want. Such as. If the first number of A equals the
Last number of B then show me all the records in C that match taht criteria.
Does this help?

Thanks again

KARL DEWEY said:
I do not follow what you are asking. Please restate what you want it to do.

TKM said:
I am sorry I forgot to complete my query. The results are fine but here is
the kicker. I need to display all the records in my HLP_TEXT field when they
match the results from the following.. Check: Left([TR_NO],1)>
Then use this as criteria --
Right([HLP_CODE],1)

I tried to bring down the filed in my query and put the above in the
criteria but that did not work. tried other things also but no luck. I know
it has to be simple from here but? Any ideas?

Thanks again for all your help! It is most appreciated!


KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
You can not place the criteria I posted on the HLP_TEXT field. I said for
you to add a field just for the use of the criteria.

Am I still missing something you are trying to accomplish? Post your SQL
statement by opening the query in design view, click on menu VIEW - SQL View,
highlight all, copy, and paste in a post.

TKM said:
I have a field named HLP_TEXT I want to show all the records that are based
on the criteria you sent me. Your criteria is correct. Those records are like
a combination. If the first digit of one field equals the last digit of the
other field. Then show me all the records in (HLP_TEXT) based on the match
from those two fields. The HLP_TEXT is associated to the above criteria. Say
TR_NO 3001 matches HLP_CODE 20033 because the first digit of the TR_NO
matches the last digit of the HLP_CODE that combination is the locator number
for a paticular HLP_TEXT. What I was trying to do is bring down the HLP_TEXT
from my table and use your expressions as the Criteria for that field. In
essance that is what I want. Such as. If the first number of A equals the
Last number of B then show me all the records in C that match taht criteria.
Does this help?

Thanks again

KARL DEWEY said:
I do not follow what you are asking. Please restate what you want it to do.

TKM said:
I am sorry I forgot to complete my query. The results are fine but here is
the kicker. I need to display all the records in my HLP_TEXT field when they
match the results from the following.. Check: Left([TR_NO],1)>
Then use this as criteria --
Right([HLP_CODE],1)

I tried to bring down the filed in my query and put the above in the
criteria but that did not work. tried other things also but no luck. I know
it has to be simple from here but? Any ideas?

Thanks again for all your help! It is most appreciated!


:

Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 
Works perfectly! Thanks for all your help. I had to experiment a little but
you were the one to get me on track! Thanks again

KARL DEWEY said:
I do not follow what you are asking. Please restate what you want it to do.

TKM said:
I am sorry I forgot to complete my query. The results are fine but here is
the kicker. I need to display all the records in my HLP_TEXT field when they
match the results from the following.. Check: Left([TR_NO],1)>
Then use this as criteria --
Right([HLP_CODE],1)

I tried to bring down the filed in my query and put the above in the
criteria but that did not work. tried other things also but no luck. I know
it has to be simple from here but? Any ideas?

Thanks again for all your help! It is most appreciated!


KARL DEWEY said:
Open the query in design view and add the following in a blank column --
Check: Left([TR_NO],1)

Then use this as criteria --
Right([HLP_CODE],1)

:
I need Transaction Description for a given TR_NO displayed.
My results displayed need to come from the following criteria..
If the first number in my TR_NO field matches the last
number in my HLP_CODE field then display all those descriptions based on the
above criteria. All the fields are text from two seprate tables in one query.
Criteria as follows..

If the first number in TR_NO FILED MATCHES THE LAST NUMBER IN HLP_CODE THEN
DISPLAY ALL THE RECORDS ASSOCIATED WITH THAT CRITERIA.
 

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

Back
Top