クエリの定義にクエリエレメントを追加するときに使用できるオプションがいくつかあります。
有効なエクスプレッションであれば、どのような算術計算式でも使用できます。次に、例を示します:
# Formula Expression CustomerAge + CustomerIdentifierId – 1245 InvoiceSubtotal * 2 # Conditional Expression iif(CitizenStatus = 1, "Waiting", Iif(CitizenStatus = 2, "OK", Iif(CitizenStatus = 3, "Error", Iif(CitizenStatus = 4, "Pending", "Other"))))
算術計算式:
有効なエクスプレッションであれば、どのような集計式でも使用できます。次に、例を示します:
Sum(CustomerId + CustomerId) Sum(InvoiceTaxes+InvoiceNonTaxes) Sum(CustomerId) + Sum(CustomerId) Sum(InvoiceTotal)/Count(InvoiceId)
by:
defined by:
weighted by:
次に、フィルタリング用の有効なエクスプレッションの例を示します:
Sum(InvoiceTotal) where Year(InvoiceDate) = 2008 Sum(InvoiceTotal) where Year(InvoiceDate) < 2008 / Sum(InvTot) where Year(InvoiceDate) > 2007 Sum(InvoiceTotal) where Year(InvoiceDate) in (2010,2020)
詳細については、フィルタセクションを参照してください。
For Each 節の使い方を参照してください。
使用できる関数は、次のとおりです:
# Simple Month(InvDate) Upper(CustomerName) # Composed Trim(Str(Year(InvoiceDate)))
この動作は GeneXus 16 Upgrade 11 以降で利用できます。
|