E
Enohp Aikon
I am having difficulties creating a query that operates as needed. The query
returns the data as expected but I am unable to change any data though the
query. The SQL for the query (simplified version) is as follows:
SELECT [tLI-1].LoanID, [tLI-1].fkOptionsMatrixID, [tLI-1].ReqLoanAmount,
tLTVm.LtvLimit, tLTVm.LowerLimit, tLTVm.UpperLimit
FROM tblOptionsMatrix AS tOptM INNER JOIN (tblLtvMatrix AS tLTVm INNER JOIN
tblLoanInfo AS [tLI-1] ON tLTVm.fkOptionsMatrixId =
[tLI-1].fkOptionsMatrixID) ON tOptM.OptionsMatrixID =
[tLI-1].fkOptionsMatrixID
WHERE (((tLTVm.LowerLimit)<[ReqLoanAmount]) AND
((tLTVm.UpperLimit)>=[ReqLoanAmount]));
There are 2 tables involved:
1) tLI-1
2) tLTVm
These tables are related a 3 table, tOPTm, thought a field named
fkOptionsMatrixID.
tLTVMm also contains a field named RequestedLoanAmount (Curency). tLTVm
contains 4 fields, LtvMatrixID (Prime Key), fkOptionsMatrixId, LowerLimit
(Currency), UpperLimit (Currency), LtvLimit (Percenage).
Table tLTVm is basically a matrix that stores LTV values for loan amount
ranges for various “Options†(e.g.: Option 1, LowerLimit =0, UpperLimit =
500,000, LTV = .90%; Option 2, LowerLimit =500,000, UpperLimit = 650,000, LTV
= .85%; etc.
In the simplified querry, I need to be able to change the
tLI-1.RequestedLoanAmount and have the correct tLTV.LtvLimit to return. The
query from above does properly return the expected value for all existing
records but new records cannot be added and existing data
(RequestedLoanAmount) can not be changed.
Clearly, I am doing something wrong. Hopefully, someone can point me in the
right direction
returns the data as expected but I am unable to change any data though the
query. The SQL for the query (simplified version) is as follows:
SELECT [tLI-1].LoanID, [tLI-1].fkOptionsMatrixID, [tLI-1].ReqLoanAmount,
tLTVm.LtvLimit, tLTVm.LowerLimit, tLTVm.UpperLimit
FROM tblOptionsMatrix AS tOptM INNER JOIN (tblLtvMatrix AS tLTVm INNER JOIN
tblLoanInfo AS [tLI-1] ON tLTVm.fkOptionsMatrixId =
[tLI-1].fkOptionsMatrixID) ON tOptM.OptionsMatrixID =
[tLI-1].fkOptionsMatrixID
WHERE (((tLTVm.LowerLimit)<[ReqLoanAmount]) AND
((tLTVm.UpperLimit)>=[ReqLoanAmount]));
There are 2 tables involved:
1) tLI-1
2) tLTVm
These tables are related a 3 table, tOPTm, thought a field named
fkOptionsMatrixID.
tLTVMm also contains a field named RequestedLoanAmount (Curency). tLTVm
contains 4 fields, LtvMatrixID (Prime Key), fkOptionsMatrixId, LowerLimit
(Currency), UpperLimit (Currency), LtvLimit (Percenage).
Table tLTVm is basically a matrix that stores LTV values for loan amount
ranges for various “Options†(e.g.: Option 1, LowerLimit =0, UpperLimit =
500,000, LTV = .90%; Option 2, LowerLimit =500,000, UpperLimit = 650,000, LTV
= .85%; etc.
In the simplified querry, I need to be able to change the
tLI-1.RequestedLoanAmount and have the correct tLTV.LtvLimit to return. The
query from above does properly return the expected value for all existing
records but new records cannot be added and existing data
(RequestedLoanAmount) can not be changed.
Clearly, I am doing something wrong. Hopefully, someone can point me in the
right direction