English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

IIf([Prepaid],"Prepay",IIf([Receipts].[DowntownCash],"DCR",IIf([PaymentTypes].[PaymentType]="Cash","Cash",IIf([Receipts].[Mailin] And ([HeadOffice]=True),"Mail","Non")))) AS PmtType

This is the full SELECT line- I'm trying to understand what conditions makes the PMTTYPE field/variable (I'm not a app guy)

SELECT DISTINCTROW IIf(IsNull(MailinSource.MailinSourceID),"No Source Entered",Trim(Trim(Str([SourceNo])) & " " & [Description])) AS SourceDesc, MailinSource.Description, Val(Trim(Trim(Str([SourceNo])) & " " & [Description])) AS ValDesc, IIf([Prepaid],"Prepay",IIf([Receipts].[DowntownCash],"DCR",IIf([PaymentTypes].[PaymentType]="Cash","Cash",IIf([Receipts].[Mailin] And ([HeadOffice]=True),"Mail","Non")))) AS PmtType, Sum(([ReceiptsID]<=CLng(nz([RelatedReceipt],[ReceiptsID])))*-1) AS ReceiptCount, Sum(Receipts.ServiceCharge) AS SumOfServiceCharge, Receipts.MailinSourceID, Sum(IIf([DowntownCash],[AmountSubmitted],[TotalTax])) AS Expected, Locations.Location, Locations.LocationID

2007-02-05 00:42:12 · 3 answers · asked by justaguyaskingaquestion 1 in Computers & Internet Programming & Design

3 answers

The select line does not make the payment type. The if statement does.

IIf([Prepaid],"Prepay",IIf([Re... And ([HeadOffice]=True),"Mail","No... AS PmtType

2007-02-05 01:12:32 · answer #1 · answered by w2pc.com 3 · 0 0

It doesn't say anything in plain English, it is SQL. If SQL was a simple as plain English, then we'd use plain English for queries.

2007-02-05 09:44:43 · answer #2 · answered by Anonymous · 0 0

it's really hard to understand

2007-02-05 08:48:33 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers