I have three tables that all have "loan" in common.
Property
Investorloans
Loans
I used the following statements to pull all the loans for the investorid (03, 04, 06, 10) by matching the loan number(s) from each table.
I also want to join the information from the property file to the result set (again, "loan" is the common record match". SELECT investorloans.investorid, investorloans.loan, loans.*
FROM investorloans
FULL JOIN loans
ON investorloans.loan=loans.loan
WHERE investorloans.investorid in("03","04", "06", "10")
order by investorid asc
I am NOT a skilled programmer so sorry for asking something that might be so simple.
One last piece of information. I could join the property table and the loans table by joining them based on the loan number - BUT, in the above problem, I only want the loans by the set of investors (i.e 3,5,5,10). That might make my problem more clear - the way I do it now is manually and time intensive by running multiple queries and retrieving the loan numbers and then having to paste them into a conditional statement and I know there is a better way if I knew what I was doing :-)
Thanks!!
1 1676
Not sure I understand the problem but what is wrong with this - SELECT investorloans.investorid, investorloans.loan, loans.*
-
FROM investorloans
-
FULL JOIN loans
-
ON investorloans.loan=loans.loan
-
JOIN property
-
ON investorloans.loan=property.loan
-
WHERE investorloans.investorid in("03","04", "06", "10")
-
order by investorid asc
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Beyonder |
last post by:
I have five tables in my database, there are actually NO common fields
between them, not even a KEY or ID or anything like that, except for
the "body" of a blob field. and that text is not...
|
by: TeleTech1212 |
last post by:
I am trying to select specific columns from multiple tables based on a
common identifier found in each table.
For example, the three tables:
PUBACC_AC
PUBACC_AM
PUBACC_AN
each have a...
|
by: Stanley Sinclair |
last post by:
I have a need to return multiple result sets from a stored procedure.
Want that SP to call others to get the data.
Win2003, db2 8.1.5.
Can't figure out how to handle open cursors, and return...
|
by: EyesFriedOpen |
last post by:
I was trying to post this to the IBM DB2 forum, however I do not have the "New Post" button available when I view the IBM DB2 forum. Therefore, I apologize if this is not the right place for this.
...
|
by: davidevan |
last post by:
What I'm trying to do is set a players division according to their age.
So if age is 8, update division to junior, if age is 9, update division
to medium, if age is 10, update division to pee wee,...
|
by: Crash |
last post by:
SQL Server 2005 SP1 Standard & Express
..NET 2.0 and ADO.NET
C#
Hi,
I have a stored procedure that returns results from 3 select
statements. When I "ExecuteDataset" from C# code the...
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I am wondering if someone could provide a code sample (or just a suggested
approach) on how to fill a single DataGridView with multiple result sets. For
example, this statement returns a one-line...
|
by: Cyprus106 |
last post by:
Apparently, Im incapable of properly executing this query! I've been at this for far too long and gotten nowhere. Forgive me if this is a umb mistake; I'm not great at SQL.
I've got three tables,...
|
by: stretchtack |
last post by:
Hey Troops,
I'm not sure if this is allowed, but I'm trying to keep my SP generic and reduce duplicate code. Depending on a condition, I need to JOIN to different tables, which slightly changes...
|
by: TheBlackDragon7 |
last post by:
.. At least, I think that's what I'm asking for...
Please bear with me as I try to explain my setup and my question. :)
I have a database set up for products. each product (obviously) has a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |