Hi again all
Still learning, still making mistakes. Can anyone please tell me where I am going wrong with this coding. Its the WHERE clause that's causing me grief.
Thanks
Gez
CREATE TABLE [AccountLoanTEST] (
[AccountID] char (12) NOT NULL,
[LoanStatus] char (20) NULL,
[UndisbursedAmount] numeric (21,6) NULL,
[RepayAmount] numeric (21,6) NULL,
[RepayFrequency] char (8) NULL,
[RepayInterFrequency] smallint NULL,
[DelinqAmount] numeric (21,6) NULL,
[AdvanceAmount] numeric (21,6) NULL,
[RepayStatus] char (20) NULL,
[ApplicNumber] char (20) NULL,
[AmountFinanced] numeric (21,6) NOT NULL,
[DateSecuritised] smalldatetime NULL,
[MethodDesc] char (20) NULL,
[BrokerFlag] bit NULL,
[PurposeDesc] varchar (25) NULL,
[Term] smallint NULL,
[ReviewDate] smalldatetime NULL,
[DateLastFunded] smalldatetime NULL,
[MaturityDate] smalldatetime NULL,
[ApprovalOfficer] varchar (40) NULL,
[PartialPriority] char (11) NULL,
[LoanRateType] char (15) NULL,
[OldAccountNumber] varchar (15) NULL,
[LinkedSavingsAccountID] char (12) NULL
)
_____________________________________________
ln_display.acct_no AS AccountID,
ln_display.undisbursed AS UndisbursedAmount,
ln_display.nxt_pmt_amt AS RepayAmount,
ln_pmt_schedule.period AS RepayFrequency,
ln_pmt_schedule.trm AS RepayInterFrequency,
ln_display.delq_amt AS DelinqAmount,
ln_display.in_advance AS AdvanceAmount,
ln_user_defined.value AS ApplicNumber
WHERE ln_user_defined.user_defined = 5,
ln_display.amt_financed AS AmountFinanced,
ad_ln_purpose.purpose AS PurposeDesc,
ln_display.trm AS Term,
ln_acct.nxt_rev_dt AS Reviewdate,
ln_display.contract_dt AS DateLstFunded,
ln_display.mat_dt AS MaturityDate,
ad_gb_rsm.name AS ApprovalOfficer,
ln_acct.partial_priority AS PartialPriority,
ln_acct_int_opt.rate_type AS LoanRateType,
ln_acct.acct_no_old AS OldAccountNumber,
ln_acct.chg_alt_acct_no AS LinkedSavingsAccountID
Still learning, still making mistakes. Can anyone please tell me where I am going wrong with this coding. Its the WHERE clause that's causing me grief.
Thanks
Gez
CREATE TABLE [AccountLoanTEST] (
[AccountID] char (12) NOT NULL,
[LoanStatus] char (20) NULL,
[UndisbursedAmount] numeric (21,6) NULL,
[RepayAmount] numeric (21,6) NULL,
[RepayFrequency] char (8) NULL,
[RepayInterFrequency] smallint NULL,
[DelinqAmount] numeric (21,6) NULL,
[AdvanceAmount] numeric (21,6) NULL,
[RepayStatus] char (20) NULL,
[ApplicNumber] char (20) NULL,
[AmountFinanced] numeric (21,6) NOT NULL,
[DateSecuritised] smalldatetime NULL,
[MethodDesc] char (20) NULL,
[BrokerFlag] bit NULL,
[PurposeDesc] varchar (25) NULL,
[Term] smallint NULL,
[ReviewDate] smalldatetime NULL,
[DateLastFunded] smalldatetime NULL,
[MaturityDate] smalldatetime NULL,
[ApprovalOfficer] varchar (40) NULL,
[PartialPriority] char (11) NULL,
[LoanRateType] char (15) NULL,
[OldAccountNumber] varchar (15) NULL,
[LinkedSavingsAccountID] char (12) NULL
)
_____________________________________________
ln_display.acct_no AS AccountID,
ln_display.undisbursed AS UndisbursedAmount,
ln_display.nxt_pmt_amt AS RepayAmount,
ln_pmt_schedule.period AS RepayFrequency,
ln_pmt_schedule.trm AS RepayInterFrequency,
ln_display.delq_amt AS DelinqAmount,
ln_display.in_advance AS AdvanceAmount,
ln_user_defined.value AS ApplicNumber
WHERE ln_user_defined.user_defined = 5,
ln_display.amt_financed AS AmountFinanced,
ad_ln_purpose.purpose AS PurposeDesc,
ln_display.trm AS Term,
ln_acct.nxt_rev_dt AS Reviewdate,
ln_display.contract_dt AS DateLstFunded,
ln_display.mat_dt AS MaturityDate,
ad_gb_rsm.name AS ApprovalOfficer,
ln_acct.partial_priority AS PartialPriority,
ln_acct_int_opt.rate_type AS LoanRateType,
ln_acct.acct_no_old AS OldAccountNumber,
ln_acct.chg_alt_acct_no AS LinkedSavingsAccountID