We help IT Professionals succeed at work.
Get Started

Using INNER JOIN query with coldfusion

jameskane
jameskane asked
on
494 Views
Last Modified: 2012-05-06
I have two tables - each with a shared field name   memberID.

The members2 table gives info about members (name, address..) and has memberID a Key field.

The bank_cheque_listing table records transactions and has a memberID field - which is not a key field as memberID will reoccur whenever a member makes more than one transaction.

I need a query which will give me a listing of all transactions - each row of the listing containinng information about the nature of the transaction and also information about the member involved in the transaction.

I have tried creating a query using an INNER JOIN approach - but get an error reporting that no value was given for one or more parameters.

Can someone take a look at my query and tell me if I am on the right track here ?

Many thanks in advance;
<cfquery name="recordset_banklisting" datasource="Office">
 
SELECT 
bank_cheque_listing.cheque_paydate,
     bank_cheque_listing.cheque_value,
     bank_cheque_listing.cheque_bank,
     bank_cheque_listing.cheque_branch,
     bank_cheque_listing.cheque_number,
     bank_cheque_listing.cheque_ac_owner,
     bank_cheque_listing.cheque_status,
     MEMBERS2.memberID,
     members2.Nom,
     Members2.Prenom,
     members2.Addresse,
     members2.zip,
     members2.ville
     
FROM bank_cheque_listing
INNER JOIN members2
ON bank_cheque_listing.memberID = members2.memberID
ORDER BY bank_cheque_listing.cheque_paydate
 
 
</cfquery>

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 4 Answers and 17 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE